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

----- Original Message -----
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 4:55 AM


> 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: [EMAIL PROTECTED]   [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: [EMAIL PROTECTED]
>
> 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to