Operating System - HP-UX
1751925 Members
5336 Online
108783 Solutions
New Discussion юеВ

Re: set automatic startup and shutdown of database

 
SOLVED
Go to solution
Adrian_72
Advisor

set automatic startup and shutdown of database

My server is running database oracle 9.2.0.2 on HP 11.11

I need know how to configure my system for automaticaly startup an shutown de database when system boot..

May you help me...

Thanks
7 REPLIES 7
Sundar_7
Honored Contributor

Re: set automatic startup and shutdown of database


Copy the /sbin/init.d/template script to a file name of your choice.

Edit this file and insert the commands to start the database in the "start" section and insert the commands to halt the package in the "stop" section.

Test the script from the command line. The script should start the database if given a command line argument that reads "start" and should stop the database if given a command line argument that reads "stop"

Create symbolic links for the script in /sbin/rc?.d/ directory. The link name should start with S followed by 3 digits and a filename for the startup script.

The link name should start with K followed by 3 digits and a filename for the stop script.

Refer the document /usr/share/doc/start_up.txt. This contains detailed instructions on how to setup startup scripts.
Learn What to do ,How to do and more importantly When to do ?
Steven E. Protter
Exalted Contributor

Re: set automatic startup and shutdown of database

I'm attaching a script to help you out. It actually stats an oracle 9.2.0.4 database.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Victor Fridyev
Honored Contributor
Solution

Re: set automatic startup and shutdown of database

You can use the attached script for this.
A short explanation:
Put ora_proc file into /sbin/init.d directory and create the following links:
ln -s /sbin/init.d/ora_proc /sbin/rc2.d/K200ora
ln -s /sbin/init.d/ora_proc /sbin/rc3.d/S800ora
Don't forget
chmod +x /sbin/init.d/ora_proc
Put the string below into the file /etc/rc.config.d/oraconf.
ORACLE_START=1
Check whether the file /etc/oratab contains needed entries.
HTH

Entities are not to be multiplied beyond necessity - RTFM
Victor Fridyev
Honored Contributor

Re: set automatic startup and shutdown of database

Oops,
The attached file disappeared
Entities are not to be multiplied beyond necessity - RTFM
Adrian_72
Advisor

Re: set automatic startup and shutdown of database

I find a document for this procedure but is for system 11.0

HP-UX Version 10.x: Relevant Files /sbin/init.d/oracle -- contains the main script for doing db startup and shutdown owned by root /etc/rc.config.d/oracle -- this file enables/disables automatic startup and shutdown of the databases owned by root /sbin/rc1.d/K100oracle ->/sbin/init.d/oracle -- this link tells the system when to execute the Oracle script with the 'stop' command in single user mode during system shutdown /sbin/rc2.d/S990oracle ->/sbin/init.d/oracle -- this link tells the system when to execute the Oracle script with the 'start' command in multi-user mode during system startup All references to in this section should be replaced by the userid of the Oracle installation owner, and all references to <$ORACLE_HOME> should be replaced by the path to which $ORACLE_HOME points. o Create an executable script /sbin/init.d/oracle for the startup and shutdown of Oracle Your script should attempt to start the database with the following command: su - -c <$ORACLE_HOME>/bin/dbstart Your script should attempt to shut the database with the following command: su - -c <$ORACLE_HOME>/bin/dbshut Make sure that the script is owned and executable only by the super user. For an example of the complete script, refer to page 6-12 of the 7.2.2 Installation and Configuration Guide for HP 9000 series. o Create the file /etc/rc.config.d/oracle This file should contain: ORACLE_START=1 export ORACLE_START o Edit /etc/oratab ORACLE_SID:ORACLE_HOME:Y|N where Y or N indicates whether you want the dbstart and dbshut scripts to be run o Make /sbin/rc1.d/K100oracle a symbolic link to /sbin/init.d/oracle o Make /sbin/rc2.d/S990oracle a symbolic link to /sbin/init.d/oracle


Do you know any procedure for HP-UX 11.11

Thanks
Sundar_7
Honored Contributor

Re: set automatic startup and shutdown of database

There are no significant differences to the startup/sequencer scripts between 11.0 and 11.11. (atleast not that I am aware of).

You can pretty much follow what has been outlined in the document.
Learn What to do ,How to do and more importantly When to do ?
Adrian_72
Advisor

Re: set automatic startup and shutdown of database

Thank you very much

I execute the procedure of VICTOR and really running

see you