两个从库状态应该均为TO PRIMARY 或 SESSIONS ACTIVE,SESSIONS ACTIVE说明还有活跃会话。 select switchover_status from v$database; 1. 补充:如果发现not allowed状态 根据文档 Physical Standby Switchover_status Showing Not Allowed. (文档 ID 1392763.1),如果确定切换前主从是同步的,可以忽略Not Allowed 状态直接...
alter database commit to switchover to physical standby with session shutdown; 详细过程如下: idle 26-JUL-24> alter database commit to switchover to physical standby with session shutdown; Database altered. idle 26-JUL-24> select status from v$instance; select status from v$instance * ERROR ...
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE; SWITCHOVER_STATUS --- TO_PRIMARY 1. 2. 3. 4. 5. 步骤6:将备库切为主库 SQL> alter database commit to switchover to primary with session shutdown; 1. 步骤7:OPEN新主库 检查数据库的打开模式,可以看到已变为主数据库角色 SQL> ALTER DATABASE...
-- SWITCHOVER_STATUS:SESSIONS ACTIVE select SWITCHOVER_STATUS,NAME,PROTECTION_MODE,OPEN_MODE,LOG_MODE,DATABASE_ROLE,DB_UNIQUE_NAME from v$database; --如果 process:MRP0:WAIT_FOR_LOG 则为ADG,如果无 process:MRP0 则为普通的主从 select process,status,thread#,sequence# from v$managed_standby; 2、...
一. switch over 主库 1. 查看switchover_status: SELECT OPEN_MODE, DATABASE_ROLE, SWITCHOVER_STATUS, FORCE_LOGGING, DATAGUARD_BROKER, GUARD_STATUS FROM V$DATABASE; 2. 切换为备库 alter database commit to switchover to physical standby WITH SESSION SHUTDOWN; ...
简介:手把手教你Oracle DataGuard主备切换(switchover) Oracle DataGuard主备切换有两种方式,一种是手动,一种是使用dgmgr切换。今天主要来讲第一种。 一、手动切换 (一)先查看主备库的状态何日志是否正常 1、主库 SQL>setline300pages300 selectname,remote_archive,database_role,guard_status,db_unique_namefro...
备:select open_mode,database_role,protection_mode,protection_level,switchover_status from v$database; 主库需要注意事项: A 如果switchover_status为TO_STANDBY说明可以直接转换 alter database commit to switchover to physical standby; B 如果switchover_status为SESSIONS ACTIVE 则关闭会话 ...
1.检查主库的状态:SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;SWITCHOVER_STATUS---TO STANDBY2.将主库设置为standby role alter d...
switchover 切换备库操作 备库执行切换为主库模式 第1步、备库状态角色确认 SQL> select switchover_status from v$database; 第一种情况 SQL> select switchover_status from v$database; SWITCHOVER_STATUS --- TO PRIMARY 如果状态为TO PRIMARY 则执行...
一、SWITCHOVER LATENT状态 在备库上查询数据库角色和状态 SYS@standby> select database_role,switchover_status,open_mode from v$database; DATABASE_ROLE SWITCHOVER_STATUS OPEN_MODE --- --- --- PHYSICAL STANDBY SWITCHOVER LATENT READ ONLY 发现是switchover latent而不是...