cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle Automatic startup

jpcast_real
Regular Advisor

Oracle Automatic startup

Can anyone tell me what do I have to consider to create the automatic startup of an Oracle db from the O.S or from SG . I mean , user , environment , etc .. Can anyone give me an example
Here rests one who was not what he wanted and didn't want what he was
6 REPLIES
Mark Grant
Honored Contributor

Re: Oracle Automatic startup

It's simple.

You just create a small script to source your oracle profile ". /oracle/.profile" export your ORACLE_SID and then run sqlplus such as

sqlplus <
Never preceed any demonstration with anything more predictive than "watch this"
Vijaya Kumar_3
Respected Contributor

Re: Oracle Automatic startup

Refer Oracle installation notes:

http://www.cs.nott.ac.uk/TSG/manuals/databases/oracle/standard/a90346/post-ins.htm#1035371
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Indira Aramandla
Honored Contributor

Re: Oracle Automatic startup

Hi,

The following list summarizes the functions performed by the different Oracle startup and shutdown scripts (which are invoked during system startup and shutdown, respectively).

$ORACLE_HOME/bin/dbstart
To ensures a clean startup of database instance(s),even after system failure

$ORACLE_HOME/bin/dbshut
To ensures a clean shutdown for data base instances

/etc/oratab or /var/opt/oracle/oratab
This file contains a field that specifies whether a particular database instance should be brought up/down at system startup/shutdown time. By
specifying "Y" in this field, the "dbstart" and "dbshut" scripts bring this database instance up or down.


System Procedures
System V initialization scripts are contained in /etc/rc.d directories where "n" is the run-level value of the script. A run-level of 0 usually signifies power shutdown mode, while a run-level of 2 signifies multi-user mode.

The directories contain initialization scripts such as "S75cron" and "K30tcp". These scripts are named using the following method:

[K or S][two-digit number][descriptive filename]

Names starting with "S" indicate scripts that are called at startup; names starting with "K" indicate scripts that are called at shutdown time.

Scripts containing larger numbers in their names are executed after those with lower numbers. Oracle startup scripts typically contain larger numbers in their names, such as "S99oracle", indicating that the script should be run after the system has been started up. Oracle shutdown script names, on the other hand, usually contain smaller numbers, such as "K01oracle" indicating that the script should be run before system shutdown

Relevant Files

/etc/inittab -- Controls the initialization process
/sbin/rc3 -- Script to start/stop processes at run level 3
/sbin/rc0 -- Script to start/stop processes at run level 0
/sbin/rc3.d/S99oracle -- Link to the script /sbin/init.d/oracle
/sbin/rc0.d/K01oracle -- Same as above

scripts dbstart /dbshut will contain the lines as Mark mentioned above.


I hope this helps.
Never give up, Keep Trying
John Flanagan
Regular Advisor

Re: Oracle Automatic startup

check your /etc/oratab. this file will tell the boot script which instances to start.

You should have a file like /sbin/rc3.d/S930dbadmin. This is the script that processes the /etc/oratab. If you do not you will have to create it.

You may also need to start the listener. The file for this is /sbin/rc3.d/S940tcplsnr.

Regards,

John.
R. Allan Hicks
Trusted Contributor

Re: Oracle Automatic startup

One additional thing about oratab.

It will be in the form

ORACLE_SID:ORACLE_HOME:(Y/N)

example:

ORCL:/home/ora_home:Y

The above will allow dbstart and dbshut to operate on the instance (ORCL).

ORCL:/home/ora_home:N

The above will prevent dbstart and dbshut from operating.

"Only he who attempts the absurd is capable of achieving the impossible
Steven E. Protter
Exalted Contributor

Re: Oracle Automatic startup

You need to set the following variables int he ORACLE startup script to have work right.

ORACLE_HOME
ORACLE_SID
PATH (Must include the ORACLE binaries)


some apps require

SHLIB_PATH

You can attempt to load the oracle user profile in the script but you'll need to set the SID for each database you are actually starting.

. /home/oracle/.profile

Loads the default oracle user profile

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