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.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

oracle database schedule shutdown

SOLVED
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
krishnankutty
Krishnan Kutty
2 REPLIES
Solution

Re: oracle database schedule shutdown

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

ORACLE_SID=your_SID_here
export $ORACLE_SID
svrmgrl <connect internal
shutdown immediate
END_MGR
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
N
Well, we all try
Printaporn_1
Esteemed Contributor

Re: oracle database schedule shutdown

Hi,

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