oracle11.2.0.4.0 dg(lgwr+async)ノートの構成

22513 ワード

oracle 11 g r 2(11.2.0.4.0)、rac+dgを構成し、バックアップ有効化リアルタイムアプリケーションで発生したいくつかの問題:メインライブラリパラメータ:
*.log_archive_dest_2='location=+arch/jhdb/archivelog valid_for=(all_logfiles,all_roles) db_unique_name=jhdb'

*.log_archive_dest_3='service=jhdg lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=jhdg'

メインライブラリ転送redologモードを変更し、arcn転送からlgwrに変更します.マスター・ライブラリ・ログ:
Archived Log entry 23982 added for thread 1 sequence 11108 ID 0x41cdfd03 dest 2:
******************************************************************
LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_3
******************************************************************
Mon Sep 25 10:24:02 2017
WARN: ARC1: Terminating pid 3986 hung on an I/O operation
WARN: ARC1: Terminating pid 35951 hung on an I/O operation
WARN: ARC1: Terminating pid 3362 hung on an I/O operation
Killing 1 processes with pids 3986 (Process by index) in order to remove hung processes. Requested by OS process 35949 on instance 1
Killing 1 processes with pids 35951 (Process by index) in order to remove hung processes. Requested by OS process 35949 on instance 1
Killing 1 processes with pids 3362 (Process by index) in order to remove hung processes. Requested by OS process 35949 on instance 1
ARC1: Error 16198 due to hung I/O operation to LOG_ARCHIVE_DEST_3
ARC1: Detected ARCH process failure
ARC1: Detected ARCH process failure
ARC1: Detected ARCH process failure
ARC1: STARTING ARCH PROCESSES
Mon Sep 25 10:24:09 2017
ARC0 started with pid=44, OS id=5886 
Mon Sep 25 10:24:09 2017
ARC2 started with pid=89, OS id=5902 
Mon Sep 25 10:24:09 2017
ARC3 started with pid=101, OS id=5904 
ARC0: Archival started
ARC2: Archival started
ARC2: Becoming the heartbeat ARCH
Reclaiming FAL entry from dead process [pid 3986]
Reclaiming FAL entry from dead process [pid 3362]
ARC3: Archival started
ARC1: STARTING ARCH PROCESSES COMPLETE
Reclaiming FAL entry from dead process [pid 35951]
ARC0: Standby redo logfile selected for thread 1 sequence 11107 for destination LOG_ARCHIVE_DEST_3
ARC2: Standby redo logfile selected for thread 1 sequence 11108 for destination LOG_ARCHIVE_DEST_3
Mon Sep 25 10:24:23 2017
ARC0: Archive log rejected (thread 1 sequence 11107) at host 'jhdg'
FAL[server, ARC0]: FAL archive failed, see trace file.
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance jhdb1 - Archival Error. Archiver continuing.
Mon Sep 25 10:30:11 2017
Thread 1 advanced to log sequence 11110 (LGWR switch)
  Current log# 5 seq# 11110 mem# 0: +DATA/jhdb/onlinelog/group5_1.log
  Current log# 5 seq# 11110 mem# 1: +ARCH/jhdb/onlinelog/group5_1.log
Mon Sep 25 10:30:12 2017
Archived Log entry 23990 added for thread 1 sequence 11109 ID 0x41cdfd03 dest 2:
Mon Sep 25 10:30:12 2017
******************************************************************
LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_3
******************************************************************

ログから分かるように、ログは転送中に問題が発生し、メインライブラリarchive hungが停止し、システムはhungセッションを自動的に殺す.
ローカルアーカイブの表示
*.log_archive_dest_2='location=+arch/jhdb/archivelog/jhdb2 valid_for=(all_logfiles,all_roles) db_unique_name=jhdb'

lgwr転送redologを有効にすると、archプロセスではなくlgwrプロセス転送ログがバックアップクエリに存在するはずですが、asyncモードではLNSプロセス転送redologが使用されます.syncモードではlgwr転送redologを以下のように使用します.
SQL> select process,status,thread#,sequence#,block#,blocks from v$managed_standby;

PROCESS   STATUS          THREAD#  SEQUENCE#     BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
ARCH      CLOSING               1      11110      22528        304
ARCH      CLOSING               1      11111      59392       1713
ARCH      CLOSING               1      11106          1       1583
ARCH      CLOSING               1      11109      12288        578
LNS       WRITING               1      11112      42441          4

ライブラリがリアルタイムアプリケーションを開始するには、次の手順に従います.
alter database recover managed standby database using current logfile disconnect from session;

リポジトリログ:
Fetching gap sequence in thread 1, gap sequence 11103-11103
Mon Sep 25 10:04:44 2017
FAL[client]: Failed to request gap sequence
 GAP - thread 1 sequence 11103-11103
 DBID 1103974919 branch 884618889
FAL[client]: All defined FAL servers have been attempted.
------------------------------------------------------------
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization
parameter is defined to a value that's sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.
------------------------------------------------------------
Mon Sep 25 10:07:45 2017
RFS[20]: Assigned to RFS process 7107
RFS[20]: Selected log 1 for thread 1 sequence 11107 dbid 1103974919 branch 884618889
Mon Sep 25 10:07:45 2017
RFS[21]: Assigned to RFS process 7109
RFS[21]: Selected log 9 for thread 1 sequence 11108 dbid 1103974919 branch 884618889
Mon Sep 25 10:07:45 2017
Archived Log entry 211 added for thread 1 sequence 11108 ID 0x41cdfd03 dest 2:
Mon Sep 25 10:07:45 2017
Fetching gap sequence in thread 1, gap sequence 11103-11107
Mon Sep 25 10:07:46 2017
Archived Log entry 212 added for thread 1 sequence 11107 ID 0x41cdfd03 dest 2:
Mon Sep 25 10:07:46 2017
RFS[22]: Assigned to RFS process 7114
RFS[22]: Opened log for thread 1 sequence 11103 dbid 1103974919 branch 884618889
RFS[21]: Opened log for thread 1 sequence 11105 dbid 1103974919 branch 884618889
RFS[20]: Opened log for thread 1 sequence 11104 dbid 1103974919 branch 884618889
Archived Log entry 213 added for thread 1 sequence 11105 rlc 884618889 ID 0x41cdfd03 dest 3:
Archived Log entry 214 added for thread 1 sequence 11104 rlc 884618889 ID 0x41cdfd03 dest 3:
Mon Sep 25 10:07:56 2017
RFS[21]: Opened log for thread 1 sequence 11106 dbid 1103974919 branch 884618889
Archived Log entry 215 added for thread 1 sequence 11106 rlc 884618889 ID 0x41cdfd03 dest 3:
Mon Sep 25 10:08:01 2017
Archived Log entry 216 added for thread 1 sequence 11103 rlc 884618889 ID 0x41cdfd03 dest 3:
Mon Sep 25 10:08:02 2017
Media Recovery Log /u01/app/oracle/archivelog/1_11103_884618889.dbf
Media Recovery Log /u01/app/oracle/archivelog/2_9767_884618889.dbf
Media Recovery Log /u01/app/oracle/archivelog/1_11104_884618889.dbf
Media Recovery Log /u01/app/oracle/archivelog/2_9768_884618889.dbf
Media Recovery Log /u01/app/oracle/archivelog/2_9769_884618889.dbf
Media Recovery Log /u01/app/oracle/archivelog/2_9770_884618889.dbf
Media Recovery Log /u01/app/oracle/archivelog/1_11105_884618889.dbf
Media Recovery Log /u01/app/oracle/archivelog/1_11106_884618889.dbf
Media Recovery Log /u01/app/oracle/archivelog/2_9771_884618889.dbf
Media Recovery Log /u01/app/oracle/archivelog/1_11107_884618889.dbf
Media Recovery Waiting for thread 2 sequence 9772 (in transit)

リポジトリの表示standby_log使用状態で、割り当てられていないことが判明しました.
SQL> select GROUP#,THREAD#,SEQUENCE#,USED,ARCHIVED,STATUS from v$standby_log;
    GROUP#    THREAD#  SEQUENCE#       USED ARC STATUS
---------- ---------- ---------- ---------- --- ----------
         1          1          0          0 NO  UNASSIGNED
         2          2          0          0 NO  UNASSIGNED
         9          1          0          0 YES UNASSIGNED
        10          2          0          0 YES UNASSIGNED
        11          1          0          0 YES UNASSIGNED
        12          2          0          0 YES UNASSIGNED
        13          1          0          0 YES UNASSIGNED
        14          2          0          0 YES UNASSIGNED

詳細については、以下を参照してください.http://blog.itpub.net/article.php?url=http://blog.itpub.net/26736162/viewspace-2121688