Please visit for Videos, Free posts, Books, Webinar and Free forum … ALL about Oracle!

August 24, 2010

To fast clone my Oracle DB

Filed under: Uncategorized — orawiss @ 3:55 pm

In my previous post, I explained how to use RMAN (Recovery manager) to duplicate one Oracle database.
Now, let’s make the clone possible, in few steps and without RMAN.

Applies to:

Oracle Server – Enterprise Edition – Version: – 64 bit to – 64 bit.
Information in this document applies to any platform.


This document gives a step by step guide about how to manually clone or restore the database to a different host.


1. Prerequisites

The copy of the data files must be done with the database closed or the database must be in ARCHIVELOG mode,

2. Init.ora or spfile and control file

 You need to copy the init.ora or spfile file to the target host and locate it in ORACLE_HOME\dbs

 Copy the controlfile(s), all the datafiles and all the archivelogs generated, to the target host.

If database is open then, you need to put all the tablespaces in backup mode, before starting the copy:


>>> copy all the tablespace datafiles


==> Do this for all the tablespaces

3. Set the oracle environment

export ORACLE_SID=
sqlplus “sys as sysdba”

– Check the init.ora parameters that reference location
control_files =
background_dump_dest =
core_dump_dest =
user_dump_dest =
log_archive_dest_1 =

4. Set up a password file for the duplicated database

orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=

5. Startup the database in mount status

SQL> startup mount
SQL> Rename any of the datafiles to the new location, if necessary:


SQL> Rename the logfiles to the new location if necessary

alter database rename file
” to ”;

6. Check that all the datafiles are in the right location:

select file#, name from v$datafile;

7. Perform incomplete recovery:

SQL> recover database using backup controlfile until cancel;

Forward the database applying archived redo log files until you decide to stop recovery by typing cancel at the prompt (assuming that you have required archived redo log files in the log_archive_dest directory). You may archive the source database redo log files and apply them at the target database if required.

SQL> alter database open resetlogs;

Please provide your comments.
Nice reading!


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: