This forum is currently locked. You can't register or post questions at this time. (read more)

Recover database from RMAN catalog backup pieces

All posts relating to Oracle database administration.

Moderator: Tim...

anildon1982
Member
Posts: 7
Joined: Fri Feb 17, 2012 2:46 pm

Recover database from RMAN catalog backup pieces

Postby anildon1982 » Wed Feb 22, 2012 2:24 pm

Hi,
I have one scenario here to recover database from RMAN catalog database.
I am using the RMAN catalog database for prod database backup. Now the scenario is, My catalog database has corrupted, I get the information about corruption after one day. Means one day before my catalog database corrupted and before corruption It took the production database backup and all backup pieces is on the database server. Now I need the recover the prod database with RMAN backup. There is no backup of catalog database.
I need to restore database from RMAN backup pieces, which is on the catalog database host.

Could you please let me know the procedure of recover the database.

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Recover database from RMAN catalog backup pieces

Postby Tim... » Wed Feb 22, 2012 3:15 pm

Hi.

The lesson here is you should *never* use an RMAN catalog unless you are backing it up!

If you want to have the database restored from an RMAN backup, you need to have a catalog (db catalog or controlfile) with the backup pieces registered.

1) I suggest you back up everything before you start. Turn off the database and do a full cold backup and a file system backup of your server.
2) Decide if you are going to create a new catalog and register the database with that, or use the controlfile as the catalog.
3) Connect to RMAN using the new catalog, or the no catalog if you are using the control as the new catalog.
4) Register all the existing backups into the new catalog using the RMAN CATALOG command.

http://docs.oracle.com/cd/E11882_01/bac ... htm#i79811

5) You should now have a functioning catalog for recovery of the database.
6) Once you have performed the recovery, take a fresh backup.
7) If you have built a new DB catalog, implement a backup procedure for it.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

anildon1982
Member
Posts: 7
Joined: Fri Feb 17, 2012 2:46 pm

Re: Recover database from RMAN catalog backup pieces

Postby anildon1982 » Wed Feb 22, 2012 5:35 pm

Hi Tim.. Thanks for your response.
I am going to setup RMAN in RAC enviroment, but before this i have to test all scenario.
I want to clear that, If catalog database not available and all the backup in catalog database, then how can we recover the prod database if required that moment from catalog backup.

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Recover database from RMAN catalog backup pieces

Postby Tim... » Wed Feb 22, 2012 5:46 pm

Hi.

Remember, backups are not stored in the catalog. Only the metadata about them is stored in the catalog.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

anildon1982
Member
Posts: 7
Joined: Fri Feb 17, 2012 2:46 pm

Re: Recover database from RMAN catalog backup pieces

Postby anildon1982 » Wed Feb 22, 2012 6:00 pm

Ya .. you are right... How can we use that metadata for recovery ?

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Recover database from RMAN catalog backup pieces

Postby Tim... » Wed Feb 22, 2012 6:10 pm

Hi.

The metadata just tells RMAN which backups to use to recover and which archived log backups contain the specific archived redo logs that are needed. You don't actually recover using this metadata. It is just like an index of all the backups you have taken.

This metadata can be stored in a recovery catalog, or it can be kept in the controlfile. Either way it is doing the same thing. The actualy backups are stored on disk or on tape, depending on where you asked them to be stored. You can always rebuild a catalog. You can not replace lost backups.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

adda.road@yahoo.com
Senior Member
Posts: 143
Joined: Thu Dec 08, 2011 12:33 am

Re: Recover database from RMAN catalog backup pieces

Postby adda.road@yahoo.com » Wed Feb 29, 2012 3:29 pm

Hi Tim,


The lesson here is you should *never* use an RMAN catalog unless you are backing it up!

could you please explain more about this.

Does it mean is it not good to Connecting catalog Database and to take backup of target database.

How about when we use catalog command to update the backup pieces and image copies to catalog database ?

At that time also can we connect to catalog database ?

Please clarify the doubt.

Thanks in advance.

rampa.

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Recover database from RMAN catalog backup pieces

Postby Tim... » Wed Feb 29, 2012 4:39 pm

Hi.

It is good to use a catalog in another database on another server. That is the best way to use RMAN. What is not good is if you never backup the catalog database. If you lose the catalog database you've lost all your metadata.

If you are not planning to back up your catalog database, then don't use one!

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

adda.road@yahoo.com
Senior Member
Posts: 143
Joined: Thu Dec 08, 2011 12:33 am

Re: Recover database from RMAN catalog backup pieces

Postby adda.road@yahoo.com » Wed Feb 29, 2012 11:55 pm

Hi Tim,

that is correct.

thank you,

rampa

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Recover database from RMAN catalog backup pieces

Postby Tim... » Thu Mar 01, 2012 12:15 am

:)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog


Return to “Oracle Database Administration”

Who is online

Users browsing this forum: No registered users and 4 guests

cron