Search This Blog

Thursday 16 April 2015

Duplicating a database using RMAN without connecting to the target database

Duplicating a Oracle Database using RMAN


Target database: -       test1 on node1.
Auxiliary database: - test2 on node2.


Pre-requisite:- Prepare a full backup of the target database which includes the archive logs and control file. Existing full database backups can also be used. The below command i used to take the full backup.

RMAN> backup database include current controlfile format '/u05/dup/%U' plus archivelog format '/u05/dup/%U';

  1. Prepare the pfile for the auxiliary instance to place the instance in the nomount state
  2. Make an oratab entry for the auxiliary instance.
  3. Startup nomount the auxiliary instance.
  4. Copy the backup files of the target database to the auxiliary database server.
  5. Login to the auxiliary database server and source the auxiliary database instance environment
  6. Connect to the auxiliary instance as shown below
/u05/dup{node1}=>[test2]:-)  rman auxiliary /

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Aug 13 01:00:16 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to auxiliary database: test2 (not mounted)


7. Initiate the rman duplication process as show below. This will start the cloning process.

RMAN> duplicate database to test2 backup location '/u05/dup/' nofilenamecheck;

8. Successful duplication will open the new database in read-write mode.

9.the cloning procedure, create the spfile inside ASM diskgroup, create password file, register the database in the cluster and any post db creation steps.