设为首页
收藏本站
开启辅助访问
切换到窄版
登录
立即注册
中问网首页
我的收藏
站长博客
搜索
搜索
本版
帖子
用户
第一问答网
»
论坛
›
中问网
›
问答
›
Oracle 10 在 Linux 下设置系统启动时自动启动 ...
返回列表
发新帖
Oracle 10 在 Linux 下设置系统启动时自动启动
[复制链接]
11
|
6
|
2010-3-1 11:20:04
|
显示全部楼层
|
阅读模式
编辑/etc/oratab文件,将orcl:/opt/oracle/product/10.2.0/db_1:N改为orcl:/opt/oracle/product/10.2.0/db_1:Y
在/etc/rc.d/init.d目录下配置oracle服务文件,执行下列命令:
touch oracle //创建文件
chmod a+x oracle //设置可执行权限
添加以下内容:
#!/bin/bash
#description:starts the oracle database deamons
ORA_HOME="/opt/oracle/product/10.2.0/db_1"
ORA_OWNER="oracle"
case $1 in
'start')
echo -n "***Starting Oracle***"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
;;
'stop')
echo -n "***Stopping Oracle***"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
;;
'restart')
echo -n "***Restarting Oracle***"
$0 stop
$0 start
;;
'isqlstart')
echo "***Starting Oracle iSQL PLus***"
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl start"
echo "*** Note:You can access service at url:http://$(hostname):5560/isqlplus"
;;
'isqlstop')
echo "***Stopping Oracle iSQL Plus***"
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl stop"
;;
'emstart')
echo "***Starting Oracle Enterprise Manager 10g Database control***"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
echo "Note:You can access service as url:http://$(hostname):1158/em"
;;
'emstop')
echo "***Stopping Oracle Enterprise Manager 10g Database control***"
su - $ORA_OWNER -c "ORA_HOME/bin/emctl stop dbconsole"
;;
'*')
echo "Usage:$0 {start|stop|isqlstart|isqlstop|emstart|emstop}"
exit 1
esac
exit 0
执行下列命令测试:
/etc/rc.d/init.d/oracle start
/etc/rc.d/init.d/oracle stop
测试成功后,执行下列命令添加到系统服务中:
chkconfig –add oracle
chkconfig –list oracle
重新启动服务器。
回复
使用道具
举报
千问
|
2010-3-1 11:20:04
|
显示全部楼层
我一般手工起动!
回复
使用道具
举报
千问
|
2010-3-1 11:20:04
|
显示全部楼层
不错。支持一下。
回复
使用道具
举报
千问
|
2010-3-1 11:20:04
|
显示全部楼层
顶一下。
回复
使用道具
举报
千问
|
2010-3-1 11:20:04
|
显示全部楼层
按照你的方法,我没有成功。
我的环境:RHEL4update5 64位,oracle10.2.0.1 两个节点的RAC。
回复
使用道具
举报
千问
|
2010-3-1 11:20:04
|
显示全部楼层
按照你的方法,我没有成功。
我的环境:RHEL4update5 64位,oracle10.2.0.1 两个节点的RAC。
回复
使用道具
举报
千问
|
2010-3-1 11:20:04
|
显示全部楼层
顶一下
回复
使用道具
举报
返回列表
发新帖
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
立即注册
本版积分规则
发表回复
回帖后跳转到最后一页
千问
主题
0
回帖
4882万
积分
论坛元老
论坛元老, 积分 48824836, 距离下一级还需 -38824837 积分
论坛元老, 积分 48824836, 距离下一级还需 -38824837 积分
积分
48824836
加好友
发消息
回复楼主
返回列表
问答
热门排行