• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

RedHat Linux下Oracle启动脚本的建立 dbstart oracle8.1.6

发布: 2007-7-02 11:08 | 作者: admin | 来源: | 查看: 8次 | 进入软件测试论坛讨论

领测软件测试网 RedHat Linux下Oracle启动脚本的建立
2001-06-05 8:25
发布者:Crystal 阅读次数:102 一、修改$ORACLE_HOME/bin/dbstart脚本
首先测试你的$ORACLE/bin/dbstart脚本,如果能正常启动Oracle,请跳到第二部分。
本人运行环境为RedHat7.1+Oracle8.1.6,发现dbstart脚本有问题,不能得到当前运行的Oracle的版本号。编辑dbstart,找到
STATUS=1
if [ "$VERSION" = "8.1" ]
在之前加上
VERSION="8.1"

二、建立/etc/init.d/oracle脚本如下:#!/bin/bash
#
# oracle This shell script takes care of starting and stopping
# the MySQL subsystem (mysqld).
#
# chkconfig: - 90 10
# description: Oracle database server.
# processname: oracle

ORA_HOME=/home/oracle
ORA_OWNER=oracle

prog="Oracle"

# Source function library.
. /etc/rc.d/init.d/functions

if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi

start(){
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart >/dev/null 2>&1 &
ret=$?
if [ $ret -eq 0 ]; then
action $"Starting $prog: " /bin/true
else
action $"Starting $prog: " /bin/false
fi
[ $ret -eq 0 ] && touch /var/lock/subsys/oracled
return $ret
}

stop(){
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut >/dev/null 2>&1
ret=$?
if [ $ret -eq 0 ]; then
action $"Stopping $prog: " /bin/true
else
action $"Stopping $prog: " /bin/false
fi
[ $ret -eq 0 ] && rm -f /var/lock/subsys/oracled
return $ret
}
restart(){
stop
start

}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
condrestart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
三、运行命令chkconfig --add oracle,注册系统服务,然后就可以用ntsysv命令来管理你的Oracle服务了。

四、可以到
http://fancao.oso.com.cn/script/dbstart
http://fancao.oso.com.cn/script/oracle
下载本文所提及文件。
作者:凡草0515

来源:奥索

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网