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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Securing passwords in scripts

Re: Securing passwords in scripts

From: Jon Walthour <jonw_at_fuse.net>
Date: Thu, 26 Jul 2001 02:54:59 -0700
Message-ID: <F001.00355A00.20010726025102@fatcity.com>

If you're going to be doing DBA tasks like you describe (backups which require you to shutdown the database, etc.), you can just use "/ as sysdba" in sqlplus. This works all the way back to 7.3 as far as I know. For it to work, however, the OS account that is being used must be a member of the DBA group (Unix) or the ORA_DBA group (NT). In a UNIX script, I use it like this:

sqlplus << EOF
/ as sysdba
shutdown immediate
exit
EOF In NT, it would be a matter of putting all the commands in a .sql script and executing the script like this:

sqlplus "/ as sysdba" @myscript.sql

Hope this helps.

Jon Walthour

> I have some scripts, O.S. command and SQL, which I use to perform COLD
> backups of DBs and other tasks. I'm not particularily happy about having
> username/password information in the scripts. Has anyone come up with a
way
> to avoid same allowing for the fact the scripts should require no user
input
> to execute.
>
>
> Sean :)
>
> Rookie Data Base Administrator
> Oracle 7.3.3, 8.0.5, 8.1.7 - NT, W2K
> [0%] OCP Oracle8i DBA
> [0%] OCP Oracle9i DBA
> -------------------------------- ------------
> Organon (Ireland) Ltd.
> E-mail: sean.oneill_at_organon.ie [subscribed: Digest Mode]
>
> Visit: http://groups.yahoo.com/group/Oracle-OCP-DBA
>
> "Nobody loves me but my mother... and she could be jivin' too." - BB King
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: O'Neill, Sean
> INET: Sean.ONeill_at_organon.ie
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jon Walthour
  INET: jonw_at_fuse.net

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Jul 26 2001 - 04:54:59 CDT

Original text of this message

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