10gDG switchover 過程
primary環境資訊
IP : 192.168.152.10
ORACLE_SID=PROD
資料庫版本 10.2.0.1
作業系統 Red Hat Enterprise Linux Server release 5.9 (Tikanga) 32位
standby環境資訊
IP : 192.168.152.20
ORACLE_SID=OCM3
資料庫版本 10.2.0.1
作業系統 Red Hat Enterprise Linux Server release 5.9 (Tikanga) 32位
第一次切換:
在primary庫新增一個表空間
SYS@PROD>create tablespace part5 datafile '/u01/app/oracle/oradata/PROD/disk1/part501.dbf' size 20M;
Tablespace created.
SYS@PROD>alter system archive log current;
System altered.
主庫日誌:
Tue Mar 18 15:32:25 2014
Thread 1 advanced to log sequence 18
Current log# 3 seq# 18 mem# 0: /u01/app/oracle/oradata/PROD/disk1/redo03.log
Current log# 3 seq# 18 mem# 1: /u01/app/oracle/oradata/PROD/disk1/redo06.log
Tue Mar 18 15:32:29 2014
LNS: Standby redo logfile selected for thread 1 sequence 18 for destination LOG_ARCHIVE_DEST_2
Tue Mar 18 15:32:34 2014
ARCm: Standby redo logfile selected for thread 1 sequence 17 for destination LOG_ARCHIVE_DEST_2
standby database:
Tue Mar 18 15:32:34 2014
RFS[13]: Possible network disconnect with primary database
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[15]: Assigned to RFS process 2498
RFS[15]: Identified database type as 'physical standby'
Primary database is in MAXIMUM PERFORMANCE mode
Primary database is in MAXIMUM PERFORMANCE mode
RFS[15]: Successfully opened standby log 5: '/u01/app/oracle/oradata/OCM3/disk1/standbylog5a.log'
Tue Mar 18 15:32:47 2014
Fetching gap sequence in thread 1, gap sequence 17-17
Tue Mar 18 15:32:48 2014
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[16]: Assigned to RFS process 2502
RFS[16]: Identified database type as 'physical standby'
RFS[16]: Successfully opened standby log 4: '/u01/app/oracle/oradata/OCM3/disk1/standbylog4a.log'
Tue Mar 18 15:33:18 2014
Media Recovery Log /u01/app/oracle/archlog/1_17_836758036.arc
Tue Mar 18 15:33:37 2014
Media Recovery Waiting for thread 1 sequence 18 (in transit)
檢視主庫狀態
SYS@PROD>select database_role,switchover_status from v$database;
DATABASE_ROLE SWITCHOVER_STATUS
---------------- --------------------
PRIMARY TO STANDBY
檢視備庫狀態
SYS@OCM3>select database_role,switchover_status from v$database;
DATABASE_ROLE SWITCHOVER_STATUS
---------------- --------------------
PHYSICAL STANDBY NOT ALLOWED
將主庫切換成備庫
SYS@PROD>alter database commit to switchover to physical standby with session shutdown;
SYS@PROD>select status,instance_name from v$instance;
STATUS INSTANCE_NAME
------------ ----------------
STARTED PROD
SYS@PROD>shutdown immediate
SYS@PROD>startup mount
SYS@PROD>select database_role,switchover_status from v$database;
DATABASE_ROLE SWITCHOVER_STATUS
---------------- --------------------
PHYSICAL STANDBY TO PRIMARY
SYS@PROD>alter database recover managed standby database disconnect from session parallel 2;
將備庫切換為主庫
SYS@OCM3>select database_role,switchover_status from v$database;
DATABASE_ROLE SWITCHOVER_STATUS
---------------- --------------------
PHYSICAL STANDBY TO PRIMARY
SYS@OCM3>
SYS@OCM3>alter database commit to switchover to primary with session shutdown ;
SYS@OCM3>alter database open;
SYS@OCM3>select database_role,switchover_status from v$database;
DATABASE_ROLE SWITCHOVER_STATUS
---------------- --------------------
PRIMARY TO STANDBY
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11590946/viewspace-1124217/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DataGuard之switchover_status狀態not allowed解決過程
- “alter database switchover to xx“過程不當導致的primary-primary 雙主問題Database
- DataGuard SwitchOver
- 實戰儲存過程排程過程儲存過程
- Oracle:DG 的 switchoverOracle
- DataGuard:Physical Standby Switchover
- Data Guard高階玩法:通過閃回恢復switchover主庫
- Windows啟動過程(MBR引導過程分析)Windows
- OAuth 2.0以及它的工作過程工作過程OAuth
- dataguard角色轉換—switchover
- 邏輯備庫Switchover
- Dataguard Physical Standy Switchover
- 10g_dataguard_switchover
- DataGuard:Logical Standby Switchover
- data guard switchover on solaris 10
- MySQL儲存過程詳解 mysql 儲存過程MySql儲存過程
- [個體軟體過程]之過程改進 (轉)
- webpack使用過程Web
- Sprk submit 過程MIT
- 編譯過程編譯
- React 渲染過程React
- 儲存過程儲存過程
- PowerArchiver破解過程。Hive
- 儲存過程結果進行查詢 select 存過過程儲存過程
- iOS main()執行前的過程 + weak 置 nil的過程iOSAI
- ORACLE儲存過程中建立子過程的測試!Oracle儲存過程
- 物理DG角色轉換:switchover
- DG物理standby,switchover步驟
- In Data Guard,choose switchover or failover?AI
- 不停機 data guard 以及 switchover
- SQL 儲存過程裡呼叫另一個儲存過程SQL儲存過程
- 隨機過程(高斯隨機過程、譜分析、白噪聲)隨機
- MySQL儲存過程詳解 mysql 儲存過程linkMySql儲存過程
- Oracle儲存過程乾貨(一):儲存過程基礎Oracle儲存過程
- mysql 儲存過程和事件排程MySql儲存過程事件
- PHP 協程實現過程詳解PHP
- HDFS寫過程分析
- Java學習過程Java