Question: I have five
instances on my Oracle HP/UX Server and I want to know how to automate
the startup of Oracle when the HP/UX server and HP/UX OS are
re-booted. How can I make Oracle
start automatically in HP/UX?
For pre-written and pre-tested Oracle auto start scripts see
the Oracle script download.
two HP/UX scripts that assist DBAs with starting and stopping the
HP/UX-based database: dbstart and dbshut.
dbstart utility reads the oratab file, shown in the example below.
The oratab file will reside in /etc. It contains three data items
separated by colons:
oracle > cat /etc/oratab| wc -l
oracle > cat /etc/oratab
Above we see that there are three instances on this
server, all on different releases of Oracle and the Oracle10g is
marked "N", so that database will not re-start when the HP/UX OS
1 - The first field is the Oracle SID.
- The second field is the home directory for that Oracle SID.
3 - The third column is a Y or N instructs Oracle
whether to start or stop the particular database when either the
dbstart or dbshut command is issued. The dbstart command simply
parses the oratab file and starts those databases that have a Y in
the third field. It also uses the ORACLE_HOME specified in the file
to connect internally to the database and issue the startup command.
The dbstart command can be added to the HP/UX
servers? initialization or run level scripts. This enables dbstart
to be executed each time the machine is booted or when it changes
run levels. The method for implementing this is platform specific,
as we see below.
Auto Start on HP/UX
For HP-UX version 10
and above, the system initialization scripts are contained in
/etc/rc<n>.d directories, where
?n? is the operating system run-level. These directories contain scripts that
begin with a K or S, followed by a number, and then a file name (S75cron). All
scripts that begin with 's? are executed at system startup in ascending order of
their number. Scripts beginning with ?K? (Kill)
are called at system shutdown time.
As a general rule of
thumb, the Oracle startup script should have a high sequence number
(S99dbstart), which will ensure that other system processes have been started
prior to Oracle. Likewise, the kill
scripts should have a low sequence number in order to shutdown
Oracle early in the process (K01dbshut).
Automating Oracle re-start within shell
Please see these important notes on embedding
Oracle re-start details within the
oraenv utility .
For more information on stopping and starting Oracle
"Oracle Shell Scripting" by Jon Emmons.
Get the Complete
Oracle SQL Tuning Information
The landmark book
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
for 30% off directly from the publisher.