Data Guard出现gap sequence修复

来源:互联网 发布:python 培训 郑州 编辑:程序博客网 时间:2024/05/21 19:07
在做 用R/W方式打开standby数据库,创建一个对象,然后通过flashback database将standby db
恢复到打开前的状态
作业时,故意没有
    执行
    SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;

    System altered.

    就开始暂停日志同步了

    SQL> altem set log_archive_dest_state_2=defer;

    System altered.

完成作业后,再重启STANDBY 备库,发现日志报错:

Fri Aug 02 14:45:16 2013
FAL[client]: Failed to request gap sequence
 GAP - thread 1 sequence 124-126
 DBID 1415856135 branch 821992519
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 is sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.
-------------------------------------------------------------

参考了一些资料,下面是做修复的过程
修复:

#1.查询备库中的GAP 出现时的最小SEQ

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Database altered.

SQL>

SQL> SQL>
SQL> select FIRST_CHANGE#  from v$archived_log where SEQUENCE#  =124;

FIRST_CHANGE#
-------------
      1042758


#2 确认主库是否有添加数据文件


SQL> select FILE#,name from v$datafile where CREATION_CHANGE#> =1042758;

no rows selected

SQL>


#3 主库增量备份,并拷贝到备库
[oracle@dg1 dbs]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Aug 2 15:42:24 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DB1 (DBID=1415856135)

RMAN> backup incremental from SCN 1042758 DATABASE FORMAT '/home/oracle/xff_%U' TAG 'XIFENFEI';

Starting backup at 2013-08-02 15:43:30

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=140 device type=DISK
backup will be obsolete on date 2013-08-09 15:43:33
archived logs will not be kept or backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/opt/app/oracle/oradata/DB1/system01.dbf
input datafile file number=00002 name=/opt/app/oracle/oradata/DB1/sysaux01.dbf
input datafile file number=00003 name=/opt/app/oracle/oradata/DB1/undotbs01.dbf
input datafile file number=00004 name=/opt/app/oracle/oradata/DB1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2013-08-02 15:43:34
channel ORA_DISK_1: finished piece 1 at 2013-08-02 15:47:16
piece handle=/home/oracle/xff_3roga0h6_1_1 tag=XIFENFEI comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:42

using channel ORA_DISK_1
backup will be obsolete on date 2013-08-09 15:47:16
archived logs will not be kept or backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 2013-08-02 15:47:20
channel ORA_DISK_1: finished piece 1 at 2013-08-02 15:47:23
piece handle=/home/oracle/xff_3soga0o4_1_1 tag=XIFENFEI comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 2013-08-02 15:47:23

RMAN>
#4.备份控制文件
RMAN> backup current controlfile for standby format '/home/oracle/xff_ctl.bak';

Starting backup at 2013-08-02 15:57:29
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=25 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including standby control file in backup set
channel ORA_DISK_1: starting piece 1 at 2013-08-02 15:57:33
channel ORA_DISK_1: finished piece 1 at 2013-08-02 15:57:37
piece handle=/home/oracle/xff_ctl.bak tag=TAG20130802T155732 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 2013-08-02 15:57:37

Starting Control File and SPFILE Autobackup at 2013-08-02 15:57:37
piece handle=/opt/app/oracle/flash_recovery_area/DB1/autobackup/2013_08_02/o1_mf_s_822412657_8zpsmkpx_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2013-08-02 15:57:40

RMAN>

 拷贝:
[oracle@dg1 ~]$ scp xff* dg2:/home/oracle/
xff_3roga0h6_1_1                                      100%   41MB   4.6MB/s   00:09    
xff_3soga0o4_1_1                                      100% 9792KB   3.2MB/s   00:03    
xff_ctl.bak                                           100% 9792KB   3.2MB/s   00:03
[oracle@dg1 ~]$



务库中恢复:

[oracle@dg2 flash_recovery_area]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Aug 2 15:54:10 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DB1 (DBID=1415856135, not open)

RMAN> catalog start with '/home/oracle';

using target database control file instead of recovery catalog
searching for all files that match the pattern /home/oracle

List of Files Unknown to the Database
=====================================
File Name: /home/oracle/.bash_history
File Name: /home/oracle/.xsession-errors
File Name: /home/oracle/.gconf/desktop/gnome/accessibility/keyboard/%gconf.xml
File Name: /home/oracle/.gconf/desktop/gnome/accessibility/%gconf.xml
File Name: /home/oracle/.gconf/desktop/gnome/%gconf.xml
File Name: /home/oracle/.gconf/desktop/%gconf.xml
File Name: /home/oracle/.gconf/apps/puplet/%gconf.xml
File Name: /home/oracle/.gconf/apps/panel/applets/window_list/prefs/%gconf.xml
File Name: /home/oracle/.gconf/apps/panel/applets/window_list/%gconf.xml
File Name: /home/oracle/.gconf/apps/panel/applets/clock/prefs/%gconf.xml
File Name: /home/oracle/.gconf/apps/panel/applets/clock/%gconf.xml
File Name: /home/oracle/.gconf/apps/panel/applets/%gconf.xml
File Name: /home/oracle/.gconf/apps/panel/applets/workspace_switcher/prefs/%gconf.xml
File Name: /home/oracle/.gconf/apps/panel/applets/workspace_switcher/%gconf.xml
File Name: /home/oracle/.gconf/apps/panel/%gconf.xml
File Name: /home/oracle/.gconf/apps/%gconf.xml
File Name: /home/oracle/.gconfd/saved_state
File Name: /home/oracle/.metacity/sessions/1373277751-6219-1507580719.ms
File Name: /home/oracle/.gtkrc-1.2-gnome2
File Name: /home/oracle/LOG_cat_owb.TXT
File Name: /home/oracle/.ICEauthority
File Name: /home/oracle/.chewing/uhash.dat
File Name: /home/oracle/.bash_profile
File Name: /home/oracle/.bashrc
File Name: /home/oracle/.nautilus/metafiles/x-nautilus-desktop:%2F%2F%2F.xml
File Name: /home/oracle/.bash_logout
File Name: /home/oracle/.gstreamer-0.10/registry.i686.bin
File Name: /home/oracle/.dmrc
File Name: /home/oracle/.Xauthority
File Name: /home/oracle/.zshrc
File Name: /home/oracle/.viminfo
File Name: /home/oracle/.emacs
File Name: /home/oracle/install2013-07-17_17-04-10.log
File Name: /home/oracle/install2013-07-09_18-48-31.log
File Name: /home/oracle/inittdg.ora
File Name: /home/oracle/.ssh/known_hosts
File Name: /home/oracle/.ssh/id_dsa.pub
File Name: /home/oracle/.ssh/id_rsa
File Name: /home/oracle/.ssh/id_rsa.pub
File Name: /home/oracle/.ssh/id_dsa
File Name: /home/oracle/.ssh/authorized_keys
File Name: /home/oracle/install2013-07-05_13-05-40.log
File Name: /home/oracle/install2013-07-16_16-48-45.log
File Name: /home/oracle/.gnome2/share/fonts/fonts.dir
File Name: /home/oracle/.gnome2/share/cursor-fonts/fonts.dir
File Name: /home/oracle/xff_3soga0o4_1_1
File Name: /home/oracle/.gnome/gnome-vfs/.trash_entry_cache
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/metadata/ADR_CONTROL.ams
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/metadata/INC_METER_IMPT_DEF.ams
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/metadata/ADR_INVALIDATION.ams
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/metadata/INC_METER_PK_IMPTS.ams
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/alert/log.xml
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/lck/AM_1744845641_3861997533.lck
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/lck/AM_3216668543_3129272988.lck
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/lck/AM_1096102262_3454819329.lck
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/lck/AM_1096102193_3488045378.lck
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/trace/sqlnet.log
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/metadata/ADR_CONTROL.ams
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/metadata/INC_METER_IMPT_DEF.ams
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/metadata/ADR_INVALIDATION.ams
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/metadata/INC_METER_PK_IMPTS.ams
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/alert/log.xml
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/lck/AM_1744845641_3861997533.lck
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/lck/AM_3216668543_3129272988.lck
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/lck/AM_1096102262_3454819329.lck
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/lck/AM_1096102193_3488045378.lck
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/trace/sqlnet.log
File Name: /home/oracle/xff_3roga0h6_1_1
File Name: /home/oracle/install2013-07-26_11-34-30.log

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /home/oracle/xff_3soga0o4_1_1
File Name: /home/oracle/xff_3roga0h6_1_1

List of Files Which Where Not Cataloged
=======================================
File Name: /home/oracle/.bash_history
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.xsession-errors
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/desktop/gnome/accessibility/keyboard/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/desktop/gnome/accessibility/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/desktop/gnome/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/desktop/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/apps/puplet/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/apps/panel/applets/window_list/prefs/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/apps/panel/applets/window_list/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/apps/panel/applets/clock/prefs/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/apps/panel/applets/clock/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/apps/panel/applets/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/apps/panel/applets/workspace_switcher/prefs/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/apps/panel/applets/workspace_switcher/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/apps/panel/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconf/apps/%gconf.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gconfd/saved_state
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.metacity/sessions/1373277751-6219-1507580719.ms
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gtkrc-1.2-gnome2
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/LOG_cat_owb.TXT
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.ICEauthority
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.chewing/uhash.dat
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.bash_profile
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.bashrc
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.nautilus/metafiles/x-nautilus-desktop:%2F%2F%2F.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.bash_logout
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gstreamer-0.10/registry.i686.bin
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.dmrc
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.Xauthority
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.zshrc
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.viminfo
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.emacs
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/install2013-07-17_17-04-10.log
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/install2013-07-09_18-48-31.log
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/inittdg.ora
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.ssh/known_hosts
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.ssh/id_dsa.pub
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.ssh/id_rsa
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.ssh/id_rsa.pub
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.ssh/id_dsa
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.ssh/authorized_keys
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/install2013-07-05_13-05-40.log
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/install2013-07-16_16-48-45.log
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gnome2/share/fonts/fonts.dir
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gnome2/share/cursor-fonts/fonts.dir
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/.gnome/gnome-vfs/.trash_entry_cache
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/metadata/ADR_CONTROL.ams
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/metadata/INC_METER_IMPT_DEF.ams
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/metadata/ADR_INVALIDATION.ams
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/metadata/INC_METER_PK_IMPTS.ams
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/alert/log.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/lck/AM_1744845641_3861997533.lck
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/lck/AM_3216668543_3129272988.lck
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/lck/AM_1096102262_3454819329.lck
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/lck/AM_1096102193_3488045378.lck
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_393248165_76/trace/sqlnet.log
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/metadata/ADR_CONTROL.ams
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/metadata/INC_METER_IMPT_DEF.ams
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/metadata/ADR_INVALIDATION.ams
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/metadata/INC_METER_PK_IMPTS.ams
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/alert/log.xml
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/lck/AM_1744845641_3861997533.lck
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/lck/AM_3216668543_3129272988.lck
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/lck/AM_1096102262_3454819329.lck
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/lck/AM_1096102193_3488045378.lck
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/oradiag_oracle/diag/clients/user_oracle/host_378596923_76/trace/sqlnet.log
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/install2013-07-26_11-34-30.log
  RMAN-07517: Reason: The file header is corrupted

RMAN> recover database noredo;

Starting recover at 2013-08-02 15:55:11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=14 device type=DISK
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /opt/app/oracle/oradata/DB1/system01.dbf
destination for restore of datafile 00002: /opt/app/oracle/oradata/DB1/sysaux01.dbf
destination for restore of datafile 00003: /opt/app/oracle/oradata/DB1/undotbs01.dbf
destination for restore of datafile 00004: /opt/app/oracle/oradata/DB1/users01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/xff_3roga0h6_1_1
channel ORA_DISK_1: piece handle=/home/oracle/xff_3roga0h6_1_1 tag=XIFENFEI
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15

Finished recover at 2013-08-02 15:55:30

RMAN>


恢复控制文件

SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 2042241024 bytes
Fixed Size            1337548 bytes
Variable Size          503318324 bytes
Database Buffers     1526726656 bytes
Redo Buffers           10858496 bytes
SQL>

RMAN> RESTORE STANDBY CONTROLFILE FROM '/home/oracle/rman/xff_ctl.bck';

Starting restore at 2013-08-02 16:05:40
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/02/2013 16:05:51
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

RMAN> RESTORE STANDBY CONTROLFILE FROM '/home/oracle/xff_ctl.bak';         

Starting restore at 2013-08-02 16:06:12
using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
output file name=/opt/app/oracle/oradata/DB1/control01.ctl
output file name=/opt/app/oracle/flash_recovery_area/DB1/control02.ctl
Finished restore at 2013-08-02 16:06:29

RMAN>


检测是否成功,在主库中查询当前最大归档号,并插入数据,切换日志
SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
       135

SQL> insert into test values(17);

1 row created.

SQL> select count(0) from test;

  COUNT(0)
----------
    17

SQL> commit;

Commit complete.

SQL> alter system switch logfile;

System altered.

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
       136



切换前和切换后,在备库中查询 确认变化:

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
       135

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
       136


说明已经成功的。

在备库打开到STANDBY 时,看到ALERT.LOG日志 对standby_redo01.log 的处理。
后查看在线日志文件,文件大小是如此的一致,应该是全部重新生成?? :


[oracle@dg2 DB1]$ ll *.log
-rw-r----- 1 oracle oinstall 52429312 08-02 16:08 redo01.log
-rw-r----- 1 oracle oinstall 52429312 08-02 16:08 redo02.log
-rw-r----- 1 oracle oinstall 52429312 08-02 16:09 redo03.log
-rw-r----- 1 oracle oinstall 52429312 08-02 16:16 standby_redo01.log
-rw-r----- 1 oracle oinstall 52429312 08-02 16:11 standby_redo02.log
-rw-r----- 1 oracle oinstall 52429312 08-02 16:11 standby_redo03.log
-rw-r----- 1 oracle oinstall 52429312 08-02 16:11 standby_redo04.log



alter database recover managed standby database disconnect from session
Attempt to start background Managed Standby Recovery process (DB1)
Fri Aug 02 16:10:15 2013
MRP0 started with pid=29, OS id=30370
MRP0: Background Managed Standby Recovery process started (DB1)
 started logmerger process
Fri Aug 02 16:10:20 2013
Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 2 slaves
Completed: alter database recover managed standby database disconnect from session
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Log /opt/app/oracle/oradata/DB1/ARC1351821992519.arc
Datafile 1 added to flashback set
Datafile 2 added to flashback set
Datafile 3 added to flashback set
Datafile 4 added to flashback set
Media Recovery Waiting for thread 1 sequence 136 (in transit)
Fri Aug 02 16:11:24 2013
SRL log 4 needs clearing because log has not been created
Errors in file /opt/app/oracle/diag/rdbms/db2/DB1/trace/DB1_rfs_30317.trc:
ORA-00367: checksum error in log file header
ORA-00315: log 4 of thread 0, wrong thread # 1 in header
ORA-00312: online log 4 thread 0: '/opt/app/oracle/oradata/DB1/standby_redo01.log'
SRL log 5 needs clearing because log has not been created
Errors in file /opt/app/oracle/diag/rdbms/db2/DB1/trace/DB1_rfs_30317.trc:
ORA-00367: checksum error in log file header
ORA-00315: log 5 of thread 0, wrong thread # 1 in header
ORA-00312: online log 5 thread 0: '/opt/app/oracle/oradata/DB1/standby_redo02.log'
SRL log 6 needs clearing because log has not been created
Errors in file /opt/app/oracle/diag/rdbms/db2/DB1/trace/DB1_rfs_30317.trc:
ORA-00367: checksum error in log file header
ORA-00315: log 6 of thread 0, wrong thread # 1 in header
ORA-00312: online log 6 thread 0: '/opt/app/oracle/oradata/DB1/standby_redo03.log'
SRL log 5 needs clearing because log has not been created
Errors in file /opt/app/oracle/diag/rdbms/db2/DB1/trace/DB1_rfs_30317.trc:
ORA-00367: checksum error in log file header
ORA-00315: log 5 of thread 0, wrong thread # 1 in header
ORA-00312: online log 5 thread 0: '/opt/app/oracle/oradata/DB1/standby_redo02.log'
SRL log 6 needs clearing because log has not been created
Errors in file /opt/app/oracle/diag/rdbms/db2/DB1/trace/DB1_rfs_30317.trc:
ORA-00367: checksum error in log file header
ORA-00315: log 6 of thread 0, wrong thread # 1 in header
ORA-00312: online log 6 thread 0: '/opt/app/oracle/oradata/DB1/standby_redo03.log'
SRL log 6 needs clearing because log has not been created
Errors in file /opt/app/oracle/diag/rdbms/db2/DB1/trace/DB1_rfs_30317.trc:
ORA-00367: checksum error in log file header
ORA-00315: log 6 of thread 0, wrong thread # 1 in header
ORA-00312: online log 6 thread 0: '/opt/app/oracle/oradata/DB1/standby_redo03.log'
RFS[2]: No standby redo logfiles of size 102400 blocks available
Clearing online log 6 of thread 0 sequence number 0


参考:

http://www.xifenfei.com/1176.html
原创粉丝点击