Home » RDBMS Server » Server Utilities » How to make Oracle 9.2 dbora startup script
How to make Oracle 9.2 dbora startup script [message #71983] Thu, 13 February 2003 16:03 Go to next message
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
Re: How to make Oracle 9.2 dbora startup script [message #71984 is a reply to message #71983] Thu, 13 February 2003 16:51 Go to previous messageGo to next message
Chris
Messages: 128
Registered: November 1998
Senior Member
This script does work, just had a typo in my dbstart script.
:-)
sorry about the double post, my browser was acting up [message #71986 is a reply to message #71983] Fri, 14 February 2003 13:16 Go to previous message
chrism
Messages: 2
Registered: February 2003
Junior Member
No Message Body
Previous Topic: LOCK_SGA - Shared Memory Segments - Solaris 2.5 - ORA-27125
Next Topic: OCP papers
Goto Forum:
  


Current Time: Tue May 14 23:10:34 CDT 2024