在soalris下自动启动 oracle
来源:互联网 发布:cuda 编程实例 编辑:程序博客网 时间:2024/05/05 12:36
1、首先编写一个sh文件/etc/init.d/dbora,内容如下:
#!/bin/sh
# set ORACLE_HOME to be equivalent to the ORACLE_HOME
# from which you wish to execute dbstart and dbshut
#
ORA_HOME=/export/home/oracle/product/10.2.0
ORA_OWNER=oracle
#
if [ ! -f $ORA_HOME/bin/dbstart ] ; then
echo "oracle startup:cannot start"
exit
fi
case "$1" in
'start' )
su $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
;;
'stop')
su $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
esac
#
exit
2、建立启动与关闭连接
#ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
#ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora
系统启动时rc2.d文件夹下,脚本启动默认参数start
系统关闭时rc0.d文件夹下,脚本停止默认参数stop
3、dbstart脚本修改
安装之后的dbstart脚本有问题,需要根据错误提示修改
a. 修改/var/opt/oracle/oratab文件,把需要自动启动的实例的条目的最后一个字母改为“Y”
orcl:/export/home/oracle/product/10.2.0:Y
b. 修改$ORACLE_HOME/bin/dbstart脚本
Oracle 10.2.0.1.0自带的dbstart脚本根据操作系统以及系统版本的不同可能会需要进行细微的调整。在Solaris10 x86 6/06版本中你可能需要对以下进行内容:
1).修改VER10LIST变量
export VER10LIST=`$ORACLE_HOME_LISTNER/bin/lsnrctl version | grep "LSNRCTL for " | cut -d' ' -f5 | cut -d'.' -f1`拆成两行,如下所示:
VER10LIST=`$ORACLE_HOME_LISTNER/bin/lsnrctl version | grep "LSNRCTL for " | cut -d' ' -f5 | cut -d'.' -f1`
export VER10LIST
2). 修改COUNT的迭加计算表达式
COUNT=$((COUNT+1)) 替换为 ((COUNT=COUNT+1))
3).在只有系统表情况下临时屏蔽
...
#if [ -e $SPFILE -o -e $SPFILE1 -o -e $PFILE ] ; then
...
#else
# $LOGMSG ""
# $LOGMSG "Can't find init file for ${INST} /"${ORACLE_SID}/"."
# $LOGMSG "Error: ${INST} /"${ORACLE_SID}/" NOT started."
#fi
4.reboot
- 在soalris下自动启动 oracle
- SOALRIS 下卸载oracle
- soalris下 Oracle链接mysql创建DB_link
- 在Solaris下自动启动oracle|Sybase
- 在linux系统下,Oracle数据库开机后自动启动
- oracle在linux环境下的自动启动和停止
- 如何在Linux下自动启动Oracle服务
- oracle在linux下开机自动启动的配置
- linux下 Oracle自动启动
- linux 下oracle自动启动
- 在Linux下启动Oracle
- linux下 Oracle自动启动与停止
- linux下 Oracle自动启动与停止
- linux下 Oracle自动启动与停止
- linux下 Oracle自动启动与停止
- linux下 Oracle自动启动与停止
- linux下 Oracle自动启动与停止
- Linux下自动启动关闭Oracle脚本
- Lucene学习总结之二:Lucene的总体架构
- GAE存储的数据的数据管理后台
- DELPHI hint 的应用
- tomcat 配置虚拟文件夹
- mysql乱码问题
- 在soalris下自动启动 oracle
- HCI Career
- Lucene学习总结之三:Lucene的索引文件格式(1)
- qtcreator2.0.1测试
- nginx 反向代理之使用特定目录和处理程序
- 用Eclipse与弃NetBeans
- 关于2011
- Lucene学习总结之三:Lucene的索引文件格式(2)
- [推荐] 手机RAM,Flash ROM、内存概念的困惑,看你是否真的明白(转)