免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2355 | 回复: 2

请版主帮忙看这个oracle启动脚本,错在哪里呢? [复制链接]

论坛徽章:
0
发表于 2007-08-21 18:14 |显示全部楼层
redhat as 4.0 u2 + oracle 10g (64位平台)

#!/bin/sh

# description: Oracle auto start-stop script.
# chkconfig: - 20 80
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME=/opt/oracle/product/10g
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case $1 in
"start")
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
;;
"stop")
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
"restart")
$0 stop
$0 start
;;
*)
echo "Usage: $0 start|stop|restart|reload"
exit 1
;;
esac
exit 0

[ 本帖最后由 陈非非飞 于 2007-8-21 18:15 编辑 ]

论坛徽章:
0
发表于 2007-08-21 18:38 |显示全部楼层
出错信息呢?

论坛徽章:
0
发表于 2007-08-23 09:21 |显示全部楼层
原帖由 陈非非飞 于 2007-8-21 18:14 发表
redhat as 4.0 u2 + oracle 10g (64位平台)

#!/bin/sh

# description: Oracle auto start-stop script.
# chkconfig: - 20 80
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which ...

oracle自启动,要修改/etc/oratab 文件

将SID对应的哪一样的 N 改为 Y
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP