Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RMAN TSPITR and Dataguard

RMAN TSPITR and Dataguard

From: David Barbour <>
Date: Sat, 4 Nov 2006 16:55:16 -0500
Message-ID: <>

Of course, since it's the weekend .....

I need to restore a tablespace in my production instance. I'm using RMAN and have full backups, logs, etc. Not a problem . Except I'm running a dataguard instance and I'm not sure what the effect is going to be. Here's my plan (pretty much already inplace):

  1. The tablespace to be recovered has no dependencies on any other within the database.
  2. I've created an auxiliary instance called 'clone' and entered parameters in tnsnames.ora and listener.ora referencing the instance. Re-loaded the listener.
  3. I've created a new init.ora file called initclone.ora that has the following important parameters:

db_name = PR1
lock_name_space = clone
log_archive_start = false
remote_login_passwordfile = exclusive
control_files = ( /sappr1mig/cntrl/cntrlclone.dbf) DB_FILE_NAME_CONVERT=('/oracle/PR1/','/sappr1mig/') LOG_FILE_NAME_CONVERT=('/oracle/PR1/','/sappr1mig/')

4. I'v created a directory in the tf70_1 directory in /oracle/PR1/sapdata2/ on
both the target and the standby (Dataguard) databases.

5. I can startup nomount the clone, and connect to the clone, the target (PR1) and the catalog.

6. If I run the following script


export ORACLE_HOME=/oracle/PR1/920_64
export ORACLE_SID=clone

rman <<EOJ

connect target sys/<password>@pr1
connect auxiliary sys/<password>@clone
connect catalog rmanadmin/<password>@rcat

set newname for datafile '/oracle/PR1/sapdata1/tf70_1/tf70.data1' TO
'/oracle/PR1/sapdata2/tf70_1/tf70.data1'; recover tablespace tf70 until time '2006-11-03:19:00:00';}


EOJ Then RMAN will

A. Take the tf70 tablespace to be recovered offline.
B. Restore the datafile to the auxiliary instance.
C. Recover the restored datafile to the specified time.
D. Open the auxiliary database with the RESETLOGS option.
E. Export the dictionary metadata about objects in the recovered
tablespaces—the DDL to create the objects along with pointers to the physical
locations of those in the recovered datafile—to the target database. F. Shut down the auxiliary instance.
G. Issue SWITCH command so that the target control file now points to the datafile in the recovery set that was just recovered at the auxiliary database.
H. Import the dictionary metadata that was exported from the auxiliary instance, allowing the recovered object to be accessed.

And my question: Is the dataguard instance is going to pick up the fact there is a newly recovered datafile in a different location and get that completely copied?

I've created datafiles in the past with no problem, trucated tables and reloaded, etc. without issue, just not sure how the new datafile, which is being restored to the primary (target), is going to get copied up to the standby. It's not really a create tablespace or add datafile type command, or is it?

Received on Sat Nov 04 2006 - 15:55:16 CST

Original text of this message