Change the third column value in/etc/oratab to Y, default to N, or to W
The format is as follows: orcl:/u01/oracle/product/11.2/db_1:Y
Write startup services, create in/etc/init.d/
Simple as follows:
#!/bin/sh
Opt_=$1
Case ' $OPT _ ' in
Start
/bin/echo "$: (start)"
Su-oracle-c "/u01/oracle/product/11.2/db_1/bin/lsnrctl Start"
Su-oracle-c "/u01/oracle/product/11.2/db_1/bin/dbstart"
Exit 0
;;
Stop
/bin/echo "$: (stop)"
Su-oracle-c "/u01/oracle/product/11.2/db_1/bin/lsnrctl Stop"
Su-oracle-c "/u01/oracle/product/11.2/db_1/bin/dbshut"
Exit 0
;;
*)
/bin/echo "
/bin/echo "usage:$0 (start|stop)"
/bin/echo "Invalid argument ==> \" $OPT _\ ""
/bin/echo "
Exit
;;
Esac
Set random start to close soft connection
Need to view the current boot level/etc/inittab last line
to the corresponding directory structure execution:
Ln-s/etc/init.d/start_shut s99oracle
Ln-s/etc/init.d/start_shut k01oracle
This article is from the "8016776" blog, please be sure to keep this source http://8026776.blog.51cto.com/8016776/1695947
Oracle custom services, starting and shutting down with the operating system