Chinaunix首页 | 论坛 | 博客
  • 博客访问: 79378
  • 博文数量: 38
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 360
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-11 14:02
文章分类
文章存档

2017年(38)

我的朋友

分类: Oracle

2017-12-07 13:48:13

主庫:
[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"

阅读(1145) | 评论(0) | 转发(0) |
0

上一篇:sh checkdb.sh

下一篇:wait event:gc buffer busy

给主人留下些什么吧!~~