LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-28-2002, 01:50 AM   #1
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Rep: Reputation: 30
Question MySql + Non interactive Login !


Hi ,

Is it possible to Non Interactively login into SQL server and run a query and get the result back for my shell script to interpret ?

I want to write a script that a script which non interactively connects to my PL-SQL server ( The script resides on the same server .... not a remote server!) and run a query .

Can i redirect the query to my command prompt shell ?

Any help will be appreciated.

Regards,
Xanthium.

:smash:
 
Old 03-28-2002, 12:31 PM   #2
kervin
Member
 
Registered: Jan 2002
Location: Melbourne, FL.
Distribution: redhat
Posts: 168

Rep: Reputation: 31
is this about MySQL or Oracle?

You subject says MySQL, but the body of the message mentions PL-SQL, which I believe is oracle.

At any rate mysql can.

QUERY_RETURN=`echo "use user_database; select * from user;" | mysql --user=admin --password='secret'`
 
Old 03-30-2002, 12:20 AM   #3
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Original Poster
Rep: Reputation: 30
Its Oracle!

Hi Kervin,

Thanks for the reply.

Sorry it is Oracle. Since iam into network administration i didnt bother to see the differance between oracle and mysql! it was one and the same for me ( SQL afterall!)

Will it work with Oracle as well ?

Regards,
Xanthium.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not login into mysql. saudoi Solaris / OpenSolaris 1 11-30-2005 02:20 AM
mysql login Ab3n Linux - Newbie 2 07-04-2005 10:45 AM
Interactive ppp login hotrodowner Linux - Networking 0 07-06-2004 10:11 PM
mysql login permissions mpgram Linux - Software 1 03-05-2004 07:15 PM
mysql login sopiaz57 Linux - Security 1 01-05-2004 10:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration