How to make Oracle 9.2 dbora startup script [message #71983] |
Thu, 13 February 2003 16:03 |
chris m
Messages: 4 Registered: February 2003
|
Junior Member |
|
|
Hi I'm trying to make an Oracle 9.2 dbora auto startup script. All of the examples seem to be from previous versions and simply use the dbstart command which does not work for my Oracle 9.2. 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
***** 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
|
|
|
|
|