oracle9204(9i)_dg(data guard)_archive gap_query_apply_transmit
To identify the logs in the archive gap
Query the V$ARCHIVED_LOG and V$LOG views on the standby database. For example, the following query shows that there is a difference in the RECD and SENT sequence numbers for the destination specified by DEST_ID=2, indicating that there is a gap:
SQL> SELECT MAX(R.SEQUENCE#) LAST_SEQ_RECD, MAX(L.SEQUENCE#) LAST_SEQ_SENT FROM
2> V$ARCHIVED_LOG R, V$LOG L WHERE
3> R.DEST_ID=2 AND L.ARCHIVED='YES';
LAST_SEQ_RECD LAST_SEQ_SENT
------------- -------------
7 10
Use the following query to determine the names of the archived redo logs on the local system that must be copied to the standby system that has the gap:
SQL> SELECT NAME FROM V$ARCHIVED_LOG WHERE THREAD#=1 AND DEST_ID=1 AND
2> SEQUENCE# BETWEEN 7 AND 10;
NAME
--------------------------------------------------------------------------------
/primary/thread1_dest/arcr_1_7.arc
/primary/thread1_dest/arcr_1_8.arc
/primary/thread1_dest/arcr_1_9.arc
/primary/thread1_dest/arcr_1_10.arc
B.3.3 Manually Transmitting the Logs in the Archive Gap to the Standby Site
After you have obtained the log sequence numbers of the logs in the archive gap, you can obtain their filenames by querying the V$ARCHIVED_LOG view on the primary site. The archived log filenames on the standby site are generated by the STANDBY_ARCHIVE_DEST and LOG_ARCHIVE_FORMAT parameters in the standby initialization parameter file.
If the standby database is on the same site as the primary database, or the standby database is on a remote site with a different directory structure than the primary database, the filenames for the logs on the standby site cannot be the same as the filenames of the logs archived by the primary database. Before transmitting the archived logs to the standby site, determine the correct filenames for the logs at the standby site.
To copy logs in an archive gap to the standby site
- Review the list of archive gap logs that you obtained earlier. For example, assume you have the following archive gap:
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
1 460 463
2 202 204
3 100 100If a thread appears in the view, then it contains an archive gap. You need to copy logs from threads 1, 2, and 3.
- Determine the
filenames of the logs in the archive gap that were archived by the
primary database. After connecting to the primary database, issue a SQL
query to obtain the name of a log in each thread. For example, use the
following SQL statement to obtain filenames of logs for thread 1:
SQL> SELECT NAME FROM V$ARCHIVED_LOG WHERE THREAD#=1 AND DEST_ID=1
2> AND SEQUENCE# > 459 AND SEQUENCE# < 464;
NAME
---------------------------------------------------------------------
/primary/thread1_dest/arcr_1_460.arc
/primary/thread1_dest/arcr_1_461.arc
/primary/thread1_dest/arcr_1_462.arc
/primary/thread1_dest/arcr_1_463.arc
4 rows selected - On the standby site, review the settings for STANDBY_ARCHIVE_DEST and LOG_ARCHIVE_FORMAT in the standby initialization parameter file. For example, you discover the following:
STANDBY_ARCHIVE_DEST = /standby/arc_dest/
LOG_ARCHIVE_FORMAT = log_%t_%s.arcThese parameter settings determine the filenames of the archived redo logs at the standby site.
- On the primary site, copy the archive gap logs from the primary site to the standby site, renaming them according to values for STANDBY_ARCHIVE_DEST and LOG_ARCHIVE_FORMAT. For example, enter the following copy commands to copy the archive gap logs required by thread 1:
% cp /primary/thread1_dest/arcr_1_460.arc /standby/arc_dest/log_1_460.arc
% cp /primary/thread1_dest/arcr_1_461.arc /standby/arc_dest/log_1_461.arc
% cp /primary/thread1_dest/arcr_1_462.arc /standby/arc_dest/log_1_462.arc
% cp /primary/thread1_dest/arcr_1_463.arc /standby/arc_dest/log_1_463.arcPerform. similar copy commands to copy archive gap logs for threads 2 and 3.
- On the standby site, if the LOG_ARCHIVE_DEST and STANDBY_ARCHIVE_DEST parameter values are not the same, then copy the archive gap logs from the STANDBY_ARCHIVE_DEST directory to the LOG_ARCHIVE_DEST directory. If these parameter values are the same, then you do not need to perform. this step.
For example, assume the following standby initialization parameter settings:
STANDBY_ARCHIVE_DEST = /standby/arc_dest/
LOG_ARCHIVE_DEST = /log_dest/Because the parameter values are different, copy the archived logs to the LOG_ARCHIVE_DEST location:
% cp /standby/arc_dest/* /log_dest/
When you initiate manual recovery, the Oracle database server looks at the LOG_ARCHIVE_DEST value to determine the location of the logs.
Now that all required logs are in the STANDBY_ARCHIVE_DEST directory, you can proceed to to apply the archive gap logs to the standby database.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-628183/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle9204(9i)_dg(data guard)__Tuning Logical Standby DatabasesOracleDatabase
- oracle9204(9i)_dg(data guard)_重新命名主庫資料檔案_指南_轉摘官檔Oracle
- 【DG】Data Guard搭建(physical standby)
- Data guard archive GAP 故障處理案例Hive
- 【DG】Oracle Data Guard官方直譯Oracle
- 【DG】Data Guard主備庫Switchover切換
- 物理DG!Oracle 10G Data Guard DemoOracle 10g
- Data guard 中 alert 日誌報錯 "FAL archive failed"HiveAI
- 【DG】Data Guard主備庫Failove切換AI
- 【ASK_ORACLE】Oracle Data Guard(一)DG架構Oracle架構
- Oracle DG(Data Guard)支援異構平臺說明Oracle
- oracle10g data guard(dg)__flashback_physical databaseOracleDatabase
- 9i 克隆+data guard 實現資料庫搬遷資料庫
- LOG_ARCHIVE_DEST_n引數屬性——DATA GUARD概念和管理Hive
- oracle9204(physical dg)配置_指南Oracle
- Oracle Data Guard LOG_ARCHIVE_DEST_n引數的可選屬性OracleHive
- DATA GUARD部署模式——DATA GUARD概念和管理模式
- 介紹ORACLE DATA GUARD——DATA GUARD概念和管理Oracle
- Oracle Flashback Data ArchiveOracleHive
- Flashback Data Archive RequirementsHiveUIREM
- 12c DG新特性 - Active Data Guard Far Sync (Doc ID 2179719.1)
- G008-ORACLE-DG ORACLE 19C Active Data Guard DML RedirectionOracle
- oracle9i(9204)dg(data guard)_ place the standby database in manual recovery modeOracleDatabase
- Data guard搭建
- oracle data guard!!Oracle
- Data Guard Broker系列之二:Data Guard Broker配置實戰
- Oracle 9i Data Guard進行資料庫的災難防護(轉)Oracle資料庫
- DATA GUARD 簡介
- Data Guard 建立(ASM)ASM
- Oracle Data Guard配置Oracle
- 【DG】同一臺主機實現物理Data Guard配置安裝(精簡版)
- 與oracle10g data guard(dg)緊密關聯的相關檢視Oracle
- oracle9i(9204)data guard(dg)_logical standby_failover操作指南OracleAI
- Oracle 11g Data Guard Enabling Active Data GuardOracle
- [Data Guard]Oracle10g Data Guard學習筆記(一)Oracle筆記
- [Data Guard]Oracle10g Data Guard學習筆記(二)Oracle筆記
- [Data Guard]Oracle10g Data Guard學習筆記(三)Oracle筆記
- Flashback Data Archive原理詳解Hive