Oracle 11.2.0.4 physical dataguard和snapshot dataguard切換
平臺:
suse 11sp4
Oracle11.2.0.4
適用於資料遷移,災備演練,詳細過程如下:
——————convert physical standby to snapshot database
1、Stop Redo Apply, if it is active.
2、Ensure that the database is mounted, but not open.
3、Ensure that a fast recovery area has been configured. It is not necessary for flashback database to be enabled.
4、Issue the following SQL statement to perform the conversion:
SQL> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
select process,status,group#,thread#,sequence#,blocks from v$managed_standby;
select FLASHBACK_ON from v$database;
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
--------- ------------ ------------------ -------------------- ---------------- -------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY WITH APPLY PHYSICAL STANDBY NOT ALLOWED oradg
sys@ORA11G> alter database recover managed standby database cancel;
Database altered.
sys@ORA11G> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORA11G> startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
sys@ORA11G> select process,status,group#,thread#,sequence#,blocks,BLOCK#,DELAY_MINS,ACTIVE_AGENTS from v$managed_standby;
sys@ORA11G> alter system set db_recovery_file_dest_size=200m;
System altered.
sys@ORA11G> ho mkdir /oracle/11.2.0.4/oradata/oradg/flash
sys@ORA11G> alter system set db_recovery_file_dest='/oracle/11.2.0.4/oradata/oradg/flash';
System altered.
sys@ORA11G> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
Database altered.
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
--------- ------------ ------------------ -------------------- ---------------- -------------------- ------------------------------
ORA11G ARCHIVELOG RESTORE POINT ONLY MOUNTED SNAPSHOT STANDBY NOT ALLOWED oradg
sys@ORA11G> alter database open;
Database altered.
sys@ORA11G> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 95.24 0 2
FOREIGN ARCHIVED LOG 0 0 0
sys@ORA11G> select name,space_limit,space_used,number_of_files from v$recovery_file_dest
2 ;
NAME SPACE_LIMIT SPACE_USED NUMBER_OF_FILES
-------------------------------------------------- ----------- ---------- ---------------
/oracle/11.2.0.4/oradata/oradg/flash 110100480 104857600 2
---conver to physical
sys@ORA11G> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORA11G> startup mount;
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
sys@ORA11G> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
Database altered.
sys@ORA11G> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
sys@ORA11G> startup
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
Database opened.
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE
-------------------------------------------------- ------------ ------------------ -------------------- ----------------
SWITCHOVER_STATUS DB_UNIQUE_NAME
-------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY PHYSICAL STANDBY
RECOVERY NEEDED oradg
sys@ORA11G> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 0 0 0
FOREIGN ARCHIVED LOG 0 0 0
7 rows selected.
sys@ORA11G> recover MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
Media recovery complete.
sys@ORA11G>
sys@ORA11G>
sys@ORA11G>
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE
-------------------------------------------------- ------------ ------------------ -------------------- ----------------
SWITCHOVER_STATUS DB_UNIQUE_NAME
-------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY WITH APPLY PHYSICAL STANDBY
NOT ALLOWED oradg
suse 11sp4
Oracle11.2.0.4
適用於資料遷移,災備演練,詳細過程如下:
——————convert physical standby to snapshot database
1、Stop Redo Apply, if it is active.
2、Ensure that the database is mounted, but not open.
3、Ensure that a fast recovery area has been configured. It is not necessary for flashback database to be enabled.
4、Issue the following SQL statement to perform the conversion:
SQL> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
select process,status,group#,thread#,sequence#,blocks from v$managed_standby;
select FLASHBACK_ON from v$database;
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
--------- ------------ ------------------ -------------------- ---------------- -------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY WITH APPLY PHYSICAL STANDBY NOT ALLOWED oradg
sys@ORA11G> alter database recover managed standby database cancel;
Database altered.
sys@ORA11G> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORA11G> startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
sys@ORA11G> select process,status,group#,thread#,sequence#,blocks,BLOCK#,DELAY_MINS,ACTIVE_AGENTS from v$managed_standby;
sys@ORA11G> alter system set db_recovery_file_dest_size=200m;
System altered.
sys@ORA11G> ho mkdir /oracle/11.2.0.4/oradata/oradg/flash
sys@ORA11G> alter system set db_recovery_file_dest='/oracle/11.2.0.4/oradata/oradg/flash';
System altered.
sys@ORA11G> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
Database altered.
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
--------- ------------ ------------------ -------------------- ---------------- -------------------- ------------------------------
ORA11G ARCHIVELOG RESTORE POINT ONLY MOUNTED SNAPSHOT STANDBY NOT ALLOWED oradg
sys@ORA11G> alter database open;
Database altered.
sys@ORA11G> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 95.24 0 2
FOREIGN ARCHIVED LOG 0 0 0
sys@ORA11G> select name,space_limit,space_used,number_of_files from v$recovery_file_dest
2 ;
NAME SPACE_LIMIT SPACE_USED NUMBER_OF_FILES
-------------------------------------------------- ----------- ---------- ---------------
/oracle/11.2.0.4/oradata/oradg/flash 110100480 104857600 2
---conver to physical
sys@ORA11G> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORA11G> startup mount;
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
sys@ORA11G> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
Database altered.
sys@ORA11G> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
sys@ORA11G> startup
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
Database opened.
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE
-------------------------------------------------- ------------ ------------------ -------------------- ----------------
SWITCHOVER_STATUS DB_UNIQUE_NAME
-------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY PHYSICAL STANDBY
RECOVERY NEEDED oradg
sys@ORA11G> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 0 0 0
FOREIGN ARCHIVED LOG 0 0 0
7 rows selected.
sys@ORA11G> recover MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
Media recovery complete.
sys@ORA11G>
sys@ORA11G>
sys@ORA11G>
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE
-------------------------------------------------- ------------ ------------------ -------------------- ----------------
SWITCHOVER_STATUS DB_UNIQUE_NAME
-------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY WITH APPLY PHYSICAL STANDBY
NOT ALLOWED oradg
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24585765/viewspace-2151843/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle dataguard 切換Oracle
- 配置Oracle physical DataGuardOracle
- 【DataGuard】Oracle DataGuard 資料保護模式切換Oracle模式
- Oracle DataGuard切換步驟Oracle
- oracle 之dataguard standby 切換Oracle
- oracle11g dataguard切換Oracle
- Oracle DataGuard switchover切換一例Oracle
- 【DATAGUARD】Oracle Dataguard物理備庫切換最佳實踐(sqlplus)OracleSQL
- 【DataGuard】Oracle 11g DataGuard 新特性之 Snapshot Standby DatabaseOracleDatabase
- DataGuard:Physical Standby Switchover
- DataGuard切換保護模式模式
- Oracle DataGuard 主備切換 (switchover) oracle11gOracle
- Oracle物理DG自動切換——Dataguard Broker配置Oracle
- 【DataGuard】Oracle 11g physical standby switchoverOracle
- Physical Standby Database 切換到 Snapshot Standby DatabaseDatabase
- Dataguard failover切換實驗AI
- 實戰dataguard主從切換
- Dataguard Physical Standy Switchover
- DataGuard:Physical Standby FailoverAI
- oracle實驗記錄 (oracle 10G dataguard(7)physical dg轉換)Oracle
- ORACLE 11g dataguard系列,手工切換測試Oracle
- ORACLE10g DataGuard 配置Physical Standby DatabaseOracleDatabase
- Oracle 11.2.0.4 Dataguard兩則故障處理Oracle
- DataGuard主備庫切換步驟
- dataguard之物理standby 日誌切換
- 【DATAGUARD】物理dg的switchover切換(五)
- dataguard 切換後更換IP,service_name
- dataguard 手動切換,檢查指令碼指令碼
- dataguard之物理standby庫failover 切換AI
- 【DATAGUARD】物理dg的failover切換(六)AI
- ORACLE 12C DATAGUARD環境搭建和主從切換Oracle
- 配置 Oracle 10g RAC primary + RAC physical standby dataguardOracle 10g
- Oracle 10g DataGuard物理主備切換-switchover與failoverOracle 10gAI
- DataGuard---->物理StandBy的角色切換之switchover
- 基於多種場景DataGuard切換方案
- Oracle 11g Data Guard (physical standby - active dataguard) [final]Oracle
- Configure Oracle Dataguard Primary-ASM to Physical-ASM薦OracleASM
- 【DATAGUARD】 將11g物理備庫轉換為Snapshot Standby