Operating System - HP-UX
1758563 Members
1738 Online
108872 Solutions
New Discussion юеВ

Init scripts for Oracle startup/shutdown on reboot

 
SOLVED
Go to solution
pc123_1
Frequent Advisor

Init scripts for Oracle startup/shutdown on reboot

Hi.
I need to configure Oracle for automatic startup/shutdown on reboot (hp-ux 11.0).

The oracle doc gives the following guidelines:

1. In the /etc/init.d directory, create a dbora script similar to the following, if it does not already exist.

-- There isn't init.d directory in /etc

2. Create symbolic links to the dbora script in the appropriate run-level script directories, as follows:

# ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
# ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora

Again, there are no rc0.d and rc3.d directories.

What do I have to do? Create them, or there are other files for hp-ux 11.0. I'm not sysadmin, so questions might seem too simple for most of you.
12 REPLIES 12
U.SivaKumar_2
Honored Contributor

Re: Init scripts for Oracle startup/shutdown on reboot

Hi,
In HP-UX , you have init.d under /sbin/init.d
you need not create symbolic links as rc*.d
directories are under /sbin itself.

There is one more file /etc/oratab which controls the startup of oracle instance at bootup.
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should, "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
example entry:-

D01:/oracle/D01:Y

will allow the oracle instance to be brought up at system bootup.

regards,
U.SivaKumar

Innovations are made when conventions are broken
pc123_1
Frequent Advisor

Re: Init scripts for Oracle startup/shutdown on reboot

Hi,
Thank you for replying.
Is there any meaning in numbers rc3.d? Does 3 mean anything? Are all rcYYY links executing on reboot?
U.SivaKumar_2
Honored Contributor

Re: Init scripts for Oracle startup/shutdown on reboot

Hi,
Yes , there is a meaning for rc2.d , rc0.d etc
rc2.d means the directory which contains scripts which will be executed in run-level 2 and so on.
S99dbora means S-start script 99-unique number
K10dbora means K-kill (stop) script 10-unique number

regards,
U.SivaKumar
Innovations are made when conventions are broken
Ravi_8
Honored Contributor

Re: Init scripts for Oracle startup/shutdown on reboot


Hi,
I hope that you are referring to oracle on solaris. In HP it's like this.

Make sure the entry for your database SID in the /etc/oratab file ends in a capital "Y".

ORCL:/u01/app/oracle/product/8.0.5:Y


The scripts for starting and stopping databases are: $ORACLE_HOME/bin/dbstart and dbshut. Net8 is started with the lsnrctl command. Add the following entries to your /etc/rc2.d/S99dbstart (or equivalent) file:

su - oracle -c "/path to/$ORACLE_HOME/bin/dbstart" # Start DB's
su - oracle -c "/path to/$ORACLE_HOME/bin/lsnrctl start" # Start listener
su - oracle -c "/path to/$ORACLE_HOME/bin/namesctl start" # Start OraNames (optional)

never give up
pc123_1
Frequent Advisor

Re: Init scripts for Oracle startup/shutdown on reboot

Hi.
I've done all the step, however oracle fails to start.

I started it manualy from prompt
$ORACLE_HOME/bin/dbstart
however i get error message

Cannot find init file for database DBNAME.

The pfile is in the correct $ORACLE_BASE/admin/dbname folder.
Ravi_8
Honored Contributor
Solution

Re: Init scripts for Oracle startup/shutdown on reboot

Hi,


login as oracle
$cd $ORACLE_HOME/dbs

If u have created a instance by name 'x' there should be a file by name 'initx.ora'. Since you are getting error as .ora file doesn't exist,
$cp init.ora initx.ora
$vi initx.ora
change the db_name to instance name
(in this case: db_name=x)
save and close the file
$ cd
$ dbstart
Now the instance 'x' must start.



never give up
pc123_1
Frequent Advisor

Re: Init scripts for Oracle startup/shutdown on reboot

Thank you very much!
Now it is starting ok.
Yogeeraj_1
Honored Contributor

Re: Init scripts for Oracle startup/shutdown on reboot

 
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
pc123_1
Frequent Advisor

Re: Init scripts for Oracle startup/shutdown on reboot

Thank you very much for your response.
Is there an example oracle startup script that would solve the above mention issues. The oracle script that comes with docs, as you pointed out in your post, doesn't work, and hangs.