Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RMAN recovery using cold backup - why do i need to resetlogs ?

User_UAEUZOct 26 2015 — edited Oct 30 2015

Hi all,

This might be a simple question, please bear with me for my ignorance.

My intention is to restore a cold backup on another machine with the same path/directory setup.

==================================================================

Method A)

1) I have done a cold backup with the database shutdown (and started in mount mode) on Server A

backup database;  (the spfile and controfile are backup as well)

-- over at this point, i believe the controlfile, datafile, datafile_header etc checkpoint_scn#  are all sync and the same.

2) On server B, i have the exact same path directory setup like Server A

3) I copied the backup in 1) to Server B

On Server B, I have done the following

export ORACLE_SID=testdb (same as ServerA)

rman target /;

startup force nomount;

restore spfile from '/backup/location';

shutdown immediate;

startup nomount;

restore controlfile from '/backup/location';

alter database mount;

restore database;

recover database;

However, upon recover database; I got this error below

Starting recover at 26-OCT-15

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=63 device type=DISK

starting media recovery

unable to find archived log

archived log thread=1 sequence=9

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 10/26/2015 23:16:07

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 9 and starting SCN of 1012101

Q1) I have double checked the database ,datafile , and datafile_header's checkpoint_change# and they all matched (1012101). Why am i still prompted for more logs ?  (to addon - i did not attempt to issue "recover database using backup controlfile;"  - just "recover database;" in RMAN)

Q2) I am not able to open the database WITHOUT resetlogs.  But as again, the SCN# all matched in both controlfile and datafile, this is a full restoration to the most current cold backup. Why do i still need to resetlog ?

======================================================


Method B

On server A

shutdown immediate; (on the production database at server A, originally in mounted mode)


On server B

copy the controlfile from server A to server B (same path)

rman target /

startup mount;

restore database;

recover database;

q3) Over here i am able to recover the database; it did not prompt me to input any more logs as compared with method A. Why ?

When i attempt to issue alter database open; the instance crash and shutdown immediately.  I looked at the alert log and see that the online redo logs are missing, so i moved them from the production Server A to Server B.

q4) But why are the redologs even needed ? This is a recovery to the latest (SCN# all matched for controlfile and datafile),  can't ORACLE just create new redologs instead ?

Is there any workaround for this ?  Since i am able to do a recovery database; (full recovery), I am not allowed to "alter database open resetlogs" as well.

ORA-01139: RESETLOGS option only valid after an incomplete database recovery

What should i do next for such scenario above then ?

Regards,

Noob

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2015
Added on Oct 26 2015
17 comments
5,625 views