Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: RMAN recovery question...

RE: RMAN recovery question...

From: Mercadante, Thomas F \(LABOR\) <Thomas.Mercadante_at_labor.state.ny.us>
Date: Thu, 25 Jan 2007 08:10:35 -0500
Message-ID: <ABB9D76E187C5146AB5683F5A07336FFE08A9A@EXCNYSM0A1AJ.nysemail.nyenet>


Dianna,

I think you are missing one more "allocate" statement. You don't say where you backed your database up to, but I always have two allocate statements - one to read the backup set and one to write the stuff to disk.

Secondly, you do not need to restore your controlfile unless they are all lost. Rman will work with the "set until" command and update your current control files with the correct information. This also means that you do not need to delete all of the database files on disk - Rman will simply recreate or update them in place. And it is smart enough to know what files/blocks to update and what datafiles and archivelog files to pull from you backup in combination with what archive files may be currently on disk.

Below is my standard Rman Point in Time recovery script. Before this is run the database has been started with the "startup nomount" option. Notice that the first "allocate" command is used to read the backupset. This is either from disk or from 'SBT_TAPE' depending on where you went to.

If you are unsure in using these commands, create a small test database and run some Rman backups to disk. Trash the database and perform restores until you are confident in that it works. Nothing like testing on something you can throw away before doing the real thing.

Hope this helps.

Tom

PS. You need to perform a new Rman full backup when you are finished recoverying!!

run{
  allocate channel d1 type disk;
  allocate channel d2 type disk;
  set until time
"to_date('2007-01-25:12:56:00','yyyy-mm-dd:hh24:mi:ss')";   sql "alter database mount";
  restore (database);
  recover database;
  release channel d1;
  release channel d2;
  sql "alter database open resetlogs";
   }
reset database;



This transmission may contain confidential, proprietary, or privileged information which is intended solely for use by the individual or entity to whom it is addressed. If you are not the intended recipient, you are hereby notified that any disclosure, dissemination, copying or distribution of this transmission or its attachments is strictly prohibited. In addition, unauthorized access to this transmission may violate federal or State law, including the Electronic Communications Privacy Act of 1985. If you have received this transmission in error, please notify the sender immediately by return e-mail and delete the transmission and its attachments.

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of DIANNA GIBBS Sent: Wednesday, January 24, 2007 6:12 PM To: oracle-l_at_freelists.org
Subject: RMAN recovery question...

I'm new to RMAN and have a recovery question. We're recovering our test database to a point in time. The database is around 60 gig. When we start recovery, will RMAN re-create, restore and then recover all the database? And this may be a stupid question, but if more-current files are there, is RMAN intelligent enough to just restore the changed blocks? It was a full on-line backup. And depending on the answer, should I delete all the old files

or can I just leave them as is? What about channels, can I allocate more channels for a faster recovery?

Here's my script which I'm planning on doing command line:

rman target /
connect catalog rman_xxx_at_rcat

(password)

run {

     set until time "to_date('19-JAN-2007 18:00:00','DD-MON-YYYY HH24:MI:SS')";

     allocate channel ch1 type disk;
     restore controlfile ;
     alter database mount ;
     restore database ;
     recover database ;
     release channel ch1;

    }

Check to make sure temp tablespace is there

alter database open resetlogs;

Thanks so much-
 G.
--

http://www.freelists.org/webpage/oracle-l
--

http://www.freelists.org/webpage/oracle-l Received on Thu Jan 25 2007 - 07:10:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US