Home » RDBMS Server » Backup & Recovery » Recovery through RMAN (redo logs)
Recovery through RMAN (redo logs) [message #63606] Wed, 20 October 2004 04:38 Go to next message
Chris
Messages: 128
Registered: November 1998
Senior Member
I am trying to recover a dataspace using RMAN. Let me say btw that I am completely new to Oracle, so I'm working a bit on trial and error here.

What I do is make a backup of my dataspace. I make a few changes to the database (add some new entries, delete others etc). Then I recover the dataspace from my backup (still using RMAN). But it seems that the changes I did after taking the backup are still there after the recovery. So either the same changes were applied after doing the recovery or nothing was actually recovered!?

Now I read about redo logs. Am I coorect that redo logs hold any changes done to the database? and if so does RMAN (or something else) automatically apply these changes after doing a restore?

And, if that is the case, can I restore without applying these changes?

Any help will be greatly appreciated.

- Chris
Re: Recovery through RMAN (redo logs) [message #63610 is a reply to message #63606] Wed, 20 October 2004 05:32 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Hi,

It all depends on what you've put into your RMAN script: The "restore database" command will just restore files from backup. The "recover database" command will apply changes from your archived- and online logs to the database.

By default Oracle will do a COMPLETE RECOVERY. If want to do a point in time recovery, use the "SET UNTIL TIME" or "SET UNTIL SCN" commands.

Best regards.

Frank
Re: Recovery through RMAN (redo logs) [message #63611 is a reply to message #63610] Wed, 20 October 2004 05:48 Go to previous messageGo to next message
Chris
Messages: 128
Registered: November 1998
Senior Member
Thank you for the fast reply.

Well I do both "restore" and "recover". Frankly I'm just following an example in the reference guide.

So what you're saying if I understand you correctly...

Restore, recreates my dataspace from the backup.

Recover applies the changes done since the backup was taken??

So if I just want to restore my database as it looked at the point of backup, then I only do "restore database" and skip the "recover database"??

- Chris
Re: Recovery through RMAN (redo logs) [message #63613 is a reply to message #63611] Wed, 20 October 2004 09:45 Go to previous messageGo to next message
croK
Messages: 170
Registered: April 2002
Senior Member
YES. You only restore database and do not recover.
But be aware that you will need to restore entire database, you cannot restore just one tablespace or datafile and leave it desynchronized with the remaining datafiles and controlfiles. All files must be in sync up to the same SCN stored on controlfiles.

Best luck.
Re: Recovery through RMAN (redo logs) [message #63637 is a reply to message #63613] Thu, 21 October 2004 22:41 Go to previous messageGo to next message
Chris
Messages: 128
Registered: November 1998
Senior Member
Ok I tried using the "SET UNTIL" command in my script. And when I opened the database I used the 'resetlogs' parameter.

But after running the script I was unable to put the tablespace 'online' with the "alter table" command. It returned an error saying that the datafile was from before the last resetlog.

Restore no longer worked cause it said there was no datafile, and recover (full recover) could not be done because I had reset the logs (I guess). Basically I had to wipe the tablespace and recreate it.

Is there something else I need to be aware of when doing a point in time recovery?

Man I hate trial and error :)

- Chris
Re: Recovery through RMAN (redo logs) [message #63641 is a reply to message #63637] Fri, 22 October 2004 11:56 Go to previous messageGo to next message
croK
Messages: 170
Registered: April 2002
Senior Member
I can't understand why you need to put tablespace online after opened database.
So, you did opened database?
You can do further FULL recover, but you must restore entire database again from backup, that will include controlfile restoration, which have redo information in order to perform recover.
Are you sure you perform full database backup?, is there the possibility you performed only some files instead of full db?
Re: Recovery through RMAN (redo logs) [message #63649 is a reply to message #63641] Sun, 24 October 2004 23:19 Go to previous message
Chris
Messages: 128
Registered: November 1998
Senior Member
I think I may have confused things a bit. I actually only do a tablespace backup, not a complete database backup.

So when I restore I start by taking the tablespace offline. Then I restore, recover and then I need to put the tablespace online again.
Previous Topic: recovery prob
Next Topic: Legato and Rman
Goto Forum:
  


Current Time: Thu Apr 18 17:15:34 CDT 2024