You are on page 1of 3

Clone an Oracle database using RMAN duplicate procedure on same server

Posted on 02 October 2010 by rmanbackup Clone an Oracle database using RMAN duplicate procedure on same server Here are the steps 1 Backup the source database First RMAN backup of the source database is required before the operation. This example assumes that no recovery catalog available status for the RMAN Connect the RMAN tool with nocatalog;
rman target sys@nocatalog

Start a backup of the source database plus archivelog;


backup database plus archivelog format '/u01/ora_db/rmanfiles/%d_%u_%s';

2 Create a PFILE for the new database If you dont have any PFILE , you can simply create a new one with copying the existing PFILE. If your source database using a SPFILE , then you can continue with the following command
create pfile='init.ora' from spfile;

3 Edit the new PFILE for the cloned database If your cloned database is to have a different name to the source , then you have to change paths on your new PFILE. Also you have to add the following lines to newly created pfile for the dublicate operation. db_file_name_convert=(,) log_file_name_convert=(,) Example ; Source Database is = 10G Cloned Database is = G10

Then ;
db_file_name_convert=(/u01/ora_db/10G/,/u02/ora_db/G10/) log_file_name_convert=(/u01/ora_db/10G/,/u02/ora_db/G10/)

4 Create BDUMP,CDUMP and UDUMP directories Create the *DUMP directories as specified the step 3 (like PFILE) 5 Add a new entry to ORATAB file Edit the /etc/oratab/ file and add an entry for the new cloned database 6 Create a password file Here is the command for create a password;
orapwd file=${ORACLE_HOME}/dbs/orapw${ORACLE_SID} password=

7 Duplicate the database with SQLPLUS


startup nomount rman target sys@ nocatalog auxiliary / duplicate target database to ;

If the operation finished with success ; database opened Finished Duplicate Db at 21-SEP-10 8 Create an SPFILE with SQLPLUS
create spfile from shutdown immediate (we no longer need alter system reset alter system reset pfile; the "file_name_convert" settings) db_file_name_convert scope=spfile sid='*' log_file_name_convert scope=spfile sid='*'

9 DISABLE archive log mode on Clone database


shutdown immediate startup mount alter database noarchivelog; alter database open;

10 Configure TNS to add new database Add new database entries to listener.ora and tnsnames.ora files.

You might also like