The Oracle (tm) Users' Co-Operative FAQ

How do I clone a database from one machine to another - when the filesystems are different ?

Author's name: Connor McDonald

Author's Email:

Date written: 28 November 2002

Oracle version(s): 7+

How do I clone a database from one machine to another - when the filesystems are different ?

Back to index of questions

(I'm assuming you're using a hot backup of the source database to do your clone - after all, no-one should be using cold backups!)

Cloning a database is normally done with the following sequence:

  1. Copy the datafiles to the target node
  2. Produce a CREATE CONTROLFILE command for the cloned database
  3. Start the target database in NOMOUNT mode
  4. Run the create controlfile command created in (2)
  5. Issue "recover database using backup controlfile until cancel"
  6. Provide the recovery processe with archived redo logs until you are happy
  7. Cancel the recovery and issue "alter database open resetlogs"
  8. Re-create or re-add any TEMPFILES used for temporary tablespaces

This is all quite straightforward even if you have to rename the database, and any of the files in the database. The secret is in step (2). On the source database, you can run

SQL> alter database backup controlfile to trace

at which point you will get a full "create controlfile" command dumped out to the user_dump_dest directory. It will look something like

  GROUP 1 '/disk1/log1.dbf'  SIZE 50M,

For cloning this database, you will alter

For each file listed under the DATAFILE clause, if you will be renaming the file as part of the cloning process, then you simply update the file name to the new name in the CREATE CONTROLFILE command.

Further reading: You can also clone a database using the RMAN duplicate command (see the RMAN documentation for instructions)

Back to top

Back to index of questions