Solved

RMAN-03002: failure of recover command

Posted on 2010-08-27
7
1,091 Views
Last Modified: 2012-05-10
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
Comment
Question by:systemsautomation
  • 4
  • 3
7 Comments
 
LVL 6

Expert Comment

by:sridharv9
Comment Utility
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
 

Author Comment

by:systemsautomation
Comment Utility
both servers are in different timezones infact in different cities.
0
 
LVL 6

Expert Comment

by:sridharv9
Comment Utility
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:systemsautomation
Comment Utility
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
 
LVL 6

Expert Comment

by:sridharv9
Comment Utility
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
 

Author Comment

by:systemsautomation
Comment Utility
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
 
LVL 6

Accepted Solution

by:
sridharv9 earned 500 total points
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now