oracle +ADG同步,其中备库重启后,正常状态应该为READ ONLY WITH APPLY,
如果备库状态是mounted,应该实行实时应用重做
查看监听状态
lsnrctl status
登录数据库
sqlplus / as sysdba
查看备库当前状态
SQL> select open_mode from v$database;
OPEN_MODE
----------------------------------------
MOUNTED -----------服务器重启导致数据库未open
查看备库同步状态
SQL> select pid,process,status,sequence# from v$managed_standby;
PID PROCESS STATUS SEQUENCE#
---------- ------------------ ------------------------ ----------
4448 ARCH CLOSING 1070
4764 ARCH CONNECTED 0
4744 ARCH CLOSING 1071
4696 ARCH CLOSING 1069
6036 RFS IDLE 0
4000 RFS IDLE 1072
已选择6行。
将数据库打开
SQL> alter database open;
数据库已更改。
配置实时应用重做
SQL> alter database recover managed standby database using current logfile disconnect;
数据库已更改。 -------------配置实时应用重做,应用日志
查看备库状态
SQL> select open_mode from v$database;
OPEN_MODE
----------------------------------------
READ ONLY WITH APPLY
SQL>