Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.server -> Re: How to autostart Oracle 10g on SuSE 9.3

Re: How to autostart Oracle 10g on SuSE 9.3

From: Maxim Demenko <>
Date: Sat, 24 Sep 2005 19:22:16 +0200
Message-ID: <dh4205$a8t$04$>

Fabrizio schrieb:

> Christian Meier wrote:

>> Hello!
>> I am not able to get my Oracle 10g Database starting on System startup.
>> Listerner and emctl are running very vell but the Databases i have to
>> start by foot. At this time I have the following 2 Shellscripts in
>> rc.d/rc5.d/
>> export ORACLE_HOME=/opt/oracle/product/10gR2
>> export ORACLE_SID=oracle
>> su oracle -c '$ORACLE_HOME/bin/emctl start dbconsole'
>> and I have also placed a Symlink of Oracles dbstart into the
>> rc5.d/S24dbstart
>> How can I start the Databases automatically??
>> THX!
>> Christian Meier
> Suse provides the orarun packages containing the start and stop script 
> (but they lack support for some 10g components like dbconsole).
> Make sure that the DB you want to start automatically are marked with Y 
> in your oratab:
> ln -s /etc/oratab /var/opt/oracle/oratab
> if you have a "bugged" oracle version.
> Regards

If i understood it correctly, it will never work on this way, because it is a symphony of errors.

At the moment of execution S25 script will nothing know about environment was set in the S01 script ( the lifetime of those variables end with the S01 script ). Btw, those numbers don't ensure, the scripts will be executed in supposed order ( i.e. 01,24,25 ) - IIRC.

Yet another point - putting a symlink into rc directory to dbstart. It will cause execution of dbstart by user root, if root isn't in 'dba' group ( usually it is not the case ), instance will not start due to insufficient privileges ( ORA-01031 ), what happens if the root is actually in the 'dba' group and can start the instance - i will not even spent time to try it ( i had enough headache to find out , what was wrong when operators from datacenter started listener as root - they usually do almost all as root )

To start the database with dbstart utility one don't need export ORACLE_SID - it takes all available instances from the oratab. ORACLE_HOME doesn't need to be exported as well, only to shorten the path to dbstart utility.

To set the environment persistent , the environment script must be put into /etc/profile.d . If you don't like to set this environment permanently, but only for execution of dbstart - you need do it within *one* rc script - i.e.

export ORACLE_HOME=....
export ORACLE_OWNER=....
# now very simplified somewhat like this... case "$1" in

   'start') su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart"

            su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"

   'stop) .......

And of course, oratab must be maintained properly.

Best regards

Maxim Received on Sat Sep 24 2005 - 12:22:16 CDT

Original text of this message