Tuesday, April 09, 2013

Re-create disk copy

Due to certain reason, e.g. restore database from 3rd party script, causing datafile copy is FRA is out of sync. The simple way is to re-create it , if sizing is small.

The following illustrates.

1. clean-up and restore copy backed up by 3rd-party script.i.e gzip.

orarac2poc:TTS:/u02/oradata/TTS> ls -lrt
total 1980808
drwxr-xr-x 3 oracle oinstall      4096 Mar 27 09:33 FRA
drwxr-xr-x 2 oracle oinstall      4096 Apr  2 16:57 bak
drwxr-xr-x 2 oracle oinstall      4096 Apr  2 18:23 redo
-rw-r----- 1 oracle oinstall   5256561 Apr  3 10:48 temp01.dbf.gz
-rw-r----- 1 oracle oinstall    799689 Apr  3 14:31 redo03.log.gz
-rw-r----- 1 oracle oinstall    799689 Apr  3 14:31 redo02.log.gz
-rw-r----- 1 oracle oinstall     13611 Apr  3 14:48 users01.dbf.gz
-rw-r----- 1 oracle oinstall   4732791 Apr  3 14:48 undotbs01.dbf.gz
-rw-r----- 1 oracle oinstall   1137519 Apr  3 14:48 tts1_01.bdf.gz
-rw-r----- 1 oracle oinstall     24347 Apr  3 14:48 testtbs1.dbf.gz
-rw-r----- 1 oracle oinstall 127968739 Apr  3 14:48 system01.dbf.gz
-rw-r----- 1 oracle oinstall  76441224 Apr  3 14:48 sysaux01.dbf.gz
-rw-r----- 1 oracle oinstall   1092464 Apr  3 14:48 redo01.log.gz
-rw-r----- 1 oracle oinstall     44409 Apr  3 14:48 control02.ctl.gz
-rw-r----- 1 oracle oinstall     44409 Apr  3 14:48 control01.ctl.gz
-rw-r----- 1 oracle oinstall   5251072 Apr  3 16:06 users01.dbf
-rw-r----- 1 oracle oinstall 387981312 Apr  3 16:06 undotbs01.dbf
-rw-r----- 1 oracle oinstall  20979712 Apr  3 16:06 tts1_01.bdf
-rw-r----- 1 oracle oinstall  10493952 Apr  3 16:06 testtbs1.dbf
-rw-r----- 1 oracle oinstall 734011392 Apr  3 16:06 system01.dbf
-rw-r----- 1 oracle oinstall 629153792 Apr  3 16:06 sysaux01.dbf
-rw-r----- 1 oracle asmadmin  10010624 Apr  3 16:06 control02.ctl
-rw-r----- 1 oracle asmadmin  10010624 Apr  3 16:06 control01.ctl
orarac2poc:TTS:/u02/oradata/TTS> rm *.*
orarac2poc:TTS:/u02/oradata/TTS> cd FRA/TTS/datafile/
orarac2poc:TTS:/u02/oradata/TTS/FRA/TTS/datafile> ls -l
total 1747704
-rw-r----- 1 oracle asmadmin 629153792 Apr  3 11:38 o1_mf_sysaux_8oq8dz2z_.dbf
-rw-r----- 1 oracle asmadmin 734011392 Apr  3 11:38 o1_mf_system_8oq8d5dn_.dbf
-rw-r----- 1 oracle asmadmin  10493952 Apr  3 11:38 o1_mf_testtbs_8oq8g8v0_.dbf
-rw-r----- 1 oracle asmadmin  20979712 Apr  3 11:38 o1_mf_tts1_8oq8g7q4_.dbf
-rw-r----- 1 oracle asmadmin 387981312 Apr  3 11:38 o1_mf_undotbs1_8oq8frjc_.dbf
-rw-r----- 1 oracle asmadmin   5251072 Apr  3 11:38 o1_mf_users_8oq8gb1t_.dbf
orarac2poc:TTS:/u02/oradata/TTS/FRA/TTS/datafile> rm *
orarac2poc:TTS:/u02/oradata/TTS/FRA/TTS/datafile> cd -
/u02/oradata/TTS
orarac2poc:TTS:/u02/oradata/TTS> ls -l bak
total 238000
-rw-r----- 1 oracle oinstall     42169 Apr  2 10:01 control01.ctl.gz
-rw-r----- 1 oracle oinstall     42169 Apr  2 10:01 control02.ctl.gz
-rw-r----- 1 oracle oinstall   9685619 Apr  2 10:01 redo01.log.gz
-rw-r----- 1 oracle oinstall   8651669 Apr  2 09:51 redo02.log.gz
-rw-r----- 1 oracle oinstall   8961895 Apr  2 09:51 redo03.log.gz
-rw-r----- 1 oracle oinstall  76427258 Apr  2 10:01 sysaux01.dbf.gz
-rw-r----- 1 oracle oinstall 127956050 Apr  2 10:01 system01.dbf.gz
-rw-r----- 1 oracle oinstall   5256561 Mar 31 00:00 temp01.dbf.gz
-rw-r----- 1 oracle oinstall     24375 Apr  2 10:01 testtbs1.dbf.gz
-rw-r----- 1 oracle oinstall   1137517 Apr  2 10:01 tts1_01.bdf.gz
-rw-r----- 1 oracle oinstall   5200907 Apr  2 10:01 undotbs01.dbf.gz
-rw-r----- 1 oracle oinstall     13515 Apr  2 10:01 users01.dbf.gz

orarac2poc:TTS:/u02/oradata/TTS> time cp ./bak/*.gz ./ ; gunzip *.gz

real    0m5.033s
user    0m0.050s
sys     0m1.651s
orarac2poc:TTS:/u02/oradata/TTS> ls -lrt
total 2005144
drwxr-xr-x 3 oracle oinstall      4096 Mar 27 09:33 FRA
drwxr-xr-x 2 oracle oinstall      4096 Apr  2 16:57 bak
drwxr-xr-x 2 oracle oinstall      4096 Apr  2 18:23 redo
-rw-r----- 1 oracle oinstall  52429312 Apr  3 17:28 redo03.log
-rw-r----- 1 oracle oinstall  52429312 Apr  3 17:28 redo02.log
-rw-r----- 1 oracle oinstall  52429312 Apr  3 17:28 redo01.log
-rw-r----- 1 oracle oinstall  10010624 Apr  3 17:28 control02.ctl
-rw-r----- 1 oracle oinstall  10010624 Apr  3 17:28 control01.ctl
-rw-r----- 1 oracle oinstall 629153792 Apr  3 17:28 sysaux01.dbf
-rw-r----- 1 oracle oinstall   5251072 Apr  3 17:28 users01.dbf
-rw-r----- 1 oracle oinstall 387981312 Apr  3 17:28 undotbs01.dbf
-rw-r----- 1 oracle oinstall  20979712 Apr  3 17:28 tts1_01.bdf
-rw-r----- 1 oracle oinstall  10493952 Apr  3 17:28 testtbs1.dbf
-rw-r----- 1 oracle oinstall  85991424 Apr  3 17:28 temp01.dbf
-rw-r----- 1 oracle oinstall 734011392 Apr  3 17:28 system01.dbf
orarac2poc:TTS:/u02/oradata/TTS> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Wed Apr 3 17:53:06 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SYS@TTS> startup
ORACLE instance started.

Total System Global Area  663908352 bytes
Fixed Size                  2229440 bytes
Variable Size             281021248 bytes
Database Buffers          373293056 bytes
Redo Buffers                7364608 bytes
Database mounted.
Database opened.
SYS@TTS> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
orarac2poc:TTS:/u02/oradata/TTS> rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Apr 3 17:53:42 2013

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

connected to target database: TTS (DBID=1769654909)

RMAN> list incarnation;

using target database control file instead of recovery catalog

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       TTS      1769654909       PARENT  1          2013-03-20:16:41:33
2       2       TTS      1769654909       PARENT  721427     2013-03-21:14:12:46
3       3       TTS      1769654909       PARENT  1009055    2013-03-27:09:44:13
4       4       TTS      1769654909       PARENT  1019618    2013-03-27:15:11:48
5       5       TTS      1769654909       PARENT  1021343    2013-03-27:15:43:03
6       6       TTS      1769654909       CURRENT 1147625    2013-03-28:17:35:21

RMAN> exit


Recovery Manager complete.
orarac2poc:TTS:/u02/oradata/TTS> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Wed Apr 3 17:54:03 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@TTS> select * from v$database_incarnation;

INCARNATION# RESETLOGS_CHANGE# RESETLOGS_TIME      PRIOR_RESETLOGS_CHANGE# PRIOR_RESETLOGS_TIM STATUS  RESETLOGS_ID
------------ ----------------- ------------------- ----------------------- ------------------- ------- ------------
PRIOR_INCARNATION# FLASHBACK_DATABASE_ALLOWED
------------------ --------------------------
           1                 1 2013-03-20:16:41:33                       0                     PARENT     810578493
                 0 NO

           2            721427 2013-03-21:14:12:46                       1 2013-03-20:16:41:33 PARENT     810655966
                 1 NO

           3           1009055 2013-03-27:09:44:13                  721427 2013-03-21:14:12:46 PARENT     811158253
                 2 NO

           4           1019618 2013-03-27:15:11:48                 1009055 2013-03-27:09:44:13 PARENT     811177908
                 3 NO

           5           1021343 2013-03-27:15:43:03                 1019618 2013-03-27:15:11:48 PARENT     811179783
                 4 NO

           6           1147625 2013-03-28:17:35:21                 1021343 2013-03-27:15:43:03 CURRENT    811272921
                 5 NO


6 rows selected.

SYS@TTS> exit

--although the incarnation number is the same.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

2. The error
orarac2poc:TTS:/u02/oradata/TTS> rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Apr 3 17:54:15 2013

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

connected to target database: TTS (DBID=1769654909)

RMAN>  backup incremental level 1 for recover of copy with tag daily_incr database;

Starting backup at 2013-04-03:17:54:25
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u02/oradata/TTS/system01.dbf
input datafile file number=00002 name=/u02/oradata/TTS/sysaux01.dbf
input datafile file number=00003 name=/u02/oradata/TTS/undotbs01.dbf
input datafile file number=00005 name=/u02/oradata/TTS/tts1_01.bdf
input datafile file number=00006 name=/u02/oradata/TTS/testtbs1.dbf
input datafile file number=00004 name=/u02/oradata/TTS/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2013-04-03:17:54:27
channel ORA_DISK_1: finished piece 1 at 2013-04-03:17:54:52
piece handle=/u02/oradata/TTS/FRA/TTS/backupset/2013_04_03/o1_mf_nnnd1_DAILY_INCR_8oqz2mpb_.bkp tag=DAILY_INCR comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 2013-04-03:17:54:52

Starting Control File and SPFILE Autobackup at 2013-04-03:17:54:52
piece handle=/u02/oradata/TTS/FRA/TTS/autobackup/2013_04_03/o1_mf_s_811792493_8oqz3ffz_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2013-04-03:17:54:54

RMAN> backup as backupset archivelog all not backed up delete all input;

Starting backup at 2013-04-03:17:55:01
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=7 RECID=50 STAMP=811792501
channel ORA_DISK_1: starting piece 1 at 2013-04-03:17:55:02
channel ORA_DISK_1: finished piece 1 at 2013-04-03:17:55:03
piece handle=/u02/oradata/TTS/FRA/TTS/backupset/2013_04_03/o1_mf_annnn_TAG20130403T175501_8oqz3p7x_.bkp tag=TAG20130403T175501 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u02/oradata/TTS/FRA/TTS/archivelog/2013_04_03/o1_mf_1_7_8oqz3o6p_.arc RECID=50 STAMP=811792501
Finished backup at 2013-04-03:17:55:03

Starting Control File and SPFILE Autobackup at 2013-04-03:17:55:03
piece handle=/u02/oradata/TTS/FRA/TTS/autobackup/2013_04_03/o1_mf_s_811792503_8oqz3qjz_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2013-04-03:17:55:04

RMAN> recover device type disk copy of database with tag daily_incr;

Starting recover at 2013-04-03:17:55:13
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile copies to recover
recovering datafile copy file number=00001 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_system_8ondf6qx_.dbf
recovering datafile copy file number=00002 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_sysaux_8ondgc21_.dbf
recovering datafile copy file number=00003 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_undotbs1_8ondhgcv_.dbf
recovering datafile copy file number=00004 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_users_8ondhyp8_.dbf
recovering datafile copy file number=00005 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_tts1_8ondhxjj_.dbf
recovering datafile copy file number=00006 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_testtbs_8onfncom_.dbf
channel ORA_DISK_1: reading from backup piece /u02/oradata/TTS/FRA/TTS/backupset/2013_04_03/o1_mf_nnnd1_DAILY_INCR_8oqz2mpb_.bkp
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/03/2013 17:55:15
ORA-19870: error while restoring backup piece /u02/oradata/TTS/FRA/TTS/backupset/2013_04_03/o1_mf_nnnd1_DAILY_INCR_8oqz2mpb_.bkp
ORA-19625: error identifying file /u02/oradata/TTS/FRA/TTS/datafile/o1_mf_system_8ondf6qx_.dbf
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3


RMAN> exit


Recovery Manager complete.
orarac2poc:TTS:/u02/oradata/TTS> ls -l /u02/oradata/TTS/FRA/TTS/datafile/
total 0
orarac2poc:TTS:/u02/oradata/TTS> rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Apr 3 17:56:56 2013

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

connected to target database: TTS (DBID=1769654909)

RMAN>  backup incremental level 1 for recover of copy with tag daily_incr database;

Starting backup at 2013-04-03:17:57:06
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=16 device type=DISK
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u02/oradata/TTS/system01.dbf
input datafile file number=00002 name=/u02/oradata/TTS/sysaux01.dbf
input datafile file number=00003 name=/u02/oradata/TTS/undotbs01.dbf
input datafile file number=00005 name=/u02/oradata/TTS/tts1_01.bdf
input datafile file number=00006 name=/u02/oradata/TTS/testtbs1.dbf
input datafile file number=00004 name=/u02/oradata/TTS/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2013-04-03:17:57:08
channel ORA_DISK_1: finished piece 1 at 2013-04-03:17:57:33
piece handle=/u02/oradata/TTS/FRA/TTS/backupset/2013_04_03/o1_mf_nnnd1_DAILY_INCR_8oqz7n3b_.bkp tag=DAILY_INCR comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 2013-04-03:17:57:33

Starting Control File and SPFILE Autobackup at 2013-04-03:17:57:33
piece handle=/u02/oradata/TTS/FRA/TTS/autobackup/2013_04_03/o1_mf_s_811792653_8oqz8fxq_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2013-04-03:17:57:34

RMAN> exit


Recovery Manager complete.
orarac2poc:TTS:/u02/oradata/TTS> ls -l /u02/oradata/TTS/FRA/TTS/datafile/
total 0
orarac2poc:TTS:/u02/oradata/TTS> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Wed Apr 3 17:57:54 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@TTS> insert into liqy.incr_changes values (3, 'some changes');

1 row created.

SYS@TTS> commit;

Commit complete.

SYS@TTS> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

3. solve the issue
orarac2poc:TTS:/u02/oradata/TTS> rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Apr 3 17:58:08 2013

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

connected to target database: TTS (DBID=1769654909)

RMAN>  backup incremental level 1 for recover of copy with tag daily_incr database;

Starting backup at 2013-04-03:17:58:12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u02/oradata/TTS/system01.dbf
input datafile file number=00002 name=/u02/oradata/TTS/sysaux01.dbf
input datafile file number=00003 name=/u02/oradata/TTS/undotbs01.dbf
input datafile file number=00005 name=/u02/oradata/TTS/tts1_01.bdf
input datafile file number=00006 name=/u02/oradata/TTS/testtbs1.dbf
input datafile file number=00004 name=/u02/oradata/TTS/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2013-04-03:17:58:13
channel ORA_DISK_1: finished piece 1 at 2013-04-03:17:58:38
piece handle=/u02/oradata/TTS/FRA/TTS/backupset/2013_04_03/o1_mf_nnnd1_DAILY_INCR_8oqz9ol2_.bkp tag=DAILY_INCR comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 2013-04-03:17:58:38

Starting Control File and SPFILE Autobackup at 2013-04-03:17:58:38
piece handle=/u02/oradata/TTS/FRA/TTS/autobackup/2013_04_03/o1_mf_s_811792718_8oqzbh7r_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2013-04-03:17:58:39

RMAN> host 'ls -l /u02/oradata/TTS/FRA/TTS/datafile/';

total 0
host command complete

RMAN> crosscheck copy;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
specification does not match any control file copy in the repository
specification does not match any archived log in the repository

validation failed for datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_system_8ondf6qx_.dbf RECID=54 STAMP=811677601
validation failed for datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_sysaux_8ondgc21_.dbf RECID=53 STAMP=811677601
validation failed for datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_undotbs1_8ondhgcv_.dbf RECID=52 STAMP=811677601
validation failed for datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_users_8ondhyp8_.dbf RECID=49 STAMP=811677601
validation failed for datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_tts1_8ondhxjj_.dbf RECID=51 STAMP=811677601
validation failed for datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_testtbs_8onfncom_.dbf RECID=50 STAMP=811677601
Crosschecked 6 objects


RMAN> delete copy;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
specification does not match any control file copy in the repository
specification does not match any archived log in the repository
List of Datafile Copies
=======================

Key     File S Completion Time     Ckp SCN    Ckp Time
------- ---- - ------------------- ---------- -------------------
54      1    X 2013-04-02:10:00:01 1335170    2013-04-02:09:47:37
        Name: /u02/oradata/TTS/FRA/TTS/datafile/o1_mf_system_8ondf6qx_.dbf
        Tag: DAILY_INCR

53      2    X 2013-04-02:10:00:01 1335170    2013-04-02:09:47:37
        Name: /u02/oradata/TTS/FRA/TTS/datafile/o1_mf_sysaux_8ondgc21_.dbf
        Tag: DAILY_INCR

52      3    X 2013-04-02:10:00:01 1335170    2013-04-02:09:47:37
        Name: /u02/oradata/TTS/FRA/TTS/datafile/o1_mf_undotbs1_8ondhgcv_.dbf
        Tag: DAILY_INCR

49      4    X 2013-04-02:10:00:01 1335170    2013-04-02:09:47:37
        Name: /u02/oradata/TTS/FRA/TTS/datafile/o1_mf_users_8ondhyp8_.dbf
        Tag: DAILY_INCR

51      5    X 2013-04-02:10:00:01 1335170    2013-04-02:09:47:37
        Name: /u02/oradata/TTS/FRA/TTS/datafile/o1_mf_tts1_8ondhxjj_.dbf
        Tag: DAILY_INCR

50      6    X 2013-04-02:10:00:01 1335170    2013-04-02:09:47:37
        Name: /u02/oradata/TTS/FRA/TTS/datafile/o1_mf_testtbs_8onfncom_.dbf
        Tag: DAILY_INCR

-- X indicates invalid

Do you really want to delete the above objects (enter YES or NO)? yes
deleted datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_system_8ondf6qx_.dbf RECID=54 STAMP=811677601
deleted datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_sysaux_8ondgc21_.dbf RECID=53 STAMP=811677601
deleted datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_undotbs1_8ondhgcv_.dbf RECID=52 STAMP=811677601
deleted datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_users_8ondhyp8_.dbf RECID=49 STAMP=811677601
deleted datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_tts1_8ondhxjj_.dbf RECID=51 STAMP=811677601
deleted datafile copy
datafile copy file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_testtbs_8onfncom_.dbf RECID=50 STAMP=811677601
Deleted 6 objects


[ARMAN> list copy;

specification does not match any datafile copy in the repository
specification does not match any control file copy in the repository
specification does not match any archived log in the repository

RMAN> crosscheck copy;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
specification does not match any datafile copy in the repository
specification does not match any control file copy in the repository
specification does not match any archived log in the repository

RMAN>  backup incremental level 1 for recover of copy with tag daily_incr database;

Starting backup at 2013-04-03:17:59:22
using channel ORA_DISK_1
no parent backup or copy of datafile 1 found
no parent backup or copy of datafile 2 found
no parent backup or copy of datafile 3 found
no parent backup or copy of datafile 5 found
no parent backup or copy of datafile 6 found
no parent backup or copy of datafile 4 found
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u02/oradata/TTS/system01.dbf
output file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_system_8oqzctbg_.dbf tag=DAILY_INCR RECID=55 STAMP=811792792
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u02/oradata/TTS/sysaux01.dbf
output file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_sysaux_8oqzdxo7_.dbf tag=DAILY_INCR RECID=56 STAMP=811792832
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u02/oradata/TTS/undotbs01.dbf
output file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_undotbs1_8oqzg18b_.dbf tag=DAILY_INCR RECID=57 STAMP=811792847
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/u02/oradata/TTS/tts1_01.bdf
output file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_tts1_8oqzgjgw_.dbf tag=DAILY_INCR RECID=58 STAMP=811792849
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=/u02/oradata/TTS/testtbs1.dbf
output file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_testtbs_8oqzgks6_.dbf tag=DAILY_INCR RECID=59 STAMP=811792850
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u02/oradata/TTS/users01.dbf
output file name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_users_8oqzgm55_.dbf tag=DAILY_INCR RECID=60 STAMP=811792851
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 2013-04-03:18:00:52

Starting Control File and SPFILE Autobackup at 2013-04-03:18:00:52
piece handle=/u02/oradata/TTS/FRA/TTS/autobackup/2013_04_03/o1_mf_s_811792852_8oqzgnno_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2013-04-03:18:00:53

RMAN> backup as backupset archivelog all not backed up delete all input;

Starting backup at 2013-04-03:18:09:35
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=8 RECID=51 STAMP=811793375
channel ORA_DISK_1: starting piece 1 at 2013-04-03:18:09:36
channel ORA_DISK_1: finished piece 1 at 2013-04-03:18:09:37
piece handle=/u02/oradata/TTS/FRA/TTS/backupset/2013_04_03/o1_mf_annnn_TAG20130403T180936_8oqzz0l0_.bkp tag=TAG20130403T180936 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u02/oradata/TTS/FRA/TTS/archivelog/2013_04_03/o1_mf_1_8_8oqzyzx4_.arc RECID=51 STAMP=811793375
Finished backup at 2013-04-03:18:09:37

Starting Control File and SPFILE Autobackup at 2013-04-03:18:09:37
piece handle=/u02/oradata/TTS/FRA/TTS/autobackup/2013_04_03/o1_mf_s_811793377_8oqzz20o_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2013-04-03:18:09:38

RMAN> recover device type disk copy of database with tag daily_incr;

Starting recover at 2013-04-03:18:09:46
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
no copy of datafile 1 found to recover
no copy of datafile 2 found to recover
no copy of datafile 3 found to recover
no copy of datafile 4 found to recover
no copy of datafile 5 found to recover
no copy of datafile 6 found to recover
Finished recover at 2013-04-03:18:09:46

RMAN> exit


Recovery Manager complete.

orarac2poc:TTS:/u02/oradata/TTS> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 4 11:21:40 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@TTS> select * from liqy.incr_changes ;

        C1 CHANGES
---------- --------------------
         3 some changes
         1 init backup copy
         2 change before crash

SYS@TTS> insert into liqy.incr_changes values (4, 'some more changes');

1 row created.

SYS@TTS> commit;

Commit complete.

SYS@TTS> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
orarac2poc:TTS:/u02/oradata/TTS> rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Thu Apr 4 11:22:24 2013

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

connected to target database: TTS (DBID=1769654909)

RMAN>  backup incremental level 1 for recover of copy with tag daily_incr database;

Starting backup at 2013-04-04:11:22:33
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=16 device type=DISK
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u02/oradata/TTS/system01.dbf
input datafile file number=00002 name=/u02/oradata/TTS/sysaux01.dbf
input datafile file number=00003 name=/u02/oradata/TTS/undotbs01.dbf
input datafile file number=00005 name=/u02/oradata/TTS/tts1_01.bdf
input datafile file number=00006 name=/u02/oradata/TTS/testtbs1.dbf
input datafile file number=00004 name=/u02/oradata/TTS/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2013-04-04:11:22:36
channel ORA_DISK_1: finished piece 1 at 2013-04-04:11:23:11
piece handle=/u02/oradata/TTS/FRA/TTS/backupset/2013_04_04/o1_mf_nnnd1_DAILY_INCR_8oswhwdw_.bkp tag=DAILY_INCR comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
Finished backup at 2013-04-04:11:23:11

Starting Control File and SPFILE Autobackup at 2013-04-04:11:23:11
piece handle=/u02/oradata/TTS/FRA/TTS/autobackup/2013_04_04/o1_mf_s_811855391_8oswk0m9_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2013-04-04:11:23:14

RMAN> backup as backupset archivelog all not backed up delete all input;

Starting backup at 2013-04-04:11:23:47
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=9 RECID=52 STAMP=811794220
input archived log thread=1 sequence=10 RECID=53 STAMP=811855432
channel ORA_DISK_1: starting piece 1 at 2013-04-04:11:23:53
channel ORA_DISK_1: finished piece 1 at 2013-04-04:11:23:56
piece handle=/u02/oradata/TTS/FRA/TTS/backupset/2013_04_04/o1_mf_annnn_TAG20130404T112352_8oswl97x_.bkp tag=TAG20130404T112352 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u02/oradata/TTS/FRA/TTS/archivelog/2013_04_03/o1_mf_1_9_8or0scwq_.arc RECID=52 STAMP=811794220
archived log file name=/u02/oradata/TTS/FRA/TTS/archivelog/2013_04_04/o1_mf_1_10_8oswl7l2_.arc RECID=53 STAMP=811855432
Finished backup at 2013-04-04:11:23:56

Starting Control File and SPFILE Autobackup at 2013-04-04:11:23:56
piece handle=/u02/oradata/TTS/FRA/TTS/autobackup/2013_04_04/o1_mf_s_811855436_8oswldo5_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2013-04-04:11:23:57

5. Succeed to apply the incremental backup to disk copy
RMAN> recover device type disk copy of database with tag daily_incr;

Starting recover at 2013-04-04:11:24:04
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=16 device type=DISK
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile copies to recover
recovering datafile copy file number=00001 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_system_8oqzctbg_.dbf
recovering datafile copy file number=00002 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_sysaux_8oqzdxo7_.dbf
recovering datafile copy file number=00003 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_undotbs1_8oqzg18b_.dbf
recovering datafile copy file number=00004 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_users_8oqzgm55_.dbf
recovering datafile copy file number=00005 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_tts1_8oqzgjgw_.dbf
recovering datafile copy file number=00006 name=/u02/oradata/TTS/FRA/TTS/datafile/o1_mf_testtbs_8oqzgks6_.dbf
channel ORA_DISK_1: reading from backup piece /u02/oradata/TTS/FRA/TTS/backupset/2013_04_04/o1_mf_nnnd1_DAILY_INCR_8oswhwdw_.bkp
channel ORA_DISK_1: piece handle=/u02/oradata/TTS/FRA/TTS/backupset/2013_04_04/o1_mf_nnnd1_DAILY_INCR_8oswhwdw_.bkp tag=DAILY_INCR
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished recover at 2013-04-04:11:24:14

Starting Control File and SPFILE Autobackup at 2013-04-04:11:24:14
piece handle=/u02/oradata/TTS/FRA/TTS/autobackup/2013_04_04/o1_mf_s_811855454_8oswly7j_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2013-04-04:11:24:15

RMAN> exit


Recovery Manager complete.