Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: FW: Running SQL script from the UNIX prompt
Oracle has a 'c' program called hide.c that strips off the userid and
password and @somesqlscript.
We have used it for sqlplus. Ask Oracle Maintenance for the fax about
hide.c or you can send me
an email directly and I will email you the answer.
At 12:56 PM 2/7/96 PST, you wrote:
>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.
>
>=====================================================================
>
>=====================================================================
>
>
|=================================================| | Daniel Booth | | City of Vancouver/Clark County | | Joint Office of Information Technology | | daturkey_at_pacifier.com | | 360-699-2381 Daytime voice | |=================================================|Received on Thu Feb 08 1996 - 09:52:21 CST
![]() |
![]() |