DataGuard:Physical Standby Switchover
DataGuard:Physical Standby Switchover
基本步驟:
1.對待轉換的primary,standby資料庫的初始化作相應的調整
2.主庫轉換,shutdown後啟動到mount狀態,應用redo recover
3.standby庫轉換,並open
4.測試驗證
<1> primary庫引數調整
增加standby redo logfile ,因為我們現在是在maximize protection
alter database add standby logfile group 4 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB1\STANDBY_REDO04.LOG') SIZE 50M
alter database add standby logfile group 5 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB1\STANDBY_REDO05.LOG') SIZE 50M
alter database add standby logfile group 6 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB1\STANDBY_REDO06.LOG') SIZE 50M
alter database add standby logfile group 7 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB1\STANDBY_REDO07.LOG') SIZE 50M
增加引數fal_server,fal_client,db_file_name_convert,log_file_name_convert,standby_file_management,log_archive_dest_3,
log_archive_dest_state_3(用於作為備庫時存放主庫的archive log)
db1>alter system set fal_client='db1';
db1>alter system set fal_server='db2';
db1>alter system set db_file_name_convert='C:\oracle\product\10.2.0\oradata\db2','C:\oracle\product\10.2.0\oradata\db1' scope=spfile;
db1>alter system set db_file_name_convert='C:\oracle\product\10.2.0\oradata\db2','C:\oracle\product\10.2.0\oradata\db1' scope=spfile;
db1>alter system set log_archive_dest_3='location=c:\arch\db1\standby valid_for=(standby_logfiles,standby_roles)';
db1>alter system set log_archive_dest_state_3='enable';
<2> standby 庫引數調整
db2>alter system set log_archive_dest_3='service=db1 lgwr sync affirm valid_for=(online_logfiles,primary_roles) db_unique_name=db1';
db2>alter system set log_archive_dest_state_3='enable';
檢查standby庫的歸檔設定,確保處於force logging 歸檔模式
db2>select NAME,LOG_MODE,FORCE_LOGGING,DB_UNIQUE_NAME from v$database;
NAME LOG_MODE FOR DB_UNIQUE_NAME
--------- ------------ --- ------------------------------
DB1 ARCHIVELOG YES db2
<3> primary庫端切換動作
select database_role,switchover_status from v$database;
如果是to standby 表可以正常切換.
直接執行 ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
否則執行: ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
db1>select DB_UNIQUE_NAME,PROTECTION_MODE,PROTECTION_LEVEL,SWITCHOVER_STATUS from v$database;
DB_UN PROTECTION_MODE PROTECTION_LEVEL SWITCHOVER_STATUS
----- -------------------- -------------------- --------------------
db1 MAXIMUM PROTECTION MAXIMUM PROTECTION SESSIONS ACTIVE
db1>alter database commit to switchover to physical standby with session shutdown ;
該語句會把當前的redo歸檔,並在standby庫上recover後,原primary角色轉換為standby
<4> standby端切換動作
如果是SWITCHOVER_STATUS 為 TO PRIMARY 表可以正常切換. 否則,檢查之前的操作及引數設定。
DB_UNIQUE_NAME PROTECTION_MODE PROTECTION_LEVEL SWITCHOVER_STATUS
--------------- -------------------- -------------------- --------------------
db2 MAXIMUM PROTECTION MAXIMUM PROTECTION TO PRIMARY
db1>alter database commit to switchover to physical standby with session shutdown ;
switchover切換結束
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10159839/viewspace-598129/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【DataGuard】Oracle 11g physical standby switchoverOracle
- Dataguard Physical Standy Switchover
- DataGuard:Logical Standby Switchover
- DataGuard:Physical Standby FailoverAI
- Physical Standby Switchover_status Showing Not Allowed
- Performing a Switchover to a Physical Standby Database and failoverORMDatabaseAI
- Dataguard物理Standby Switchover 角色轉換
- Physical Standby Switchover_status Showing Not Allowed._1392763.1
- rac庫與單機physical standby 之間的switchover
- ORACLE10g DataGuard 配置Physical Standby DatabaseOracleDatabase
- 關於建立DataGuard Physical Standby資料庫資料庫
- DataGuard---->物理StandBy的角色切換之switchover
- Physical Standby Switchover_status Showing Not Allowed. (Doc ID 1392763.1)
- DataGuard SwitchOver
- 配置 Oracle 10g RAC primary + RAC physical standby dataguardOracle 10g
- Oracle 11g Data Guard (physical standby - active dataguard) [final]Oracle
- 【RAC,DATAGUARD】Creating a physical standby from ASM (RAC ) primary之四ASM
- Oracle physical standbyOracle
- 一步一步學DataGuard(14)邏輯standby之switchover
- 【DataGuard】10g物理standby主備switchover方式切換詳述
- oracle 9i physical standby database 中v$database switchover_status的含義OracleDatabase
- 配置Oracle physical DataGuardOracle
- Oracle11g的Dataguard測試,建立物理備庫(Physical Standby Database)OracleDatabase
- dataguard角色轉換—switchover
- 10g_dataguard_switchover
- 配置Oracle11g的Dataguard測試,建立物理備庫(Physical Standby Database)OracleDatabase
- 10g Data Guard physical standby的主備庫角色轉換測試(switchover & failover)AI
- DG物理standby,switchover步驟
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(10)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(9)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(8)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(7)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(6)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(5)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(4)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(3)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(2)LinuxOracle 10g