LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   MySql + Non interactive Login ! (https://www.linuxquestions.org/questions/programming-9/mysql-non-interactive-login-17181/)

xanthium 03-28-2002 01:50 AM

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:

kervin 03-28-2002 12:31 PM

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'`

xanthium 03-30-2002 12:20 AM

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.


All times are GMT -5. The time now is 02:36 PM.