One of the new features of Oracle 11g R2 is the RMAN backup-based duplication. One can clone an Oracle database using the source database backup without actually making a connection to it. This provides a traditional database cloning like experience (relying on just the backups alone) with the ease of RMAN. In this blog post, I want to write about certain points that you may not be aware of the backup-based duplication
RMAN configuration settings are not duplicated
If the source database has special RMAN configuration settings such as retention policy, archivelog deletion policy, controlfile autobackup etc., all these settings are reset (lost) in the duplicated database. So one has to manually enable these settings if one wants to retain them in the destination (new) database. This blog post assumes that one is not using the recovery catalog (catalog mode)
RMAN> show all;
using target database control file instead of recovery catalog
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
Destination database (built using the backup-based duplication)
RMAN> show all;
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
Some init parameter values still contain source database references
If one uses a basic init parameter file for the destination database (to be duplicated database) that includes file system paths such as audit_file_dest,diagnostic_dest,utl_file_dir etc., then these are overwritten by the RMAN duplicate command with the spfile option and one may be suprised to see source database paths again in the destination database's init parameter file. One should not forget to update them manually with the correct destination file system paths.
Some init parameter values contain a prefix containing both source and destination database names
After a successful backup-based duplication, one may be surprised to see a majority of the memory related initialization parameters containing two entries, one each containing the source database name and destination database name prefix. If that is the case, then one has to manually delete init parameters containing the source database name prefix. A below is one example
Also, a different matter is that the actual memory values are not exactly identical. One has to manually update the destination database init parameter values for memory if required.
The backup-based duplication is an excellent new feature in Oracle 11g R2 release for cloning databases. By following the above notes, one may avoid surprises after such a cloning exercise.
Post a Comment