Solved

RMAN-03002: failure of recover command

Posted on 2010-08-27
7
1,114 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 6

Expert Comment

by:sridharv9
ID: 33547080
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
ID: 33547204
both servers are in different timezones infact in different cities.
0
 
LVL 6

Expert Comment

by:sridharv9
ID: 33547559
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!

 

Author Comment

by:systemsautomation
ID: 33573614
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
ID: 33601525
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
ID: 33601746
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
ID: 33836379
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

740 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