Oracle 9.2 dbora auto startup script at boot [message #97812] |
Thu, 13 February 2003 13:26 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
chris m
Messages: 4 Registered: February 2003
|
Junior Member |
|
|
Hi I'm trying to make an Oracle 9.2 dbora auto startup script that will startup both the database and the listener upon system boot. All of the examples seem to be from previous versions and simply use the dbstart command in the script which does not work for me. I have the following line in my oratab file:
qa00:/opt/oracle/product/9.2.0.1:Y
I normally start up oracle by:
1. sqlplus /nolog
2. connect sys/password as sysdba
3. startup path_to_initfile.ora
How can you set it up so that you can pass sqlplus the "connect as sysdba" paramater in a startup script?
Here is the /etc/init.d/dbora file that I was trying to use with links to it from /etc/rc3.d/S99dbora and /etc/rc0.d/K10dbora.
Note dbstart does exist on my server in the location listed below for my script.
***** Start dbora script *****
#!/sbin/sh
ORACLE_HOME=/opt/oracle/product/9.2.0.1
ORACLE_ID=oracle9
if [[ ! -f $ORACLE_HOME/bin/dbstart ]]
then
echo "Oracle startup: cannot start; unable to find dbstart"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORACLE_ID -c "$ORACLE_HOME/bin/lsnrctl start &"
su - $ORACLE_ID -c $ORACLE_HOME/bin/dbstart &
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORACLE_ID -c "$ORACLE_HOME/bin/lsnrctl stop &"
su - $ORACLE_ID -c $ORACLE_HOME/bin/dbshut &
;;
esac
***** End of script *****
Thank you for your suggestions and or code examples
-chris
|
|
|
|