• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1435
  • Last Modified:

RMAN-03002: failure of recover command

I am running oracle XE on my production server. The backup is taken through Rman. I have to restore the backup to another server which serves as a standby server.

When restoring the backup when I write recover database at rman I get the following error. After that I write recover database until sequence nnn (nnn means the seq no. Given in the below error) and then it recovers the database. I want to automate this task but this error stops the execution. My question is if there is a way to avoid this error or write a command that automatically recovers till the seq upto where the recovery can be done?

RMAN-03002: failure of recover command at 08/27/2010¿18:10:19¿RMAN-06054: media recovery requesting unknown log: th¿read 1 seq 5491 lowscn 169415048¿
0
systemsautomation
Asked:
systemsautomation
  • 4
  • 3
1 Solution
 
sridharv9Commented:
I guess you are having problem with using "until time". If yes, are you sure the time falls within the db backup time?  Otherwise you need to copy the archivelog files to your standby server @ archive_destination location.
0
 
systemsautomationAuthor Commented:
both servers are in different timezones infact in different cities.
0
 
sridharv9Commented:
Are you using the backup taken time at primary server(source server) ? Make sure to use the time when the  backup is completed to use in "until time".
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
systemsautomationAuthor Commented:
Hi

Sorry for not getting back to you timely.

I am doing following to restore the database (on the standby machine):

1. restore database
2. recover database

At this point I get error something like this:

RMAN-03002: failure of recover command at 08/27/2010¿18:10:19¿RMAN-06054: media recovery requesting unknown log: th¿read 1 seq 5491 lowscn 169415048

I am NOT using 'until time'  anywhere.
0
 
sridharv9Commented:
Ok, you can recover database with in the time frame of backups you have  i.e.  level 0 + level 1. And one way is to determine backup completion time is by running following query against RMAN catalog:

select max(completion_time) from rc_backup_piece where DB_ID = <YOUR_DB_ID>;

And pass this time to following command:
recover database using backup controlfile until time '<variable value from above command>';

We use this process to automatically refresh our non-prod db's with prod db backup with specific backup pieces.

0
 
systemsautomationAuthor Commented:
Thanks.

But as I mentioned in my question that I want to make this task automatic and writing a script for that.

Putting time manually will not let the script work/
0
 
sridharv9Commented:
In that case you can pass on the time as parameter. That is how we do - query the rman catalog and populate the variables in shell script.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now