Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> FW: FW: Running SQL script from the UNIX prompt

FW: FW: Running SQL script from the UNIX prompt

From: Winegarden, Gary NY PO1 <WINEGARDEN_at_PO1.NY.UNISYS.COM>
Date: Wed, 7 Feb 1996 16:31:00 GMT
Message-Id: <9602072137.AA18072@alice.jcc.com>


Sorry, I got blinded by our own internal rules (no hard-coded userid/passwords in any scripts, period) so I just ignored that one. I guess the answer is, if one is worried about security, your method appears to be the way to go.



From: owner-oracle-l
To: Multiple recipients of list ORACLE-L Subject: Re: FW: Running SQL script from the UNIX prompt Date: Wednesday, February 07, 1996 12:56PM

Yes, there are several options. The one I use is to execute sqlplus redirecting a file as input, which contains the password and sql script:

sqlplus -s < somefile

somefile contains

        userid/password
        @somesqlscript
        exit

The down side of this, is the password is hard coded in a file. Anyone who has access to this file gets the password. However, at least you can  limit access to this file. With the other method, anyone can see the passeord by issuing the ps -ef.

 ----------------------[Reply - Original Message]----------------------

Sent by:"Winegarden, Gary NY PO1" <WINEGARDEN_at_PO1.NY.UNISYS.COM>  OK, a valid point, but do you have an alternate answer to the original question?



From: owner-oracle-l
To: Multiple recipients of list ORACLE-L Subject: Re: Running SQL script from the UNIX prompt Date: Wednesday, February 07, 1996 11:40AM

Watch out for this solution:

     #sqlplus username/passwd @sql_script_name

Someone issuing a ps -ef will pick up the password.

 ----------------------[Reply - Original Message]----------------------

Sent by:Robert Hatcher <robert.hatcher_at_CITICORP.COM>  >
> Hi!
>
> I have a .sql script that I usually run from SQL*Plus using the @
command. Is
> there any way of running that script from the UNIX prompt, ie, without
getting
> into SQL*Plus first?
>

yes.

        #sqlplus username/passwd @sql_script_name

It will return you to the unix prompt. Add a "-s" after sqlplus to put it in
quiet mode.



Received on Wed Feb 07 1996 - 16:37:52 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US