部署 11G 物理DataGuard時 ALTER DATABASE OPEN 報錯
採用的配置方法是透過DUPLICATE命令實時從主庫同步到備庫。
duplicate target database for standby nofilenamecheck from active database;
當主庫傳輸完所有資料檔案到備庫上後,想將備庫啟動到OPEN狀態報錯
SQL> ALTER DATABASE OPEN;
ALTER DATABASE OPEN
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1:
'/ORADATA/data/GTFDBDG/datafile/o1_mf_system_8oqlcnin_.dbf
備庫啟動日誌應用
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
檢查歸檔日誌的同步情況,發現一條歸檔都沒有傳輸到備庫
SELECT SEQUENCE#,THREAD#,APPLIED FROM GV$ARCHIVED_LOG ORDER BY SEQUENCE#;
no rows selected
可以判斷是主庫無法同步歸檔日誌到備庫
主庫是兩節點的 RAC ,檢視主庫兩節點的 alert 日誌,沒有明顯的報錯資訊
檢查主庫的配置引數,沒有錯誤。重新配置主庫下面引數後, alert 日誌報錯
ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=BOTH;
Wed Nov 04 05:37:34 2015
PING[ARC2]: Heartbeat failed to connect to standby 'gtfdbdg'. Error is 16057.
Wed Nov 04 05:37:36 2015
Thread 1 advanced to log sequence 13837 (LGWR switch)
Current log# 1 seq# 13837 mem# 0: +REDO1/gtfdb/onlinelog/group_1.256.833906321
Current log# 1 seq# 13837 mem# 1: +REDO2/gtfdb/onlinelog/group_1.256.833906323
Wed Nov 04 05:37:36 2015
ARC3: Archivelog destination LOG_ARCHIVE_DEST_2 disabled: destination Data Guard configuration error
檢查備庫的 LOG_ARCHIVE_CONFIG 引數,發現配置有錯
SQL> show parameter log_archive_config
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string DG_CONFIG=(gftdb,gtfdbdg)
更改備庫的 LOG_ARCHIVE_CONFIG 引數
SQL> alter system set log_archive_config='DG_CONFIG=(gtfdb,gtfdbdg)' scope=both sid='*';
備庫啟動日誌應用
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
檢查歸檔日誌的同步情況,等待主庫傳輸過來的歸檔日誌全部被備庫應用之後,再次將備庫置為 OPEN READ 狀態
SELECT SEQUENCE#,THREAD#,APPLIED FROM GV$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# THREAD# APPLIED
---------- ---------- ---------
5019 2 YES
5020 2 YES
5021 2 YES
5022 2 YES
5023 2 YES
5024 2 YES
5025 2 YES
5026 2 YES
5027 2 YES
5028 2 YES
5029 2 YES
SEQUENCE# THREAD# APPLIED
---------- ---------- ---------
5030 2 YES
5031 2 YES
5032 2 YES
5033 2 YES
5034 2 IN-MEMORY
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASE OPEN;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
備庫狀態正常,實現日誌實時應用
SQL> select database_role,switchover_status,open_mode from v$database;
DATABASE_ROLE SWITCHOVER_STATUS OPEN_MODE
---------------- -------------------- --------------------
PHYSICAL STANDBY NOT ALLOWED READ ONLY WITH APPLY
duplicate target database for standby nofilenamecheck from active database;
當主庫傳輸完所有資料檔案到備庫上後,想將備庫啟動到OPEN狀態報錯
SQL> ALTER DATABASE OPEN;
ALTER DATABASE OPEN
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1:
'/ORADATA/data/GTFDBDG/datafile/o1_mf_system_8oqlcnin_.dbf
備庫啟動日誌應用
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
檢查歸檔日誌的同步情況,發現一條歸檔都沒有傳輸到備庫
SELECT SEQUENCE#,THREAD#,APPLIED FROM GV$ARCHIVED_LOG ORDER BY SEQUENCE#;
no rows selected
可以判斷是主庫無法同步歸檔日誌到備庫
主庫是兩節點的 RAC ,檢視主庫兩節點的 alert 日誌,沒有明顯的報錯資訊
檢查主庫的配置引數,沒有錯誤。重新配置主庫下面引數後, alert 日誌報錯
ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=BOTH;
Wed Nov 04 05:37:34 2015
PING[ARC2]: Heartbeat failed to connect to standby 'gtfdbdg'. Error is 16057.
Wed Nov 04 05:37:36 2015
Thread 1 advanced to log sequence 13837 (LGWR switch)
Current log# 1 seq# 13837 mem# 0: +REDO1/gtfdb/onlinelog/group_1.256.833906321
Current log# 1 seq# 13837 mem# 1: +REDO2/gtfdb/onlinelog/group_1.256.833906323
Wed Nov 04 05:37:36 2015
ARC3: Archivelog destination LOG_ARCHIVE_DEST_2 disabled: destination Data Guard configuration error
SQL> show parameter log_archive_config
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string DG_CONFIG=(gftdb,gtfdbdg)
SQL> alter system set log_archive_config='DG_CONFIG=(gtfdb,gtfdbdg)' scope=both sid='*';
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
檢查歸檔日誌的同步情況,等待主庫傳輸過來的歸檔日誌全部被備庫應用之後,再次將備庫置為 OPEN READ 狀態
SELECT SEQUENCE#,THREAD#,APPLIED FROM GV$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# THREAD# APPLIED
---------- ---------- ---------
5019 2 YES
5020 2 YES
5021 2 YES
5022 2 YES
5023 2 YES
5024 2 YES
5025 2 YES
5026 2 YES
5027 2 YES
5028 2 YES
5029 2 YES
SEQUENCE# THREAD# APPLIED
---------- ---------- ---------
5030 2 YES
5031 2 YES
5032 2 YES
5033 2 YES
5034 2 IN-MEMORY
ALTER DATABASE OPEN;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
備庫狀態正常,實現日誌實時應用
SQL> select database_role,switchover_status,open_mode from v$database;
DATABASE_ROLE SWITCHOVER_STATUS OPEN_MODE
---------------- -------------------- --------------------
PHYSICAL STANDBY NOT ALLOWED READ ONLY WITH APPLY
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-1822519/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- alter database open resetlogs;Database
- 物理備庫open報錯ORA-10458: standby database requires recoveryDatabaseUI
- database+dataguard部署Database
- 使用oracle 11g rman新特性 duplicate target database for standby from active database 建立物理dataguard並開啟RealOracleDatabase
- 【DataGuard】手工冷備搭建 Oracle 11g DataGuard 物理備庫Oracle
- 【DataGuard】Oracle 11g DataGuard 角色轉換(一)物理備庫SwitchoverOracle
- 【DataGuard】Oracle 11g DataGuard 新特性之 Snapshot Standby DatabaseOracleDatabase
- ORA-1113 signalled during: alter database open...Database
- 【DataGuard】同一臺主機部署Oracle 11g物理Active Data Guard詳細過程Oracle
- alter database in OracleDatabaseOracle
- Oracle DataGuard Standby database ID mismatch錯誤OracleDatabase
- 【DATAGUARD】DG系列之11g物理備庫的搭建
- 執行alter database open resetlogs提示ORA-00392和ORA-00312錯誤Database
- 【DataGuard】Oracle 11g物理Active Data Guard實時查詢(Real-time query)特性Oracle
- alter database datafile offline and alter database tablespace ...offlineDatabase
- alter database create datafileDatabase
- alter database create datafile '' as ''Database
- 在alter database mount時的一點收穫Database
- weblogic 11g部署報錯及解決Web
- alter database和alter system和alter session的區別DatabaseSession
- 物理data guard備standby庫的時候報錯。
- 使用RMAN DUPLICATE...FROM ACTIVE DATABASE命令來建立DataGuard物理備庫Database
- Dataguard 物理安裝
- 11g物理standby能夠同時提供恢復及查詢(Active Dataguard)的原理是 ?
- 【DATAGUARD】 將11g物理備庫轉換為Snapshot Standby
- Oracle11g的Dataguard測試,建立物理備庫(Physical Standby Database)OracleDatabase
- 【DataGuard】使用Grid Control快速部署Oracle物理Data GuardOracle
- RAC 例項不能啟動 ORA-1589 signalled during ALTER DATABASE OPENDatabase
- alter database offline 與 alter database offline drop效果比對Database
- DataGuard搭建物理StandBy
- Oracle 11g Dataguard 暫停物理備庫的日誌傳輸Oracle
- 配置Oracle11g的Dataguard測試,建立物理備庫(Physical Standby Database)OracleDatabase
- 【RMAN】使用RMAN的Duplicate功能建立物理DataGuard報錯(ORA-17627、ORA-17629)處理
- alter database disable thread 2Databasethread
- ALTER DATABASE RESETLOGS 的作用Database
- DATA GUARD 中alter database 命令Database
- ALTER DATABASE DATAFILE OFFLINEDatabase
- ftp 報錯 550 Failed to open fileFTPAI