Oracle 11g RMAN Duplicate Database Without Target Connection

- Advertisement -

Rman 11g allows us to create the rman replica without connecting to the destination database or recovery catalogue.

In Duplication, there is no target database connection and no recovery catalogue. RMAN collects metadata well about locations of backups and clones from BACKUP LOCATION.

To complete the replicate operation, all rman requires is the destination of the available backup parts, and rman scans the backup pieces and restores the spfile, controlfile, datafiles, and archivelog files.

Here’s an example of a duplicate activity:

The BACKUP LOCATION clause is used here to identify the type of duplication as containing no target connected, no recovery catalogue, while being backup-based.

This kind of duplicate database’s operation includes:

  • Rman recovers the spfile from backup parts in the specified location.
  • Once the spfile is recovered, rman assigns suitable values to the replica command’s arguments.
  • As an example:
    • db_name
    • control_files
    • db_file_name_convert
    • log_file_name_convert

etc…

When finished, rman restarts the instance with no mount so that the modifications can take effect.

- Advertisement -
  • Rman now sets the db name argument to the destination database name in order to restore the controlfile. The recovered controlfile will have the same db name as the target database name, and since we can’t have distinct db names in the spfile and the controlfile, rman will have to set the parameter db name to the destination database name and conduct the datafile and controlfile restoration.

If the duplication occurs on the same computer, then two controlfiles with the same db name cannot be mounted. To do this, the auxiliary instance’s field db unique name will be assigned to a unique value. Rman handles this by setting the db unique name to the database name supplied for the auxiliary database.

  • Following the preceding action, the controlfile is restored from the backup piece to the place specified by the argument control files.
  • Rman automatically restores the datafiles to the locations supplied by the db file name convert argument.
  •  Rman now restores the datafiles to the locations supplied by the db file name convert argument.
  •  Datafile recovery is carried out.
  • As once recovery is successful, rman shuts down the database to reset the value of db name to the auxiliary database’s value.
  • After that, the database is moved to the no-mount phase, and the controlfile is rebuilt to modify the database name and id. Following that, the database is opened using resetlogs.

The steps for building a duplicate database are as follows:

Step #1: Perform the following backups of the spfile, controlfile, database, and archivelogs:

Step #2: Make backup components available for duplication.

Step #3: For the auxiliary instance, create a password file.

Step #4: Create a single-parameter initialization parameter for the auxiliary instance, DB NAME.

Step #5: Switch the auxiliary instance to the no-mount mode.

Step #6: From RMAN, connect to the auxiliary instance and conduct the rman duplicate as follows:

- Advertisement -

Summary:

In this technique, RMAN only needs to know the destination of the backup pieces, in which the backup was transmitted from the main server and is attainable to RMAN, and where, during the duplication process, RMAN interprets the backup pieces and restores the spfile, controlfile, datafiles, and archivelog files to complete the duplicate procedure.

Learn more:

- Advertisement -

Related Posts

View More Posts

LEAVE A REPLY

Please enter your comment!
Please enter your name here