Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restored database with RMAN in the state which I supposed will be different.

Status
Not open for further replies.

marcq

Technical User
Aug 18, 2011
34
PL
Hello.
I'm occasional oracle user and not have lot of recent experience.
Excuse if my question might be simple,

It's about backup point done by RMAN.

1. Let's assume:
that I have oracle (rac) database.
that I have it in noarchivemode.

2. I do.
$rman target /
RMAN> backup database

3. I see the backup (created files during rman backup) in backup directory.
Now. For test purpose I drop created simple table yet before backup was done.

4. I want to come back to the time before the table was droped.

5. So I do:
shutdown instance on both nodes and start them in mount state.
$rman target /
RMAN> restore database

6. After successfull operation
I do
$SQL> alter database open.
But it says to me that one media needs recovery (and it exits from opening).

7. So what I execute is
$SQL> recover;
8. Afer that it starts completely.
And when I check content I do not see the droped table but all others.

My question is:
Why it is like this?
I'm afraid I don't deeply understand what happens here.
Why the change after backup is mainaned although restore was done with backup from before the operation?
Does not the backup contains also control file and redolog but that only before the changes?
I'm a little bit confused.

Thanks for hints.
M.







 
As a general rule, online backups are not usable if your database is not in archivelog mode. The online backups of the datafiles will finish at slightly different times, so you will always need to do some forward recovery to get all of your datafiles in synch. But forward recovery most often needs archive log files, which you don't have because your database isn't in archivelog mode.

There's a good chance that you can forward recover in your simple test scenario, because your redo logs may still contain all of the transactions needed for forward recovery. But don't rely on this! Oracle can and will overwrite redo log files when it needs to. Some day you'll restore an online backup and the transactions needed for forward recovery will be gone. Then you're stuck with a database that can't be recovered.

The lesson here is to always run your database in archivelog mode, if you want to do online backups. If you're not archiving your redo log files, you will need to shut down your database and take cold backups.
 
Thank you very much karluk for your response.!
So my question is then (I just assume I'm asking but for something obvious just to ensure).
If I enable right now mode to archive log.
Wait until archive logs are created then make rman online backup.

Now assume disaster or just deletion of some tables which were important.
I'll restore that RMAN backup till the time (with proper command until time) - right?
M.
 
That's right. If you encounter a problem with your database which requires going back to before the problem happened, you would restore from an online backup and then perform an incomplete forward recovery, ending the recovery before the problem started. There are a number of ways to tell Oracle when to stop the recovery. Check the manuals for the proper syntax.
 
Hello karluk.
Thank you for you support and advices.
I've managed to do some tests sucessfully and will do another tests.
M.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top