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 <
startup;
exit
EOF"
su oracle -c "/u01/product/oracle/bin/lsnrctl <
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 <
startup nomount;
alter database mount standby database;
exit
EOF"
#su oracle -c "/u01/product/oracle/bin/lsnrctl <
#exit
#EOF"