Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Showing results for 
Search instead for 
Did you mean: 

oracle database schedule shutdown

Go to solution
Krishnan Kutty
Occasional Contributor

oracle database schedule shutdown

I've oracle installed on hpux 11.11. I need to shutdown the database and then the server at a scheduled time. Can anybody help me with the script.

Thanks & Regards
Krishnan Kutty

Re: oracle database schedule shutdown

First the script - put into a file (say /home/nielg/shut)

export $ORACLE_SID
svrmgrl <connect internal
shutdown immediate
shutdown -y 0

(remember to make the script executable)

Next to enable it all:

as root:

edit /etc/shutdown.allow
add the name of the oracle user in there

also add the name of the oracle user to /var/adm/cron/at.allow

now decide on the time you want it to run (say 10 PM tonight)

as the oracle user:

at -f /home/nielg/shut 2200

Hope that helps
Well, we all try
Esteemed Contributor

Re: oracle database schedule shutdown


Use Neil script but recomment to use
su - oracle -c <script name>
place this in root's cron job for schedule down only database.

if you want to down both OS and database , add database shutdown script in rc.
enjoy any little thing in my life