Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can I query from command line?
mpir_at_compuserve.com wrote:
>
> In article <6tlo0m$gbs$1_at_sally.dma.org>,
> wrightm_at_dmapub.dma.org (Mike Wright) wrote:
> > Is it possible for me to write a shell script to query my
> > Oracle db?
> the command would be
> sqlplus youruserid/yourpassword @yoursqlplusscript
>
Though the above will work, it has all the security joys of
anyone else doing the command "ps" and discovering your Oracle
login name and password.
To my shame I haven't tried it, but methinks the use of a
"here now" document in Unix may be a better approach:
sqlplus << THEENDOFMYCOMMANDS youruserid yourpassword start yoursqlplusscript THEENDOFMYCOMMANDS
Mungo Henning Received on Thu Sep 17 1998 - 08:01:40 CDT