ITPub博客

首页 > Linux操作系统 > Linux操作系统 > rc.local

rc.local

原创 Linux操作系统 作者:guocun09 时间:2011-12-08 15:59:14 0 删除 编辑

主庫:
[root@PCEEMD3SFCDB ~]# more  /etc/rc.local
#!/bin/sh
#
# This script. will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style. init stuff.

touch /var/lock/subsys/local
#set oracle environment

ORACLE_HOME=/u01/product/oracle;export ORACLE_HOME
ORACLE_SID=emd3;export ORACLE_SID

su oracle -c "/u01/product/oracle/bin/sqlplus /nolog <connect / as sysdba
startup;
exit
EOF"

su oracle -c "/u01/product/oracle/bin/lsnrctl <start
exit
EOF"

 

備庫
[root@amsimoldsty home]# more /etc/rc.local
#!/bin/sh
#
# This script. will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style. init stuff.

touch /var/lock/subsys/local
ORACLE_HOME=/u01/product/oracle;export ORACLE_HOME
ORACLE_SID=amsimold;export ORACLE_SID

su oracle -c "/u01/product/oracle/bin/sqlplus /nolog <connect / as sysdba
startup nomount;
alter database mount standby database;
exit
EOF"

#su oracle -c "/u01/product/oracle/bin/lsnrctl <#start
#exit
#EOF"

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25583515/viewspace-712964/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: sh checkdb.sh
请登录后发表评论 登录
全部评论
DBA,掌握Oracle,SQLServer,MySQL,hadoop,casscandra等数据库。喜爱深入研究数据库技术原理,擅长管理和优化工作。

注册时间:2011-10-02

  • 博文量
    177
  • 访问量
    686671