当前位置: 技术问答>linux和unix
高手帮忙solaris中oracle的启动脚本
来源: 互联网 发布时间:2015-09-15
本文导语: case "$1" in 'start') /bin/echo "$0 : (start)" su - oracle -C "/oracle/u01/app/oracle/product/10.1.0/db_2/bin/lsnrctl start" su - oracle -C "/oracle/u01/app/oracle/product/10.1.0/db_2/bin/dbstart" chmod 17...
case "$1" in
'start')
/bin/echo "$0 : (start)"
su - oracle -C "/oracle/u01/app/oracle/product/10.1.0/db_2/bin/lsnrctl start"
su - oracle -C "/oracle/u01/app/oracle/product/10.1.0/db_2/bin/dbstart"
chmod 1777 /tmp
chown sys:sys /tmp
exit 0
;;
'stop')
/bin/echo "$0 : (stop)"
su - oracle -C "/oracle/u01/app/oracle/product/10.1.0/db_2/bin/lsnrctl stop"
su - oracle -C "/oracle/u01/app/oracle/product/10.1.0/db_2/bin/dbshut"
exit 0
;;
*)/bin/echo"
/bin/echo "Usage: $0 [start|stop]"
/bin/echo " Invalid argument ==> "$1""
/bin/echo ''
exit 0
;;
esac
有问题么,为什么oracle不能自动启动呢?
'start')
/bin/echo "$0 : (start)"
su - oracle -C "/oracle/u01/app/oracle/product/10.1.0/db_2/bin/lsnrctl start"
su - oracle -C "/oracle/u01/app/oracle/product/10.1.0/db_2/bin/dbstart"
chmod 1777 /tmp
chown sys:sys /tmp
exit 0
;;
'stop')
/bin/echo "$0 : (stop)"
su - oracle -C "/oracle/u01/app/oracle/product/10.1.0/db_2/bin/lsnrctl stop"
su - oracle -C "/oracle/u01/app/oracle/product/10.1.0/db_2/bin/dbshut"
exit 0
;;
*)/bin/echo"
/bin/echo "Usage: $0 [start|stop]"
/bin/echo " Invalid argument ==> "$1""
/bin/echo ''
exit 0
;;
esac
有问题么,为什么oracle不能自动启动呢?
|
#!/bin/sh
ORAHOME=/opt/oracle/product/8.1.7
ORAOWNER=oracle
if [ ! -f $ORAHOME/bin/dbstart ] ;
then
echo "ERROR: Cannot start Oracle Database Server"
fi
case "$1" in
"start")
echo "Starting Oracle Database... c"
su - $ORAOWNER -c "$ORAHOME/bin/lsnrctl start" > /dev/null
su - $ORAOWNER -c $ORAHOME/bin/dbstart > /dev/null
echo "Done."
;;
"stop")
echo "Stopping Oracle Database... c"
su - $ORAOWNER -c $ORAHOME/bin/dbshut > /dev/null
su - $ORAOWNER -c "$ORAHOME/bin/lsnrctl stop" > /dev/null
echo "Done."
;;
"")
echo "You must tell what you want me to do."
echo "Usage : ./dbora [start | stop ]"
echo " start - Start Oracle Database immediately"
echo " stop - Stop Oracle Database immediately"
;;
esac
exit
ORAHOME=/opt/oracle/product/8.1.7
ORAOWNER=oracle
if [ ! -f $ORAHOME/bin/dbstart ] ;
then
echo "ERROR: Cannot start Oracle Database Server"
fi
case "$1" in
"start")
echo "Starting Oracle Database... c"
su - $ORAOWNER -c "$ORAHOME/bin/lsnrctl start" > /dev/null
su - $ORAOWNER -c $ORAHOME/bin/dbstart > /dev/null
echo "Done."
;;
"stop")
echo "Stopping Oracle Database... c"
su - $ORAOWNER -c $ORAHOME/bin/dbshut > /dev/null
su - $ORAOWNER -c "$ORAHOME/bin/lsnrctl stop" > /dev/null
echo "Done."
;;
"")
echo "You must tell what you want me to do."
echo "Usage : ./dbora [start | stop ]"
echo " start - Start Oracle Database immediately"
echo " stop - Stop Oracle Database immediately"
;;
esac
exit