automatic start oracle10g script
Hi all,
I need to write a script to start and stop oracle10g database and listener automatically when system boots for linux redhat 9. can anyone help.... thanks |
Start Script for Linux:
Start Sc. for Linux
==================== 1) sript : #!/bin/bash # chkconfig: 345 99 10 # description: Oracle auto start-stop script. # # Set ORACLE_HOME to be equivalent to the $ORACLE_HOME # from which you wish to execute dbstart and dbshut; # # Set ORACLE_OWNER to the user id of the owner of the # Oracle database in ORACLE_HOME. ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 ORACLE_OWNER=oracle if [ ! -f $ORACLE_HOME/bin/dbstart ] then echo "Oracle startup: cannot start" 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_OWNER -c "$ORACLE_HOME/bin/lsnrctl start" su - $ORACLE_OWNER -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_OWNER -c $ORACLE_HOME/bin/dbshut su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop" ;; esac 2)cat /etc/inittab *:/u01/app/oracle/product/10.2.0/db_1:N orcl:/u01/app/oracle/product/10.2.0/db_1:Y 3)[root@server ~]# cd /var/opt/oracle/ [root@server oracle]# ls oratab 4)[root@server init.d]# find / -name dbora /etc/rc.d/rc3.d/dbora /etc/rc.d/rc5.d/dbora /etc/rc.d/init.d/dbora 5) chmod 750 /etc/init.d/dbora source : http://www.oracle-base.com/articles/...ownOnLinux.php |
All times are GMT -5. The time now is 04:26 PM. |