Professional Documents
Culture Documents
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
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=
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='*'
10 Configure TNS to add new database Add new database entries to listener.ora and tnsnames.ora files.