Mani's Blog

August 16, 2012

“RMAN-06053: unable to perform media recovery because of missing log” “ORA-01194: file 2 needs more recovery to be consistent”

Filed under: Backup,Database,Oracle,RMAN — mani @ 6:23 pm

Issue:  While restoring 10g database, ran into following issue
“ORA-01194: file 2 needs more recovery to be consistent”
“RMAN-06053: unable to perform media recovery because of missing log”

RMAN> run {
allocate channel d1 device type disk;
allocate channel d2 device type disk;
allocate channel d3 device type disk;
allocate channel d4 device type disk;
restore database;
switch datafile all;
switch tempfile all;
recover database;
}2> 3> 4> 5> 6> 7> 8> 9> 10>

allocated channel: d1
channel d1: sid=156 devtype=DISK

allocated channel: d2
channel d2: sid=155 devtype=DISK

allocated channel: d3
channel d3: sid=154 devtype=DISK

allocated channel: d4
channel d4: sid=153 devtype=DISK

Starting restore at 16-AUG-12

channel d1: starting datafile backupset restore
channel d1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /local/opt/oracle/oradata/XNODBGRD/system01.dbf
restoring datafile 00002 to /local/opt/oracle/oradata/XNODBGRD/undotbs01.dbf
restoring datafile 00003 to /local/opt/oracle/oradata/XNODBGRD/sysaux01.dbf
restoring datafile 00004 to /local/opt/oracle/oradata/XNODBGRD/users01.dbf
restoring datafile 00005 to /local/opt/oracle/oradata/XNODBGRD/mgmt.dbf
restoring datafile 00006 to /local/opt/oracle/oradata/XNODBGRD/mgmt_ecm_depot1.dbf
restoring datafile 00007 to /local/opt/oracle/oradata/XNODBGRD/tools01.dbf
channel d1: reading from backup piece /local/data/oracle/nfs/XNODBGRD/backupset/2012_08_15/o1_mf_nnndf_BKP_XNODBGRD_FULL_08_82pc74fq_.bkp

channel d1: restored backup piece 1
piece handle=/local/data/oracle/nfs/XNODBGRD/backupset/2012_08_15/o1_mf_nnndf_BKP_XNODBGRD_FULL_08_82pc74fq_.bkp tag=BKP_XNODBGRD_FULL_081512050003
channel d1: restore complete, elapsed time: 00:25:45
Finished restore at 16-AUG-12

Starting recover at 16-AUG-12

starting media recovery

Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 2 needs more recovery to be consistent
ORA-01110: data file 2: ‘/local/opt/oracle/oradata/XNODBGRD/undotbs01.dbf’

released channel: d1
released channel: d2
released channel: d3
released channel: d4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/16/2012 18:03:00
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 81113 lowscn 1817591460 found to restore

RMAN>

Solution:

Set the sequence until necessary and recover the database.

RMAN> run {
2> set until sequence 81112;
3> recover database;
4> }

Advertisements

November 4, 2011

RMAN-00571 RMAN-00569 RMAN-06026 RMAN-06023: no backup or copy of datafile 4 found to restore

Filed under: Backup,Oracle,RMAN — mani @ 6:22 pm

Issue: I tried to restore one of our RMAN backups to our standby server to make sure the backups are good to recover.  I ran into below errors.

Error:

released channel: d1
released channel: d2
released channel: d3
released channel: d4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/04/2011 16:48:56
RMAN-06026: some targets not found – aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

Fix: As usual tried checking permission on ASM, access to backup files, CROSSCHECK backupset, Delete obsolete and few others.  Finally noticed that database was set to incorrect incarnation.  I had to reset it to the correct one.  Run “LIST INCARNATION;” on RMAN prompt.  Then choose the right incarnation. After the reset of database to right incarnation, restore and recover went well.
RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> run {
allocate channel d1 device type disk;
allocate channel d2 device type disk;
allocate channel d3 device type disk;
allocate channel d4 device type disk;
restore database;
switch datafile all;
switch tempfile all;
recover database;
}

allocated channel: d1
channel d1: SID=10980 device type=DISK

allocated channel: d2
channel d2: SID=10983 device type=DISK

allocated channel: d3
channel d3: SID=10986 device type=DISK

allocated channel: d4
channel d4: SID=10981 device type=DISK

Starting restore at 04-NOV-11

channel d1: starting datafile backup set restore
channel d1: specifying datafile(s) to restore from backup set
channel d1: restoring datafile 00002 to +XN_DATA/xnodbcor/datafile/sysaux.257.715025373
channel d1: restoring datafile 00003 to +XN_DATA/xnodbcor/datafile/undotbs1.258.715025373
channel d1: restoring datafile 00004 to +XN_DATA/xnodbcor/datafile/users.286.766341725
channel d1: restoring datafile 00006 to +XN_DATA/xnodbcor/datafile/undotbs3.265.715025525
channel d1: restoring datafile 00012 to +XN_DATA/xnodbcor/datafile/xn_opensocial.266.715203251
channel d1: restoring datafile 00013 to +XN_DATA/xnodbcor/datafile/content_data.271.715203641
channel d1: restoring datafile 00017 to +XN_DATA/xnodbcor/datafile/xn_index.275.715221723
channel d1: reading from backup piece /local/data/oracle/nfs/XNODBCOR/backupset/2011_11_04/o1_mf_nnndf_BKP_XNODBCOR_FULL_11_7c6rtl40_.bkp
channel d2: starting datafile backup set restore
channel d2: specifying datafile(s) to restore from backup set

RMAN-00571 RMAN-00569 RMAN-03002 ORA-19870 error while restoring backup piece

Filed under: Backup,Oracle,RMAN — mani @ 5:44 pm

I ran into issue while restoring RMAN backup to standby server.

Issue:

channel d4: restoring datafile 00020 to +XN_DATA
channel d4: reading from backup piece /local/data/oracle/nfs/XNODBCOR/backupset/2011_07_28/o1_mf_nnndf_BKP_XNODBCOR_FULL_07_731qqngm_.bkp
released channel: d1
released channel: d2
released channel: d3
released channel: d4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/03/2011 22:32:35
ORA-19870: error while restoring backup piece /local/data/oracle/nfs/XNODBCOR/backupset/2011_07_28/o1_mf_nnndf_BKP_XNODBCOR_FULL_07_731qqng5_.bkp
ORA-00600: internal error code, arguments: [krbrrd_comp_ksfqrd_noblks], [/local/data/oracle/nfs/XNODBCOR/backupset/2011_07_28/o1_mf_nnndf_BKP_XNODBCOR_FULL_07_731qqng5_.bkp], [125696], [], [], [], [], [], [], [], [], []

RMAN>

Recovery Manager complete.
Solution:

Oracle doc says, It occurs due to corrupt backup piece or some issues with reading from the OS layer.
Try to validate the backupset that was thrown by the error.

RMAN > validate backupset <bs_key>

BUT, in our case, I realized the backupset which is referred in the restored has pretty old time stamp. I had to change the incarnation to restore and recover successfully.

Run “list incarnation;” and switched to the correct one as below.

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> run {
allocate channel d1 device type disk;
allocate channel d2 device type disk;
allocate channel d3 device type disk;
allocate channel d4 device type disk;
restore database;
switch datafile all;
switch tempfile all;
recover database;
}

RMAN-00571 RMAN-00569 ORA-01110 ORA-01180: can not create datafile 1

Filed under: Backup,Database,Oracle,RMAN — mani @ 5:05 pm
Tags:

Problem: while I was trying to restore RMAN backup into standby server.  Ran into below issues.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/02/2011 04:14:17
ORA-01180: can not create datafile 1
ORA-01110: data file 1: ‘+XN_DATA/xnodb02c/datafile/system.263.709351843’

Fix:  Tried many things like checking permission of ASM, the backup location is readable and list backup.  All looked good.  Finally checked incarnation, we had multiple incarnation.  I switch the incarnation and tried the restore then all went well.  Hope it is helpful to someone.

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       XNODB02C 2305192664       PARENT  1          27-JAN-10
2       2       XNODB02C 2305192664       CURRENT  1238601811 19-AUG-11

RMAN>

Fix:  Changed the incarnation.

RMAN> reset database to incarnation 1;

database reset to incarnation 1

Ran restore and recover.

run {
allocate channel d1 device type disk;
allocate channel d2 device type disk;
allocate channel d3 device type disk;
allocate channel d4 device type disk;
@new_names.cmd
restore database;
switch datafile all;
switch tempfile all;
recover database;
}

alter database open resetlogs;

 

Create a free website or blog at WordPress.com.