Link to home
Start Free TrialLog in
Avatar of geodin
geodin

asked on

rman restore from full backupset

My question is how, or can, I restore a database to another host if given only a full backup from say the 14th?

When I run restore it fails looking for some files, error:

archive log thread 1 sequence 5178 is already on disk as file /u02/oradata/flash_recovery_area/APPN/archivelog/2009_05_20/o1_mf_1_5178_519n6p2s_.arc
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=5930
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=5931
channel ORA_DISK_1: reading from backup piece /u02/oradata/flash_recovery_area/flash_recovery_area/APPN/backupset/2009_05_15/o1_mf_annnn_TAG20090515T003046_50svzs4f_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u02/oradata/flash_recovery_area/flash_recovery_area/APPN/backupset/2009_05_15/o1_mf_annnn_TAG20090515T003046_50svzs4f_.bkp tag=TAG20090515T003046
channel ORA_DISK_1: restore complete, elapsed time: 00:02:38
archive log filename=/u02/oradata/flash_recovery_area/APPN/archivelog/2009_05_21/o1_mf_2_5930_51b06gp0_.arc thread=2 sequence=5930
archive log filename=/u02/oradata/flash_recovery_area/APPN/archivelog/2009_05_20/o1_mf_1_5178_519n6p2s_.arc thread=1 sequence=5178
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flash_recovery_area/APPN/archivelog/2009_05_21/o1_mf_2_5930_51b06gp0_.arc recid=17338 stamp=687410571
archive log filename=/u02/oradata/flash_recovery_area/APPN/archivelog/2009_05_21/o1_mf_2_5931_51b0bcvy_.arc thread=2 sequence=5931
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flash_recovery_area/APPN/archivelog/2009_05_21/o1_mf_2_5931_51b0bcvy_.arc recid=17339 stamp=687410592
unable to find archive log
archive log thread=2 sequence=5932
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/21/2009 03:26:48
RMAN-06054: media recovery requesting unknown log: thread 2 seq 5932 lowscn 1070524268


I connect to rman target / and have tried running the following scripts run:
run{ set until sequence 5931;
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}

I tried running without specifying "set until" hoping rman was smart enough to restore to the last available scn in the backup sets but it failed as it tried to roll to the current date.

I tried running specifying a "set until" time that was in the middle of the time frame the backsets where written to disk but this failed as well.


SOLUTION
Avatar of tangchunfeng
tangchunfeng

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of geodin
geodin

ASKER

Thanks, I will try that once my current restore completes/fails out again.

But I am curious about how to restore with just a backupset and no prod server to locate SCN, log sequence, etc. and if there are no archive logs on tape. Shouldn't a full backupset have everything needed to recover?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of geodin

ASKER

I have run:

run{ set until time "to_date('2009-05-13 23:59:59','YYYY-MM-DD HH24:MI:SS')";
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}

Whichs seems to have run well until it got to the open resetlogs, rman output:

channel default: deleting archive log(s)
archive log filename=/u02/oradata/flash_recovery_area/APPN/archivelog/2009_05_21/o1_mf_2_5916_51bxjzt6_.arc recid=17343 stamp=687440609
archive log filename=/u02/oradata/flash_recovery_area/APPN/archivelog/2009_05_21/o1_mf_2_5917_51bxom68_.arc thread=2 sequence=5917
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flash_recovery_area/APPN/archivelog/2009_05_21/o1_mf_1_5173_51bxoos8_.arc recid=17354 stamp=687440702
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flash_recovery_area/APPN/archivelog/2009_05_21/o1_mf_2_5917_51bxom68_.arc recid=17355 stamp=687440711
media recovery complete, elapsed time: 00:28:18
Finished recover at May 21 2009 12:14:04

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 05/21/2009 12:14:06
ORA-00344: unable to re-create online log '/u02/oradata/appn/log01/redo01_01.log'
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory

RMAN> **end-of-file**


What can I do from here?

Thanks,
Geodin
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of geodin

ASKER

That was it, the log<n> directory did not exist. I created them then reran the alter database open resetlogs; and the database is up and open. THANKS!

I am just having users verify before I close this question.

Doing a little research I guess I didn't need the switch datafile statement, more for restoring from a different incarnation. I'll take that out if I need to perform this again.

Thanks,
Geodin
Great, glad to help! Always good to see the database open. :)

Yes, the RMAN switch command switches the current controlfile over to the "new" paths, but I would not include it
because it can affect the RMAN catalog when used, though in this case I would assume it has no-effect, you never know.