2

I'm testing a procedure via RMAN backup to retore/recover at recover-point, but it fails. Exactly I've executed the first time and it works: Backup:

RMAN> backup database INCLUDE CURRENT CONTROLFILE format '/u01/app/oracle/keep_dir/bkp.%U' tag 'test_op2' keep until time 'sysdate+2' restore point 'pre_test_op2';

And restore/recover:

SQL> shutdown immediate;
SQL> startup nomount;
RMAN> set DBID 1024124299
RMAN> restore controlfile from '/u01/app/oracle/keep_dir/bkp.0dq3bfju_1_1';
RMAN> sql "alter database mount";
RMAN> restore database from TAG=TEST_OP2;
RMAN> RECOVER DATABASE;
RMAN> sql "alter database open resetlogs";
SQL> alter database open resetlogs

At the end incarnation list was the following:

RMAN> list incarnation;

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       MYDB    1024124299       PARENT  1          17-SEP-11
2       2       MYDB    1024124299       PARENT  995548     21-FEB-15
3       3       MYDB    1024124299       CURRENT 1202973    01-APR-15

I've re-exeuted the backup:

RMAN> backup database INCLUDE CURRENT CONTROLFILE format '/u01/app/oracle/keep_dir/bkp.%U' tag 'test_op2' keep until time 'sysdate+2' restore point 'pre_test_op2';

Then I retry the procedure after that I modify DB, adding datafile and tablespace and removing other ones. Then I try to restore:

RMAN> set DBID 1024124299
RMAN> restore controlfile from '/u01/app/oracle/keep_dir/bkp.0dq3bfju_1_1';
RMAN> sql "alter database mount";
RMAN> restore database from TAG=TEST_OP2;

and the recover, but it fails:

RMAN> RECOVER DATABASE;

Starting recover at 02-APR-15
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/fast_recovery_area/MYDB/archivelog/2015_04_02/o1_mf_1_4_bksxl25h_.arc
archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/oradata/MYDB/redo02.log
archived log file name=/u01/app/oracle/fast_recovery_area/MYDB/archivelog/2015_04_02/o1_mf_1_4_bksxl25h_.arc thread=1 sequence=4
archived log file name=/u01/app/oracle/oradata/MYDB/redo02.log thread=1 sequence=5
creating datafile file number=7 name=/u01/app/oracle/oradata/MYDB/MYDB/datafile/BSO_MYDB-PAR_20150402_000101.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/02/2015 04:21:37
RMAN-11003: failure during parse/execution of SQL statement: alter database recover datafile list
 1 , 2 , 3 , 4 , 5 , 6 , 8 , 9 , 10 , 11
ORA-01179: file 10 does not exist

Listing the backup, it seems it lost a file:

RMAN> list backup;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10      Full    1010.57M   DISK        00:00:48     02-APR-15
        BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: TEST_OP2
        Piece Name: /u01/app/oracle/keep_dir/bkp.0cq3bfi6_1_1
        Keep: BACKUP_LOGS        Until: 04-APR-15
  List of Datafiles in backup set 10
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1250240    02-APR-15 /u01/app/oracle/oradata/mydb/system01.dbf
  2       Full 1250240    02-APR-15 /u01/app/oracle/oradata/mydb/sysaux01.dbf
  3       Full 1250240    02-APR-15 /u01/app/oracle/oradata/mydb/undotbs01.dbf
  4       Full 1250240    02-APR-15 /u01/app/oracle/oradata/mydb/users01.dbf
  5       Full 1250240    02-APR-15 /u01/app/oracle/oradata/mydb/MYDB/datafile/o1_mf_bso_cfg__bgkz5vc3_.dbf
  6       Full 1250240    02-APR-15 /u01/app/oracle/oradata/mydb/MYDB/datafile/o1_mf_bso_cfg__bgkz9qy2_.dbf
  8       Full 1250240    02-APR-15 /u01/app/oracle/oradata/mydb/MYDB/datafile/BSO_MYDB-PAR2_20150221_1713.dbf
  9       Full 1250240    02-APR-15 /u01/app/oracle/oradata/mydb/MYDB/datafile/BSO_MYDB-PAR3_20150221_1713.dbf
  10      Full 1250240    02-APR-15
  11      Full 1250240    02-APR-15 /u01/app/oracle/oradata/mydb/MYDB/datafile/BSO_MYDB-PAR_20150401_100200.dbf

I don't understand which is the problem. Can you help me? Thanks, Ste

1

Yes, following the backup output:

RMAN> list backup;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10      Full    1010.57M   DISK        00:00:48     02-APR-15
        BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: TEST_OP2
        Piece Name: /u01/app/oracle/keep_dir/bkp.0cq3bfi6_1_1
        Keep: BACKUP_LOGS        Until: 04-APR-15
  List of Datafiles in backup set 10
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1250240    02-APR-15 /u01/app/oracle/oradata/MYDB/system01.dbf
  2       Full 1250240    02-APR-15 /u01/app/oracle/oradata/MYDB/sysaux01.dbf
  3       Full 1250240    02-APR-15 /u01/app/oracle/oradata/MYDB/undotbs01.dbf
  4       Full 1250240    02-APR-15 /u01/app/oracle/oradata/MYDB/users01.dbf
  5       Full 1250240    02-APR-15 /u01/app/oracle/oradata/MYDB/MYDB/datafile/o1_mf_bso_cfg__bgkz5vc3_.dbf
  6       Full 1250240    02-APR-15 /u01/app/oracle/oradata/MYDB/MYDB/datafile/o1_mf_bso_cfg__bgkz9qy2_.dbf
  8       Full 1250240    02-APR-15 /u01/app/oracle/oradata/MYDB/MYDB/datafile/BSO_MYDB-PAR2_20150221_1713.dbf
  9       Full 1250240    02-APR-15 /u01/app/oracle/oradata/MYDB/MYDB/datafile/BSO_MYDB-PAR3_20150221_1713.dbf
  10      Full 1250240    02-APR-15 /u01/app/oracle/oradata/MYDB/MYDB/datafile/BSO_MYDB-PAR_20150401_100100.dbf
  11      Full 1250240    02-APR-15 /u01/app/oracle/oradata/MYDB/MYDB/datafile/BSO_MYDB-PAR_20150401_100200.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11      Full    9.33M      DISK        00:00:01     02-APR-15
        BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TEST_OP2
        Piece Name: /u01/app/oracle/keep_dir/bkp.0dq3bfju_1_1
        Keep: BACKUP_LOGS        Until: 04-APR-15
  Control File Included: Ckp SCN: 1250258      Ckp time: 02-APR-15

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
12      Full    80.00K     DISK        00:00:01     02-APR-15
        BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: TEST_OP2
        Piece Name: /u01/app/oracle/keep_dir/bkp.0eq3bfk0_1_1
        Keep: BACKUP_LOGS        Until: 04-APR-15
  SPFILE Included: Modification time: 02-APR-15
  SPFILE db_unique_name: MYDB

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
13      4.00K      DISK        00:00:00     02-APR-15
        BP Key: 13   Status: AVAILABLE  Compressed: NO  Tag: TEST_OP2
        Piece Name: /u01/app/oracle/keep_dir/bkp.0fq3bfk2_1_1
        Keep: BACKUP_LOGS        Until: 04-APR-15

  List of Archived Logs in backup set 13
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    4       1250236    02-APR-15 1250273    02-APR-15

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
14      Full    9.33M      DISK        00:00:01     02-APR-15
        BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: TEST_OP2
        Piece Name: /u01/app/oracle/keep_dir/bkp.0gq3bfk3_1_1
        Keep: BACKUP_LOGS        Until: 04-APR-15
  Control File Included: Ckp SCN: 1250278      Ckp time: 02-APR-15

The file 10 is part of the same backup piece of the other ones.

vm-sles11-node3:~ # ll /u01/app/oracle/keep_dir/bkp.0cq3bfi6_1_1
-rw-r----- 1 oracle oinstall 1059667968 Apr  2 03:56 /u01/app/oracle/keep_dir/bkp.0cq3bfi6_1_1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.