Professional Documents
Culture Documents
Cloning and Refreshing An Oracle Database: What Is A Database Clone?
Cloning and Refreshing An Oracle Database: What Is A Database Clone?
I have been asked many times about the Cloning and Refresh process of Oracle Database by emails of blog
readers and the users of the Oracle Technology Network (OTN) Forums.
Even though the information about Cloning and Refreshing a Database process available over web widely or
has already been discussed. Here, in this post, I would like to explain and provide the information on the
following Questions about Cloning and Refreshing of a Database with my simple terms.
* A Database Refresh is also referred to as a database clone. However, we dont clone Oracle Home rather we
clone the Database as refresh.
* Refreshing a database is something like applying the changes or updates of production database to the
database where the database is already cloned. i.e. lets say you have cloned a database a month back, and
now you are asked for doing refresh of a database, then you will perform the backup of database and
prepare the clone the instance again on test server. This is nothing but refreshing.
* Refreshing of a particular table, group of tables, schema, or tablespace will be done using traditional
export/import, transportable Tablespaces, or data pump methods.
* When an Oracle patch is applied on Production System, or in doubt, you have to prepare and clone the
database again with the copy of Oracle Home (Directories and Binaries) Backup and Database (Database
related files) Backup to prepare the instance.
* The difference between Cloning and Refreshing is that cloning process includes Oracle Home and
database Clone; where as Refreshing process only includes database clone.
* If seen, the words, Clone and Refresh are used interchangeably for the sake of convenient.
* A Cloned patch instance is used for patching to know the impact and the time required to apply the same
on Production.
This is an easy and simple method to perform a clone of a database. This method requires your production
database (PROD) needs to be shutdown gracefully, and take the backup of the database related files i.e.
Data files, Control files, Redo Log files, using Operating System commands i.e. cp or copy. This is not
possible where your PROD database is running 24/7 and should be available continuously for users.
For syntax and the series of steps to perform the clone using cold backup, refer the following URLs from the
reference.
References:
http://www.samoratech.com/TopicOfInterest/swCloneDB.htm
http://www.pgts.com.au/pgtsj/pgtsj0211b.html
http://www.jlcomp.demon.co.uk/faq/clone_db.html
Using Hot (Online) Backup:
In this method, backup of the database will be done online i.e. without shutting down the database.
For this, your Production Database is must be in Archive log mode. For syntax and the series of steps to
perform the clone using hot backup, refer the following URLs from the reference.
Reference:
http://www.quest-pipelines.com/newsletter/cloning.htm
http://www.oralnx.com/index.php/2007/03/22/cloning-an-oracle-database/
http://www.shutdownabort.com/quickguides/clone_hot.php
Cloning can also be performed using RMAN Backups and RMAN commands and its also an easy method to
perform so. The RMAN DUPLICATE command is used to perform the clone. Until Oracle 9i, to clone the
database, it is required to be the Source and Target systems should have the same OS i.e. it is not possible to
clone across the platform. But as workaround, using export/import can be cloning the database across the
platforms. But starting from Oracle 10g the RMAN capabilities have improved immensely. Cross platform
cloning/duplicating a database can be done using RMAN CONVERT commands.
For syntax and the series of steps to perform the clone using RMAN Commands, refer the following URLs from
the reference.
References:
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb.htm#i1008564
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/dbxptrn002.htm#CHDCFFDI
http://sabdarsyed.blogspot.com/2007/06/clone-of-database-on-same-host-ie.html
http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb005.htm
* It is *NOT* mandatory to have the cloned instance in Archive log mode. Because unnecessarily archive log
files are generated, which consume the hard disk space? If at all, the cloned instance crashed and need to be
recovered, it can easily be again cloned from the production.
* After the clone, change the system users passwords i.e. SYS & SYSTEM, and for any critical users passwords.
* Disable the jobs which are not required to be run in the cloned instance.
* Change any application users tables from the cloned database which are still referring the Production
Database i.e. Server IP, Port Details, Printer Details etc,
Metalink Notes:
Hope that this post helps you in understanding the Cloning and Refreshing activity of a database.