Home » RDBMS Server » Backup & Recovery » Recover db from RMAN cold backup
Recover db from RMAN cold backup [message #184450] Wed, 26 July 2006 10:19 Go to next message
ksintrakool
Messages: 20
Registered: July 2006
Location: Las Vegas
Junior Member
Hi All,

I have a NOARCHIVED mode database. I plan to perform a cold backup using RMAN every Sunday. I understand that I will not be able to recover database until the crashed time. I am looking for the method to restore database from my cold backup. (RMAN doesn't copy the online redo log files. I backup database including control file.) I would be appreciated for any helps. (This is a 10.2.0.2 Database)

Thanks,
Keng
Re: Recover db from RMAN cold backup [message #184460 is a reply to message #184450] Wed, 26 July 2006 11:28 Go to previous messageGo to next message
ksintrakool
Messages: 20
Registered: July 2006
Location: Las Vegas
Junior Member
I forget to mention. I am looking for the way to restore database from cold backup without resetlogs option.

Keng
Re: Recover db from RMAN cold backup [message #184646 is a reply to message #184450] Thu, 27 July 2006 05:50 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
I'm curious. A cold backup involves shutting the Db down. RMAN backups involve connecting to the database.

How exactly are you going to combine these two?
Re: Recover db from RMAN cold backup [message #184677 is a reply to message #184460] Thu, 27 July 2006 07:43 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
If it's possible (ie. there is no gap between the SCN from when your cold backup was performed and what's in your online redo logs), RMAN should automatically apply the redo logs. However, you don't have an option if there is a gap, you'll have to open RESETLOGS.

After you successfully run RECOVER DATABASE, you should be able to ALTER DATABASE OPEN with specifying RESETLOGS when you don't have a SCN gap.
Re: Recover db from RMAN cold backup [message #184762 is a reply to message #184450] Thu, 27 July 2006 17:30 Go to previous messageGo to next message
ksintrakool
Messages: 20
Registered: July 2006
Location: Las Vegas
Junior Member
Thank you ebrian for your input.

Do you mean I can "alter database open" without specifying resetlogs if I don't have a SCN gap?

Do you think if I perform logswitches before shutting down the db will help me with SCN gap?

Thank you,
Keng
Re: Recover db from RMAN cold backup [message #184763 is a reply to message #184762] Thu, 27 July 2006 17:31 Go to previous messageGo to next message
ksintrakool
Messages: 20
Registered: July 2006
Location: Las Vegas
Junior Member
To answer to JRowbottom's question:

Startup Mount will do it.
Re: Recover db from RMAN cold backup [message #184781 is a reply to message #184762] Thu, 27 July 2006 23:24 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
ksintrakool wrote on Thu, 27 July 2006 17:30

Do you mean I can "alter database open" without specifying resetlogs if I don't have a SCN gap?

Do you think if I perform logswitches before shutting down the db will help me with SCN gap?

That's correct Keng. As long as you have the current online redo logs and the current control files, you can recover the database WITHOUT resetting the logs as long as there is no gap in SCN's.

Manual log switches aren't necessary prior to shutting down the db, you'll just want to be sure that you do a clean shutdown prior to making the cold backup.
Re: Recover db from RMAN cold backup [message #184912 is a reply to message #184450] Fri, 28 July 2006 10:48 Go to previous messageGo to next message
ksintrakool
Messages: 20
Registered: July 2006
Location: Las Vegas
Junior Member
I just revies 10g Backup & Recovery Basics Users' Guide.

"A consistent backup of the database is one taken when the database is in a consistent
state, that is, one taken after the database has been shut down normally (using
SHUTDOWN NORMAL, SHUTDOWN IMMEDIATE or SHUTDOWN
TRANSACTIONAL). At this point, all changes in the redo log have been applied to
the datafiles. If you mount the database and take a backup at this point, then you can
restore the database from this backup at a later date and open it without performing
media recovery."

This leads me to belive that I should not have SCN gaps issues. I shutdown immediate before the backup. What do you think?
Re: Recover db from RMAN cold backup [message #184914 is a reply to message #184912] Fri, 28 July 2006 11:28 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
In terms of SCN gaps, I was considering the scenario that you do a cold backup and then you start the database backup. If there is database activity that causes several log switches that advance the SCN to beyond what the backup knows about, then you won't be able to open without RESETLOGS.
Re: Recover db from RMAN cold backup [message #184923 is a reply to message #184450] Fri, 28 July 2006 13:25 Go to previous messageGo to next message
ksintrakool
Messages: 20
Registered: July 2006
Location: Las Vegas
Junior Member
Hm.. This looks like online redo log files needed to be available for db to find out if there are any SCN gaps, right?

How about worse case scenario? I lose my entire db including online redo log files? Is it possible for me to restore & recover my database from cold backup then?

Thanks and I really appreciate for any input.


Re: Recover db from RMAN cold backup [message #184929 is a reply to message #184923] Fri, 28 July 2006 15:08 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
ksintrakool wrote on Fri, 28 July 2006 13:25

Hm.. This looks like online redo log files needed to be available for db to find out if there are any SCN gaps, right?

Your quite welcome.

That's correct, the online redo logs would have to be available in order to recover WITHOUT having to RESETLOGS.

Even in worse case scenario of losing all files, you can recover the database from an RMAN cold backup. You would do the following:

RMAN> startup nomount;
RMAN> set dbid <id_number_listed_in_backedup_controlfile_name>
RMAN> restore controlfile;
RMAN> alter database mount;
RMAN> restore database;
RMAN> recover database noredo;
RMAN> alter database open resetlogs;

Hope this helps.
Re: Recover db from RMAN cold backup [message #184942 is a reply to message #184450] Fri, 28 July 2006 16:26 Go to previous message
ksintrakool
Messages: 20
Registered: July 2006
Location: Las Vegas
Junior Member
ebrian, you are superb. Now, I get enough information to try out difference recovery scenarios.

Thanks
Previous Topic: Importing some tables that were exported by the DBA account.
Next Topic: Help with a restore...
Goto Forum:
  


Current Time: Fri Mar 29 07:16:03 CDT 2024