Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automatic start and stop DB whene system start and stop

Status
Not open for further replies.

amalou

IS-IT--Management
Joined
Oct 28, 2002
Messages
147
Location
FR
hi
i will to automaticaly start and stop DB 9i when systeme start and stop on pserie (AIX 5.1) systems
thanks
 
Hi amalou,

you should generate a start/stop script in /etc/init.d directory (maybe in AIX it will be /etc/rc.d ??)
Here are the scripts which automatic startet bythe specific runlevel (rc3.d is okay for DB's and Apps). Scripts with S..... are startings and K.... are kills.
Oracle provide scripts by installation (dbstart, dbstop). copy this into an e.g. S98startDB and K98stopDB.
So your DB will be automatic restarted and stopped.

Hope that helps
Uwe
 
Hi.
If you use HA/CMP it would make sense to call DB & Listener-start- and stop-scripts from the corresponding start- and stop-scripts called by the cluster-manager.

Stefan
 
Make a file in /etc called rc.oracle - the contents are

#!/bin/ksh
su - oracle -c /u05/app/oracle/product/8.0.5/bin/dbstart # Start all local Databases
su - oracle -c /u05/app/oracle/product/8.0.5/bin/lsnrctl start # Start the Oracle Listener
su - oracle -c /u05/app/oracle/product/8.0.5/bin/lsnrctl dbsnmp_start # Start the Intelligent Agent


Make another file in etc called rc.shutdown - the contents are

su - oracle -c /u05/app/oracle/product/8.0.5/bin/lsnrctl stop
su - oracle -c /u05/app/oracle/product/8.0.5/bin/dbshut


In your /etc/inittab put this entry

oracle:2:once:/etc/rc.oracle >/dev/console 2>&1

The rc.shutdown will be found when the system shuts down
The rc.oracle will be run from inittab when the system starts

I don't have access to HACMP, so can't help if you have that, but this all works for AIX 4.3.3

Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top