Load Oracle as Linux Standard System Services Script

xiaoxiao2021-03-06  40

[root @ Test11 root] # more /etc/init.d/oracle

#! / bin / sh

#CHKCONFIG: 2345 80 05

#description: Oracle 8 Server

ORA_HOME = / Oracle / Product / 9.2.0

ORA_OWNER = Oracle

Case "$ 1" in

"start")

Su - $ ora_owner -c "$ ora_home / bin / lsnrctl start"

Su - $ ora_owner -c "$ ora_home / bin / start.sh"

;

"stop")

Su - $ ora_owner -c "$ ora_home / bin / lsnrctl stop"

Su - $ ora_owner -c "$ ora_home / bin / shutdown.sh"

;

ESAC

[root @ TEST11 root] # more /oracle/product/9.2.0/bin/start.sh

SQLPLUS / NOLOG << EOF

Connect / as sysdba

Startup

exit

exit

Echo "Oracle Have Started"

[root @ Test11 root] # More /Oracle/Product/9.2.0/bin/shutdown.sh

SQLPLUS / NOLOG << EOF

Connect / as sysdba

Shutdown immediate

exit

exit

Echo "Oracle Have Shutdown"

#CHKCONFIG --Add Oracle

转载请注明原文地址:https://www.9cbs.com/read-69050.html

New Post(0)