Create Clone Oracle
Create Clone Oracle
Cloning a Database
Cloning a database means creating an identical copy of a database, either on the same
machine as the original, or on a different one. Additonally, it means changing the
database name, and the Instance name. But those are both optional steps if the clone is
being created on a different machine. Even when it's all happening on the one machine,
the only requirement is to change the Instance name -changing the database name remains
entirely optional.
What follows is therefore a set of instructions that takes things one step at a time: first,
the clone. Second the renaming of the Instance. Third (if you really want to) is the
renaming of the Database. You can do it all in one go. But, if different machines are
involved, there's strictly no requirement for steps 2 and 3 -so I've kept them separate.
It goes without saying (I hope) that if you are cloning onto a new machine, the Oracle
executables and environment variables (like ORACLE_BASE and ORACLE_HOME) need to be
in place before you even start.
issue the 'create controlfile' commands. At the end of the exercise, your database
should be left in the fully open state, with all the required controlfiles in place.
At this point, you make sure everything is working perfectly. Once you know it is, it is time
to consider re-naming the Instance and the Database
Note that on NT you'd have to use ORADIM (or, for versions before 8i, ORADIM80 or
ORADIM73) to create a Service for the new Instance name before you can start it up (you
still need to change the ORACLE_SID as well). On Unix, the change of ORACLE_SID is
sufficient in itself.
Also note that I'm assuming here that you're using Operating System authentication for
the Privileged User. If you've got a Password File instead, you'll need to copy the
Password File from the primary database into the standard default location, and change
its name to be ORAPW<SID>, otherwise you'll never get authenticated properly.
name, and Y is the new one. And yes, you're going to have to do a Resetlogs
after this procedure.
o Finally, change the line ALTER DATABASE OPEN to ALTER DATABASE OPEN
RESETLOGS.
• Edit the clone init.ora and change the db_name parameter to match the new
database name
• Start SQL Plus or Server Manager and run the Control File trace script (by typing
@NAME_OF_SCRIPT). As before, the database should eventually be left in the fully
open state. Do a SELECT * FROM V$DATABASE to check that the database name really
has changed.
• If you care about your clone, you should now perform a clean shutdown and backup,
because the resetlogs that was issued will have rendered all prior backups and
archives of the primary system completely useless as a way of recovering the clone.
Note that where these instructions refer to 'starting SQL Plus or Server Manager', they are
assuming at least an Oracle 8i database. In all versions prior to that, Server Manager was
the only tool able to perform startups and shutdowns.