oracle10g在redhat4 下面的启动脚本
2007-11-12 14:36
316 查看
项目中需要用到一个在oracle下面能自动启动的脚本,在网上转了一圈之后经过测试和整理得到如下脚本
#!/bin/sh
#
# chkconfig: 35 95 1
# description: init script to start/stop oracle database 10g, TNS listener, EMS
#
#
# match these values to your environment:
export ORACLE_USER=oracle
# see how we are called:
case $1 in
start)
su - "$ORACLE_USER"<<EOO
lsnrctl start
sqlplus /nolog<<EOS
connect / as sysdba
startup
EOS
emctl start dbconsole
EOO
;;
stop)
su - "$ORACLE_USER"<<EOO
lsnrctl stop
sqlplus /nolog<<EOS
connect / as sysdba
shutdown immediate
EOS
emctl stop dbconsole
EOO
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
#!/bin/sh
#
# chkconfig: 35 95 1
# description: init script to start/stop oracle database 10g, TNS listener, EMS
#
#
# match these values to your environment:
export ORACLE_USER=oracle
# see how we are called:
case $1 in
start)
su - "$ORACLE_USER"<<EOO
lsnrctl start
sqlplus /nolog<<EOS
connect / as sysdba
startup
EOS
emctl start dbconsole
EOO
;;
stop)
su - "$ORACLE_USER"<<EOO
lsnrctl stop
sqlplus /nolog<<EOS
connect / as sysdba
shutdown immediate
EOS
emctl stop dbconsole
EOO
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
相关文章推荐
- Redhat_as4_oracle10g自启动脚本设置
- Ubuntu/Debian与REDHAT系统启动脚本之对照
- ubuntu终端下面用startup.sh脚本启动tomcat报错
- RedHat系列开机启动脚本顺序
- redhat 5.5 linux oracle db 停止与启动脚本
- Redhat5 安装oracle10g 启动测试
- 解决Nginx启动脚本在redhat上不兼容问题
- Redhat RHEL Tomcat init script(tomcat在linux下自动启动初始化脚本)
- redhat中如何设置开机启动脚本
- Memcached启动脚本
- tomcat启动脚本
- httpd系统自带启动脚本详解
- Hadoop 2.2.0启动脚本——libexec/hadoop-config.sh
- shell脚本启动应用,自动获得pid删除进程应用
- Shell实现的Oracle启动脚本分享
- linux下用脚本监测tomcat停止并且自动启动
- redis启动脚本
- MySQL 多实例启动和关闭脚本
- Oracle10g服务“启动”和”停止“的bat文件
- memcached的启动脚本