首先必须启动DG_BROKER_START
ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;
创建一个批处理文件:
set ORACLE_HOME=D:\app\Administrator\product\11.2.0\dbhome_2
set ORACLE_SID=HYDEE
set PATH=%PATH%;%ORACLE_HOME%\bin;%ORACLE_HOME%\opatch
dgmgrl / "startup"
sqlplus sys/密码@192.168.10.223/hydee AS SYSDBA @D:\oracle-scripts\start_apply_log.txt
其中start_apply_log.txt内容为:
alter database recover managed standby database using current logfile disconnect;
然后创建一个系统启动时的计划任务:
网站标题:windows操作系统重启时自动启用备库日志应用
链接URL:
http://njwzjz.com/article/pgsjse.html