Databases Reference
In-Depth Information
database (reduplicating the target database). In the following example, we first perform a one-time setup of the new
data file names by using the
configure auxname
clause, as shown here:
RMAN> connect target /
RMAN> connect catalog rman/rman@catdb
RMAN> connect auxiliary sys/Nicholas11@dupdb
RMAN> run {
configure auxname for datafile 1 to '/u01/app/oracle/oradata1/system01.dbf';
configure auxname for datafile 2 to '/u01/app/oracle /oradata2/sysaux01.dbf';
configure auxname for datafile 3 to '/u01/app/oracle /oradata3/undotbs01.dbf';
configure auxname for datafile 4 to '/u01/app/oracle /oradata4/drsys01';
configure auxname for datafile 5 to '/u01/app/oracle /oradata5/example01.dbf';
configure auxname for datafile 6 to '/u01/app/oracle /oradata6/indx01.dbf';
configure auxname for datafile 7 to '/u01/app/oracle /oradata7/users01.dbf';
}
Synchronize the duplicate database with the source database by periodically executing the
duplicate target
database
command to re-create the duplicate database. For example:
RMAN> connect target /
RMAN> connect catalog rman/rman@catdb
RMAN> connect auxiliary sys/Ninamma11@dupdb
RMAN> duplicate target database to dupdb
logfile
group 1 ('/u01/app/oracle/duplogs/redo01a.log',
'/u02/app/oracle/duplogs/redo01b.log') size 200k reuse,
group 2 ('/u01/app/oracle/duplogs/redo02a.log',
'/u02/app/oracle /duplogs/redo02b.log') size 200k reuse;
You can schedule this script for running on a daily or a weekly basis, thus creating a new and up-to-date
duplicate database on a continuous basis.
How It Works
To synchronize a duplicate database with the parent database, you must in essence re-create the duplicate database
by transferring the latest copies of the source database files to the duplicate database.
To set up a database for periodic synchronization, you must first use the
configure
command to set persistent
new names for the data files. Once you set the persistent data file names, the file names will be recorded in the control
file, and RMAN will use the same file names each time you synchronize the duplicate database by using the
duplicate
command.
Remember that you have to employ the
configure auxname
clause only onceāthe first time you duplicate the
database. RMAN will reuse the same file names anytime you execute the
duplicate
command.