- 论坛徽章:
- 0
|
hp-ux下服务器重启时启动oracle不成功
create a shell file as below in /sbin/init.d, then ln the file in /sbin/rc3.d:
#!/usr/bin/sh
ORACLE_HOME=/oracle/product/9.2.0
ORACLE_OWNER=oracle
if [ -f $ORACLE_HOME/bin/dbstart ]
then
case "$1" in
'start')
/usr/bin/su - "$ORACLE_OWNER" -c "$ORACLE_HOME/bin/dbstart"
/usr/bin/su - "$ORACLE_OWNER" -c "$ORACLE_HOME/bin/lsnrctl start"
;;
'stop')
/usr/bin/su - "$ORACLE_OWNER" -c "$ORACLE_HOME/bin/lsnrctl stop"
/usr/bin/su - "$ORACLE_OWNER" -c "$ORACLE_HOME/bin/dbshut"
;;
esac
fi |
|