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
Fabrizio schrieb:
> Christian Meier wrote: >
> > 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.
#/bin/bash
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" ;;
And of course, oratab must be maintained properly.
Best regards
Maxim Received on Sat Sep 24 2005 - 12:22:16 CDT