Showing results for 
Search instead for 
Did you mean: 

Oracle Automatic startup

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
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:
Known is a drop, unknown is ocean - visit me at
Indira Aramandla
Honored Contributor

Re: Oracle Automatic startup


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

To ensures a clean startup of database instance(s),even after system failure

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.


R. Allan Hicks
Trusted Contributor

Re: Oracle Automatic startup

One additional thing about oratab.

It will be in the form




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


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.

PATH (Must include the ORACLE binaries)

some apps require


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

Steven E Protter
Owner of ISN Corporation