1.检查主库的状态:sql> SELECT SWITCHOVER_STATUS FROM V$DATABASE;SWITCHOVER_STATUS--------------------TO
1.检查主库的状态:
sql> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
--------------------
TO STANDBY
2.将主库设置为standby role
alter database commit to switchover to physical standby;
shutdown immediate;
startup mount;
3.将standby转为primary
SQL> select NAME ,DB_UNIQUE_NAME ,open_mode,DATABASE_ROLE from v$database;
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
--------- ------------------------------ -------------------- ----------------
ORCL sty MOUNTED PHYSICAL STANDBY
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
--------------------
TO PRIMARY
alter database commit to switchover to primary;
alter database open;
SQL> select NAME ,DB_UNIQUE_NAME ,open_mode,DATABASE_ROLE from v$database;
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
--------- ------------------------------ -------------------- ----------------
ORCL sty READ WRITE PRIMARY
4.原来的primary库上执行:
alter database recover managed standby database disconnect from session;
SQL> select NAME ,DB_UNIQUE_NAME ,open_mode,DATABASE_ROLE from v$database;
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
--------- ------------------------------ -------------------- ----------------
ORCL pri MOUNTED PHYSICAL STANDBY
--结束END--
本文标题: [ORACLE DATAGUARD] switchover的过程
本文链接: https://lsjlt.com/news/35798.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0