Oracle开机自启动到mount(DG单机目标端)

写了个小脚本,用在DG备端开机自启动:

#!/bin/sh
#db auto be mount status when os restart
#20151224

su - oracle -c 'sqlplus / as sysdba'<<EOF

startup nomount;
alter database mount standby database;
alter database recover managed standby database using current logfile disconnect from session;
EOF

su - oracle -c 'lsnrctl start'

写到一个sh文件中,给x权限,然后把脚本放到rc.local里,就可以了!!

你可能感兴趣的:(Oracle开机自启动到mount(DG单机目标端))