Solved

RMAN daily cold backup

Posted on 2009-04-03
8
928 Views
Last Modified: 2012-05-06
We take RMAN cold backup daily.
we have the RMAN cold backup.(oracle 10g rel 10) on Unix env.
today is friday and we have to restore the development database from wednesdays cold backup.

How can we proceed with this task.

we have all the backups on disk.
0
Comment
Question by:ballioballi
  • 3
  • 2
8 Comments
 
LVL 47

Accepted Solution

by:
schwertner earned 250 total points
Comment Utility

The datapieces 03FCOI5E_1_1 and  04FCOIHE_1_1  

were transferred to the new host machine shvertner.
 

       

Transfer INIT.ORA file from the target to the cloning instance.

Change all data file locations mentioned in the INIT.ORA file.
 

Transfer the password file PWDmain.ora   file. (&\ora92\database)
 
 

RMAN is alias for connecting to the duplicate database. 
 
 

SQL> connect sys/reks@rman as sysdba

Connected.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup nomount

ORACLE instance started.
 

Total System Global Area  118562548 bytes

Fixed Size                   454388 bytes

Variable Size              83886080 bytes

Database Buffers           33554432 bytes

Redo Buffers                 667648 bytes

SQL>

SQL>alter database mount

RMAN>connect   target sys/reks@rman
 
 

    run{ 

      allocate channel c1 type disk; 

      restore controlfile; 

    } 
 
 
 

Change the password file with the password file from the target database to avoid the error message:
 

SQL> alter database mount;

alter database mount

*

ERROR at line 1:

ORA-01991: invalid password file 'D:\oracle\ora92\DATABASE\PWDmain.ORA' 
 

Now you have to use the passwords from the old target database (in my case the MAIN instance from the main computer!
 
 

SQL> alter database mount;
 
 

RMAN> @restore.txt

 
 

    run {  

     allocate channel c1 type disk; 

     allocate channel c2 type disk; 

     allocate channel c3 type disk;  

     set newname for datafile         1  to 'D:\ORACLE\ORADATA\MAIN\SYSTEM01.DBF';

     set newname for datafile         2  to 'D:\ORACLE\ORADATA\MAIN\UNDOTBS01.DBF';

     set newname for datafile         3  to 'D:\ORACLE\ORADATA\MAIN\CWMLITE01.DBF';

     set newname for datafile         4  to 'D:\ORACLE\ORADATA\MAIN\DRSYS01.DBF';

     set newname for datafile         5  to 'D:\ORACLE\ORADATA\MAIN\EXAMPLE01.DBF';

     set newname for datafile         6  to 'D:\ORACLE\ORADATA\MAIN\INDX01.DBF';

     set newname for datafile         7  to 'D:\ORACLE\ORADATA\MAIN\ODM01.DBF';

     set newname for datafile         8  to 'D:\ORACLE\ORADATA\MAIN\TOOLS01.DBF';

     set newname for datafile         9  to 'D:\ORACLE\ORADATA\MAIN\USERS01.DBF';

     set newname for datafile        10  to 'D:\ORACLE\ORADATA\MAIN\XDB01.DBF';

     set newname for datafile        11  to 'D:\ORACLE\ORADATA\MAIN\TSDC00.DBF';

     set newname for datafile        12  to 'D:\ORACLE\ORADATA\MAIN\TSDCONTACTS00.DBF';

     set newname for datafile        13  to 'D:\ORACLE\ORADATA\MAIN\TSICONTACTS00.DBF';

     set newname for datafile        14  to 'D:\ORACLE\ORADATA\MAIN\TSDCONTAINER00.DBF';

     set newname for datafile        15  to 'D:\ORACLE\ORADATA\MAIN\TSICONTAINER00.DBF';

     set newname for datafile        16  to 'D:\ORACLE\ORADATA\MAIN\TSDDOCUMENTS00.DBF';

     set newname for datafile        17  to 'D:\ORACLE\ORADATA\MAIN\TSIDOCUMENTS00.DBF';

     set newname for datafile        18  to 'D:\ORACLE\ORADATA\MAIN\TSDIDMAP00.DBF';

     set newname for datafile        19  to 'D:\ORACLE\ORADATA\MAIN\TSIIDMAP00.DBF';

     set newname for datafile        20  to 'D:\ORACLE\ORADATA\MAIN\TSDMEDICAL00.DBF';

     set newname for datafile        21  to 'D:\ORACLE\ORADATA\MAIN\TSIMEDICAL00.DBF';

     set newname for datafile        22  to 'D:\ORACLE\ORADATA\MAIN\TSDSYSTEM00.DBF';

     set newname for datafile        23  to 'D:\ORACLE\ORADATA\MAIN\TSISYSTEM00.DBF';

     set newname for datafile        24  to 'D:\ORACLE\ORADATA\MAIN\TSDAUDIT00.DBF';

     set newname for datafile        25  to 'D:\ORACLE\ORADATA\MAIN\TSIAUDIT00.DBF';

     set newname for datafile        26  to 'D:\ORACLE\ORADATA\MAIN\TSROLLBACKSMALL00.DBF';

     set newname for datafile        27  to 'D:\ORACLE\ORADATA\MAIN\TSROLLBACKLARGE00.DBF';

     set newname for datafile        28  to 'D:\ORACLE\ORADATA\MAIN\TSIC00.DBF';

     set newname for datafile        29  to 'D:\ORACLE\ORADATA\MAIN\TSDT00.DBF';

     set newname for datafile        30  to 'D:\ORACLE\ORADATA\MAIN\TSIT00.DBF';

     set newname for datafile        31  to 'D:\ORACLE\ORADATA\MAIN\TSDD00.DBF';

     set newname for datafile        32  to 'D:\ORACLE\ORADATA\MAIN\TSID00.DBF';

     set newname for datafile        33  to 'D:\ORACLE\ORADATA\MAIN\TSDI00.DBF';

     set newname for datafile        34  to 'D:\ORACLE\ORADATA\MAIN\TSII00.DBF';

     set newname for datafile        35  to 'D:\ORACLE\ORADATA\MAIN\TSDM00.DBF';

     set newname for datafile        36  to 'D:\ORACLE\ORADATA\MAIN\TSIM00.DBF';

     set newname for datafile        37  to 'D:\ORACLE\ORADATA\MAIN\TSDS00.DBF';

     set newname for datafile        38  to 'D:\ORACLE\ORADATA\MAIN\TSIS00.DBF';

     set newname for datafile        39  to 'D:\ORACLE\ORADATA\MAIN\TSDA00.DBF';

     set newname for datafile        40  to 'D:\ORACLE\ORADATA\MAIN\TSIA00.DBF';

     set newname for datafile        41  to 'D:\ORACLE\ORADATA\MAIN\TSRS00.DBF';

     set newname for datafile        42  to 'D:\ORACLE\ORADATA\MAIN\TSRL00.DBF'; 

     restore database; 

    }
 
 

SQL> select name from v$datafile;
 

D:\ORACLE\ORADATA\MAIN\SYSTEM01.DBF

D:\ORACLE\ORADATA\MAIN\UNDOTBS01.DBF

D:\ORACLE\ORADATA\MAIN\CWMLITE01.DBF

D:\ORACLE\ORADATA\MAIN\DRSYS01.DBF

D:\ORACLE\ORADATA\MAIN\EXAMPLE01.DBF

D:\ORACLE\ORADATA\MAIN\INDX01.DBF

D:\ORACLE\ORADATA\MAIN\ODM01.DBF

D:\ORACLE\ORADATA\MAIN\TOOLS01.DBF

D:\ORACLE\ORADATA\MAIN\USERS01.DBF

D:\ORACLE\ORADATA\MAIN\XDB01.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDC00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDCONTACTS00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSICONTACTS00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDCONTAINER00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSICONTAINER00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDDOCUMENTS00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIDOCUMENTS00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDIDMAP00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIIDMAP00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDMEDICAL00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIMEDICAL00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDSYSTEM00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSISYSTEM00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDAUDIT00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIAUDIT00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSROLLBACKSMALL00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSROLLBACKLARGE00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIC00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDT00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIT00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDD00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSID00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDI00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSII00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDM00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIM00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDS00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIS00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDA00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIA00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSRS00.DBF

E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSRL00.DBF
 

42 rows selected.

===============================================================
 

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\SYSTEM01.DBF'   to 'D:\ORACLE\ORADATA\MAIN\SYSTEM01.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\UNDOTBS01.DBF'  to 'D:\ORACLE\ORADATA\MAIN\UNDOTBS01.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\CWMLITE01.DBF'  to 'D:\ORACLE\ORADATA\MAIN\CWMLITE01.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\DRSYS01.DBF'    to 'D:\ORACLE\ORADATA\MAIN\DRSYS01.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\EXAMPLE01.DBF'  to 'D:\ORACLE\ORADATA\MAIN\EXAMPLE01.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\INDX01.DBF'     to 'D:\ORACLE\ORADATA\MAIN\INDX01.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\ODM01.DBF'      to 'D:\ORACLE\ORADATA\MAIN\ODM01.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TOOLS01.DBF'    to 'D:\ORACLE\ORADATA\MAIN\TOOLS01.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\USERS01.DBF'  to 'D:\ORACLE\ORADATA\MAIN\USERS01.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\XDB01.DBF'  to 'D:\ORACLE\ORADATA\MAIN\XDB01.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDC00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDC00.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDCONTACTS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDCONTACTS00.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSICONTACTS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSICONTACTS00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDCONTAINER00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDCONTAINER00.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSICONTAINER00.DBF'  to 'D:\ORACLE\ORADATA\MAIN\TSICONTAINER00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDDOCUMENTS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDDOCUMENTS00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIDOCUMENTS00.DBF'  to 'D:\ORACLE\ORADATA\MAIN\TSIDOCUMENTS00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDIDMAP00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDIDMAP00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIIDMAP00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIIDMAP00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDMEDICAL00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDMEDICAL00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIMEDICAL00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIMEDICAL00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDSYSTEM00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDSYSTEM00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSISYSTEM00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSISYSTEM00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDAUDIT00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDAUDIT00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIAUDIT00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIAUDIT00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSROLLBACKSMALL00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSROLLBACKSMALL00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSROLLBACKLARGE00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSROLLBACKLARGE00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIC00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIC00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDT00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDT00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIT00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIT00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDD00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDD00.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSID00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSID00.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDI00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDI00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSII00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSII00.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDM00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDM00.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIM00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIM00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDS00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIS00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDA00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDA00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIA00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIA00.DBF';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSRS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSRS00.DBF';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSRL00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSRL00.DBF'; 
 
 

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\REDO01.LOG' to 'D:\ORACLE\ORADATA\MAIN\REDO01.LOG';

alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\REDO02.LOG' to 'D:\ORACLE\ORADATA\MAIN\REDO02.LOG';

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\REDO03.LOG' to 'D:\ORACLE\ORADATA\MAIN\REDO03.LOG';
 

SQL> select name from v$datafile;
 

NAME

------------------------------------------------------------

D:\ORACLE\ORADATA\MAIN\SYSTEM01.DBF

D:\ORACLE\ORADATA\MAIN\UNDOTBS01.DBF

D:\ORACLE\ORADATA\MAIN\CWMLITE01.DBF

D:\ORACLE\ORADATA\MAIN\DRSYS01.DBF

D:\ORACLE\ORADATA\MAIN\EXAMPLE01.DBF

D:\ORACLE\ORADATA\MAIN\INDX01.DBF

D:\ORACLE\ORADATA\MAIN\ODM01.DBF

D:\ORACLE\ORADATA\MAIN\TOOLS01.DBF

D:\ORACLE\ORADATA\MAIN\USERS01.DBF

D:\ORACLE\ORADATA\MAIN\XDB01.DBF

D:\ORACLE\ORADATA\MAIN\TSDC00.DBF

D:\ORACLE\ORADATA\MAIN\TSDCONTACTS00.DBF

D:\ORACLE\ORADATA\MAIN\TSICONTACTS00.DBF

D:\ORACLE\ORADATA\MAIN\TSDCONTAINER00.DBF

D:\ORACLE\ORADATA\MAIN\TSICONTAINER00.DBF

D:\ORACLE\ORADATA\MAIN\TSDDOCUMENTS00.DBF

D:\ORACLE\ORADATA\MAIN\TSIDOCUMENTS00.DBF

D:\ORACLE\ORADATA\MAIN\TSDIDMAP00.DBF

D:\ORACLE\ORADATA\MAIN\TSIIDMAP00.DBF

D:\ORACLE\ORADATA\MAIN\TSDMEDICAL00.DBF

D:\ORACLE\ORADATA\MAIN\TSIMEDICAL00.DBF

D:\ORACLE\ORADATA\MAIN\TSDSYSTEM00.DBF

D:\ORACLE\ORADATA\MAIN\TSISYSTEM00.DBF

D:\ORACLE\ORADATA\MAIN\TSDAUDIT00.DBF

D:\ORACLE\ORADATA\MAIN\TSIAUDIT00.DBF

D:\ORACLE\ORADATA\MAIN\TSROLLBACKSMALL00.DBF

D:\ORACLE\ORADATA\MAIN\TSROLLBACKLARGE00.DBF

D:\ORACLE\ORADATA\MAIN\TSIC00.DBF

D:\ORACLE\ORADATA\MAIN\TSDT00.DBF

D:\ORACLE\ORADATA\MAIN\TSIT00.DBF

D:\ORACLE\ORADATA\MAIN\TSDD00.DBF

D:\ORACLE\ORADATA\MAIN\TSID00.DBF

D:\ORACLE\ORADATA\MAIN\TSDI00.DBF

D:\ORACLE\ORADATA\MAIN\TSII00.DBF

D:\ORACLE\ORADATA\MAIN\TSDM00.DBF

D:\ORACLE\ORADATA\MAIN\TSIM00.DBF

D:\ORACLE\ORADATA\MAIN\TSDS00.DBF

D:\ORACLE\ORADATA\MAIN\TSIS00.DBF

D:\ORACLE\ORADATA\MAIN\TSDA00.DBF

D:\ORACLE\ORADATA\MAIN\TSIA00.DBF

D:\ORACLE\ORADATA\MAIN\TSRS00.DBF

D:\ORACLE\ORADATA\MAIN\TSRL00.DBF
 

42 rows selected.
 

===============================================================
 

SQL> alter database open resetlogs;
 

RESETLOGS Specify RESETLOGS to reset the current log sequence number to 1

and discards any redo information that was not applied during recovery, ensuring

that it will never be applied. This effectively discards all changes that are in the redo

log, but not in the database.

You must specify RESETLOGS to open the database after performing media

recovery with an incomplete recovery using the RECOVER clause or with a backup

control file. After opening the database with this clause, you should perform a

complete database backup.
 
 

THE DATABASE IS RESTORED AT THE DIFFERENT NODE (HOST)

Open in new window

0
 

Author Comment

by:ballioballi
Comment Utility
Thanks for your prompt reply. Let me explain you the whole scenario
 

we already have the cold backup of wednesday and thursday.

Now, where I am  mentioning that we have to restorie the tuesday night's cold backup.

Please note today is friday and we ran two coldback's after the original backup we are talking here.


we have to restore from tuesday nights backup (we now have tuesday,wednesday and thursday's backup on the location).


Please advice.
0
 

Author Comment

by:ballioballi
Comment Utility
I mean how the repository come to know about the 2 day's back
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 40

Expert Comment

by:mrjoltcola
Comment Utility
use restore until time ... and recover until time ...

Or set the UNTIL TIME or SCN or SEQUENCE

RUN
{
  SET UNTIL SCN 1000;    
  # or
  # SET UNTIL TIME 'Mar 29 2009 05:00:00';
  RESTORE DATABASE;
  RECOVER DATABASE;
}

0
 

Author Comment

by:ballioballi
Comment Utility

This is a cold backup.Does this incomplete recovery will work for the cold backup ?

Why I have to recover when I have the cold backup?
One more question:- How can I find the SCN for that cold backup ended two days ago ?

Thanks,
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 250 total points
Comment Utility
Right, you don't have to recover from cold backup.

And you can just specifiy the time, or the backupset as well. Do you know the specific backupset #? If so, specify that.

RMAN> list backupset;

I prefer to use TIME in most cases, but there are cases where someone may have corrupted something and you may know the exact SCN from log miner.

To preview the restore without actually performing it, say I wanted to restore until Apr 1.
Note, PREVIEW keyword is important, or it will start the restore.

RMAN> restore database until time '01-APR-09' preview;    

Review which backupset / pieces RMAN will choose.

Then if you are ready, reissue the command without the preview (with database closed of course).

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now