RE: Script for sql shutdown.

RE: Script for sql shutdown.

 

  

Try:

su - orauser
cd
. DEV.env
lsnrctl stop DEV
sqplus "/ as sysdba" <<EOF
shutdown immediate
exit
EOF
sleep 60
exit


-----Original Message-----
From: Jaco Steyn
[mailto:oracledba-ezmlmshield-x47517984.[Email address protected]
Sent: Friday, December 03, 2004 10:53 PM
To: LazyDBA Discussion
Subject: Script for sql shutdown.


Can you please help with the following.

I need to run the following command as a cron job, but as soon as I conn
/ as sysdba, the script stop. I know I need to use EOF,,, but not sure
where....

Can you please help.

su - orauser
cd
. DEV.env
lsnrctl stop DEV
sqlplus /nolog
conn / as sysdba
shutdown immediate
sleep 60
exit



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html

Oracle LazyDBA home page