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

Home -> Community -> Usenet -> c.d.o.tools -> Re: recovery by RMAN for a valid database?

Re: recovery by RMAN for a valid database?

From: Alex Filonov <afilonov_at_pro-ns.net>
Date: Fri, 17 Nov 2000 20:10:20 GMT
Message-ID: <8v43b5$3ke$1@nnrp1.deja.com>

In article <8v42dr$2kn$1_at_nnrp1.deja.com>,   Alex Filonov <afilonov_at_pro-ns.net> wrote:
> In article <8v400u$d6$1_at_nnrp1.deja.com>,
> susana73_at_hotmail.com wrote:
> > Hello,
> >
> > I am doing hotbackup using RMAN. My database isn't crashed and I didn't
> > lose any datafiles. But one of the developers like to recover the data
> > back to a certain point of time(say Wednesday 12pm, 2 days ago). Anyone
> > knows how to do that on RMAN?
> >
> > Thanks in advance,
> >
> > Susan
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> It's all in Oracle Backup and Recovery documentation. First, you do
> set date command to set date/time to which you want to recover. Then you
> run recover database command.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sorry,

Command to set date/time is set until, here is the example from documentation:

 run {
# recover database until 3pm after restoring tbs_1 to a new location allocate channel dev1 type disk;
allocate channel dev2 type 'sbt_tape';
set until time 'Nov 15 1996 15:00:00'
set newname for datafile '/vobs/oracle/dbs/tbs_11.f' to '?/dbs/temp1.f' ;
set newname for datafile '?/dbs/tbs_12.f' to '?/dbs/temp2.f' ;
restore controlfile to '/vobs/oracle/dbs/cf1.f' ; replicate controlfile from '/vobs/oracle/dbs/cf1.f'; sql "alter database mount" ;
restore database skip tablespace temp1;
switch datafile all;
recover database skip tablespace temp1;

sql "alter database open resetlogs";
sql "drop tablespace temp1";
sql "create tablespace temp1 datafile '/vobs/oracle/dbs/temp1.f' size 10M";
release channel dev1;
release channel dev2;
}

Make sure you set NLS_DATE_FORMAT to date/time format you are using in set until command. You also need to set NLS_LANG. On UNIX:

export NLS_DATE_FORMAT="Mon DD YYYY HH24:MI:SS" export NLS_LANG=american

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Nov 17 2000 - 14:10:20 CST

Original text of this message

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