RESTORE/RECOVER DATA FILES OVER THE NETWORK
On the primary database:
Yet
another great enhancement in 12c R1. You can now restore or recover a
data file, control file, spfile, tablespace or entire database between
primary and standby databases using a SERVICE name. This is particularly
useful to synchronize the primary and standby databases.
When
there is a pretty long gap found between the primary and standby
database, you no longer require the complex roll-forward procedure to
fill the gap between the primary and standby. RMAN is able to perform
standby recovery getting the incremental backups through the network and
applying them to the physical standby database. Having said that, you
can directly copy the required data files from the standby location to
the primary site using the SERVICE name e.g. in the case of a data file,
tablespace lost on the primary database, or without actually restoring
the data files from a backup set.
The
following procedure demonstrates how to perform a roll forward using
the new features to synchronize the standby database with its primary
database:
On the physical standby database:
./rman target "username/password@standby_db_tns as SYSBACKUP"
RMAN> RECOVER DATABASE FROM SERVICE primary_db_tns USING COMPRESSED BACKUPSET;
The
above example uses the primary_db_tns connect string defined on the
standby database, connects to the primary database, performs an
incremental backup, transfers these incremental backups over standby
destination, and then applies these files to the standby database to
synchronize the standby. However, you need to ensure you have configured
primary_db_tns to point to the primary database on the standby database
side.
In
the following example, I will demonstrate a scenario to restore a lost
data file on the primary database by fetching the data file from the
standby database:
On the primary database:
./rman target "username/password@primary_db_tns as SYSBACKUP"
RMAN> RESTORE DATAFILE ‘+DG_DISKGROUP/DBANME/DATAFILE/filename’ FROM SERVICE standby_db_tns;
No comments:
Post a Comment