自启动文件
#!/bin/sh
#
export ORACLE_HOME=/oracle/10g
export ORACLE_HOME_LISTNER=/oracle/10g
export RACLE=oracle
. /etc/init.d/functions
export PATH=${PATH}:$ORACLE_HOME/bin
start()
{
daemon --user $ORACLE $ORACLE_HOME/bin/dbstart
daemon --user $ORACLE "$ORACLE_HOME_LISTNER/bin/lsnrctl start"
}
stop()
{
daemon --user $ORACLE "$ORACLE_HOME_LISTNER/bin/lsnrctl stop"
daemon --user $ORACLE $ORACLE_HOME/bin/dbshut
}
case $1 in
'start')
start
RETVAL=$?
;;
'stop')
stop
RETVAL=$?
;;
'restart')
stop
start
RETVAL=$?
;;
*)
echo "usage: $0 {start|stop|restart}"
exit
;;
esac
#
exit
自启动实例
orcl:/oracle/10g:Y
注意
/etc/hosts主机名的IP地址
lsnrctl start stop status
sqlplus / as sysdba
>startup
>shutdown
tnsping orcl
lsnrctl service orcl
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25966/viewspace-620398/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25966/viewspace-620398/