Sunday, November 17, 2013

Resolving Gaps in DataGuard Physical Standby Using RMAN Incremental Backup

Note: To perform this test purpose only. disabled the log_archive_dest_state_2='defer' in  primary database location using command
alter system set log_archive_dest_state_2='DEFER';

until the test is implemented. then enable the 
parameter in primary database location using command
sql>alter system set log_archive_dest_state_2='ENABLE';

In Primary Database

SQL> 
archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive 
destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     223
Next log sequence to archive   225
Current log sequence           225

SQL> select current_scn from v$database;

    CURRENT_SCN
---------------
        1062658

In 
Standby Database (physical standby)
SQL> archive log list;
Database log 
mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/
oracle/flash_recovery_area/SURIYA/onlinelog
Oldest online log sequence     81
Next log sequence to archive   0
Current log sequence           224

SQL> select current_scn from v$database;
    CURRENT_SCN
---------------
        1061314


Alert 
log file file of Standby Database

Sun Sep 30 03:16:40 2012
Archived Log entry 238 added for thread 1 sequence 224 
ID 0xc53dd54c dest 1:
Sun Sep 30 03:16:42 2012
Media Recovery Log /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_224_795237478.dbf
Media Recovery Waiting for thread 1 sequence 225

Alert log file file of primary Database

Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
ALTER SYSTEM SET log_archive_dest_state_2='DEFER' 
SCOPE=MEMORY;
Sun Sep 30 03:16:40 2012
Thread 1 advanced to log sequence 225 (LGWR switch)
  Current log# 3 seq# 225 mem# 0: /u01/app/oracle/oradata/suriya/redo03.log
Sun Sep 30 03:16:40 2012


Command to check sequence are received and applied on primary and standby database

SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference" FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#))ARCH, (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL WHERE ARCH.THREAD# = APPL.THREAD# ORDER BY 1;

Output

         Thread Last Sequence Received Last Sequence Applied      Difference
--------------- ---------------------- --------------------- ---------------
              1                    224                   224               0
        
In Standby Database

SQL> alter database recover managed standby database cancel;

Database altered.

Perform 
Rman Incremental backup from Primary database
[oracle@rak3 trace]$ . oraenv
ORACLE_SID = [oracle] ? suriyadr
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle
[oracle@rak3 trace]$ rman target=/

Recovery 
Manager: Release 11.2.0.1.0 - Production on Sun Sep 30 03:45:52 2012

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

connected to target database: SURIYA (DBID=3309137318)

RMAN> run {
allocate channel c1 type disk format '/tmp/suriyabak/%U.rmb';
backup incremental from scn 1061314 database;
}

using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=50 device type=DISK

Starting backup at 30-SEP-12

backup will be 
obsolete on date 07-OCT-12
archived logs will not be kept or backed up
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/suriyadr/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/suriyadr/sysaux01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/suriyadr/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/suriyadr/users01.dbf
channel c1: starting piece 1 at 30-SEP-12
channel c1: finished piece 1 at 30-SEP-12
piece handle=/tmp/suriyabak/03nmfd5c_1_1.rmb tag=TAG20120930T034652 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:36

backup will be obsolete on date 07-OCT-12
archived logs will not be kept or backed up
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including current control file in backup set
channel c1: starting piece 1 at 30-SEP-12
channel c1: finished piece 1 at 30-SEP-12
piece handle=/tmp/suriyabak/04nmfd6h_1_1.rmb tag=TAG20120930T034652 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 30-SEP-12
released channel: c1

RMAN> exit


Recovery Manager complete.
[oracle@rak3 trace]$ cd /tmp/suriyabak/
[oracle@rak3 suriyabak]$ ls
03nmfd5c_1_1.rmb  04nmfd6h_1_1.rmb
[oracle@rak3 suriyabak]$


[oracle@rak3 tmp]$ ls
suriyabak      

[oracle@rak3 tmp]$ tar -cvf suriyabak.tar.gz suriyabak
suriyabak/
suriyabak/04nmfd6h_1_1.rmb
suriyabak/03nmfd5c_1_1.rmb
[oracle@rak3 tmp]$ ls suri*
suriyabak.tar.gz

suriyabak:
03nmfd5c_1_1.rmb  04nmfd6h_1_1.rmb
[oracle@rak3 tmp]$ scp suriyabak.tar.gz oracle@192.168.1.81:/tmp/
suriyabak.tar.gz                                                                                                                                                                                          100%   14MB  13.7MB/s   00:00   
[oracle@rak3 tmp]$

In Physical Standby Locatoin

[oracle@rak1 tmp]$ tar -cvf suriyabak.tar.gz
tar: Cowardly refusing to create an empty archive
Try `tar --help' or `tar --usage' for more information.
[oracle@rak1 tmp]$ tar -xvf suriyabak.tar.gz
suriyabak/
suriyabak/04nmfd6h_1_1.rmb
suriyabak/03nmfd5c_1_1.rmb
[oracle@rak1 tmp]$ ls
suriyabak        

[oracle@rak1 tmp]$
[oracle@rak1 tmp]$ cd suriyabak
[oracle@rak1 suriyabak]$ ls
03nmfd5c_1_1.rmb  04nmfd6h_1_1.rmb
[oracle@rak1 suriyabak]$

In Primary Database location

SQL> show parameter control

NAME                                 TYPE VALUE
------------------------------------ ---- ------------------------------
control_file_record_keep_time        inte 7
                                     gerset
control_files                        stri /u01/app/oracle/oradata/suriya
                                     ng   dr/control01.ctl, /u01/app/ora
                                          cle/flash_recovery_area/suriya
                                          dr/control02.ctl
control_management_pack_access       stri DIAGNOSTIC+TUNING
                                     ng

SQL> alter database create standby controlfile as '/tmp/suriya_standby.ctl';

Database altered.

[oracle@rak3 tmp]$ ls sur*
suriyabak.tar.gz  suriya_standby.ctl

suriyabak:
03nmfd5c_1_1.rmb  04nmfd6h_1_1.rmb
[oracle@rak3 tmp]$ scp suriya_standby.ctl oracle@192.168.1.81:/tmp/
suriya_standby.ctl                                          


In Standby Database location

SQL> startup nomount
ORACLE instance started.

Total System Global Area       818401280 bytes
Fixed Size                       2217792 bytes
Variable Size                  507513024 bytes
Database Buffers               306184192 bytes
Redo Buffers                     2486272 bytes

SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      /u01/app/oracle/oradata/suriya
                                                 /control01.ctl, /u01/app/oracl
                                                 e/flash_recovery_area/suriya/c
                                                 ontrol02.ctl

[oracle@rak1 suriyabak]$ mv /u01/app/oracle/oradata/suriya/control01.ctl control01.ctl.bak
[oracle@rak1 suriyabak]$ cp /tmp/suriya_standby.ctl control01.ctl
[oracle@rak1 suriyabak]$ ls cont* /u01/app/oracle/oradata/suriya/
control01.ctl  control01.ctl.bak
[oracle@rak1 suriya]$ cp /tmp/suriya_standby.ctl /u01/app/oracle/flash_recovery_area/suriya/control02.ctl
[oracle@rak1 suriya]$

[oracle@rak1 suriya]$ ls con* /u01/app/oracle/flash_recovery_area/suriya/
/u01/app/oracle/flash_recovery_area/suriya/:
control02.ctl


SQL> alter database mount standby database;

Database altered.


RMAN> catalog start with '/tmp/suriyabak';
Starting implicit crosscheck backup at 30-SEP-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=31 device type=DISK
Crosschecked 2 objects
Finished implicit crosscheck backup at 30-SEP-12

Starting implicit crosscheck copy at 30-SEP-12
using channel ORA_DISK_1
Finished implicit crosscheck copy at 30-SEP-12

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_81_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_136_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_156_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_127_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_114_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_174_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_87_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_214_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_36_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_62_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_117_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_123_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_12_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_78_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_194_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_90_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_107_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_105_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_118_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_53_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_219_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_129_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_207_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_103_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_122_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_128_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_222_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_6_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_180_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_161_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_47_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_57_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_100_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_206_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_41_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_119_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_115_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_49_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_94_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_204_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_9_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_51_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_121_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_209_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_18_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_79_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_164_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_32_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_143_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_170_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_212_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_137_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_65_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_146_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_72_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_109_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_85_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_152_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_19_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_42_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_221_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_73_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_38_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_93_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_188_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_28_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_216_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_187_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_151_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_24_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_202_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_132_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_158_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_80_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_217_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_139_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_177_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_58_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_110_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_144_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_61_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_199_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_25_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_37_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_20_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_150_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_134_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_89_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_75_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_160_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_50_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_141_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_76_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_200_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_66_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_195_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_8_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_31_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_211_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_33_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_52_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_113_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_184_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_14_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_68_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_203_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_101_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_153_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_189_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_131_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_125_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_130_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_23_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_183_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_99_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_71_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_135_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_198_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_186_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_168_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_82_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_178_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_69_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_11_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_124_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_48_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_116_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_64_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_157_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_86_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_45_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_210_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_201_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_91_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_166_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_16_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_147_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_176_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_22_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_102_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_77_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_165_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_171_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_92_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_74_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_39_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_63_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_193_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_70_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_220_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_55_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_172_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_54_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_7_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_192_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_46_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_185_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_196_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_126_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_26_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_175_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_154_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_104_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_98_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_111_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_97_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_133_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_140_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_149_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_60_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_15_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_88_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_21_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_148_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_30_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_59_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_40_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_35_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_67_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_112_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_224_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_197_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_191_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_182_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_223_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_142_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_179_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_181_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_10_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_120_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_218_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_213_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_138_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_215_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_83_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_163_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_44_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_56_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_167_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_145_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_162_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_29_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_34_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_159_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_13_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_27_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_95_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_173_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_84_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_169_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_96_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_190_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_43_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_17_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_106_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_208_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_155_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_205_795237478.dbf
File Name: /u01/app/oracle/flash_recovery_area/SURIYA/onlinelog/1_108_795237478.dbf

searching for all files that match the pattern /tmp/suriyabak

List of Files Unknown to the Database
=====================================
File Name: /tmp/suriyabak.tar.gz
File Name: /tmp/suriyabak/control01.ctl.bak
File Name: /tmp/suriyabak/control02.ctl.bak
File Name: /tmp/suriyabak/show
File Name: /tmp/suriyabak/control01.ctl

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

List of Cataloged Files
=======================
File Name: /tmp/suriyabak/control01.ctl.bak
File Name: /tmp/suriyabak/control02.ctl.bak
File Name: /tmp/suriyabak/control01.ctl


RMAN> recover database;

Starting recover at 30-SEP-12
using channel ORA_DISK_1
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: /u01/app/oracle/oradata/suriya/system01.dbf
destination for restore of datafile 00002: /u01/app/oracle/oradata/suriya/sysaux01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/suriya/undotbs01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/suriya/users01.dbf
channel ORA_DISK_1: reading from backup piece /tmp/suriyabak/03nmfd5c_1_1.rmb
channel ORA_DISK_1: piece handle=/tmp/suriyabak/03nmfd5c_1_1.rmb tag=TAG20120930T034652
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

starting media recovery

unable to find archived log
archived log thread=1 sequence=225
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/30/2012 04:22:16
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 225 and starting SCN of 1063718

(note: This always happens becoz we have come to know the last of the archived logs. The requested archived log with sequence# 1063718 which is not generated yet.)

In Standby Database

SQL> alter database recover managed standby database disconnect from session;

Database altered.


SQL>  select current_scn from v$database;
    CURRENT_SCN
---------------
        1064789


Primary Database (wait for some time scn number change frequently)

SQL>  select current_scn from v$database;
    CURRENT_SCN
---------------
        1064789

No comments:

Post a Comment