--目前主库PROD3,备库AUX
--查看主备库日志传输情况
SYS@PROD3> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
34
SYS@aux> select sequence#,applied from v$archived_log order by 1 desc;
SEQUENCE# APPLIED
---------- ---------
34 YES
34 YES
34 YES
33 YES
32 YES
31 YES
30 YES
--查看主备库状态
SYS@PROD3> select name,database_role,switchover_status from v$database;
NAME DATABASE_ROLE SWITCHOVER_STATUS
--------- ---------------- --------------------
PROD3 PRIMARY TO STANDBY
SYS@aux> select name,database_role,switchover_status from v$database;
NAME DATABASE_ROLE SWITCHOVER_STATUS
--------- ---------------- --------------------
PROD3 PHYSICAL STANDBY NOT ALLOWED
--先主库切换到备库
SYS@PROD3> alter database commit to switchover to physical standby with session shutdown;
Database altered.
--同时备库trace文件中节选
RFS[2]: Possible network disconnect with primary database
SYS@aux> select name,data
Oracle 11g Data Guard之主备库切换(switchover不使用DG Broker)
最新推荐文章于 2022-10-28 10:38:02 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)