Professional Documents
Culture Documents
s
■ If your database is not in ARCHIVE LOG mode, take an off-line database backup. If in
ARCHIVELOG MODE, you can either take an on-line or off-line database backup.
iri
■ On your production database, start SQL*Plus and connect to "SYS AS SYSDBA" (internal) and do a:
w
SQL> alter database backup controlfile to trace;
■ Edit the controlfile trace (in $ORACLE_BASE/admin/$ORACLE_SID>/udump) and remove the lines
Sa
until you get to the 'CREATE CONTROLFILE ..' statement. Edit this statement to read:
■ Move this script to the new machine. Edit this script to update the directories for the datafiles and redo
log files. Also, comment out the lines for "RECOVER ..." and "ALTER DATABASE OPEN ..."
ep
■ Restore/ or copy the backup and the archived logs (if any) to the new machine.
■ Copy your INIT.ORA file to the new machine. Ensure your controlfile and archive destinations in your
SPFILE/ ini$ORACLE_SID.ora are properly set on the new machine.
s
■ Start sqlplus, connect SYS AS SYSDBA (internal) and run the create controlfile script.
You'll be prompted to supply an archived log file, Restore that file to the archive log destination (if not
already there) and continue. Repeat for all archived files till you get to the last one. At that point specify
'CANCEL'.
http://www.orafaq.com/wiki/Clone_database_from_one_machine_to_another 31/01/2011
PDF created with pdfFactory Pro trial version www.pdffactory.com
Clone database from one machine to another - Oracle FAQ Page 2 of 2
■ Change the global name of the new database to avoid problems with networked applicationa and
replication:
s
.:: Wiki Home :: Blogger Home :: Forum Home :: Contact :: Privacy ::.
iri
w
Sa
h
s ep
Jo
http://www.orafaq.com/wiki/Clone_database_from_one_machine_to_another 31/01/2011
PDF created with pdfFactory Pro trial version www.pdffactory.com