DataGuard角色切换 |
发布时间: 2012/9/3 17:24:13 |
Step 1 Verify that the primary database can be switched to the standby role. SWITCHOVER_STATUS TO STANDBY Step 2 Initiate the switchover on the primary database. Step 3 Shut down and then mount the former primary database. shutdown abort; Step 4 Verify that the switchover target is ready to be switched to the primary role. 这里查询出来的值不为TO_PRIMARY即有点问题。 Step 5 Switch the target physical standby database role to the primary role. sys@DEX> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN; 这里提示需要介质恢复。 sys@DEX> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; Database altered. sys@DEX> SELECT SWITCHOVER_STATUS FROM V$DATABASE; SWITCHOVER_STATUS sys@DEX> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN; Database altered. Step 6 Open the new primary database. Database altered. Step 7 Verify the switch role . 主库执行 System altered.
standby库执行 sys@DEX> select sequence# from v$log ; SEQUENCE#
本文出自:亿恩科技【www.enkj.com】 |