| Author's name: Connor McDonald Author's Email: connor_mcdonald@yahoo.com |
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 ? | |
(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:
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
CREATE CONTROLFILE REUSE DATABASE "SOURCEDB" NORESETLOGS ARCHIVELOG ... LOGFILE GROUP 1 '/disk1/log1.dbf' SIZE 50M, ... DATAFILE '/disk2/system01.dbf', '/disk3/rbs01.dbf', ... '/diskN/last_file01.dbf' CHARACTER SET WE8ISO8859P1;
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)