Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Database cloning
lofftjm_at_itec.suny.edu wrote:
>Can anyone supply me with, or point me to a location that has information
>about cloning Oracle databases? The Oracle manuals do not have it listed
>as a topic in the index and I was only able to come up with limited
>information from Oracle's Metalink.
>
>Any help would be greatly appreciated.
>
>Joseph Lofft
>lofftjm_at_itec.suny.edu
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Here's is one method I use to clone databases... you could also
create a database from scratch and do an import of the full database
export from the existing DB..
Here it is..
1.) From your source database issue the command 'alter database backup
controlfile to trace' , this will create a .trc file which you will
modify and rename to a .sql file. You will use this file for two
things: first, to create a copy script to copy all the files listed in
it to a new location where you would like them to be for your second
instance. Secondly, you will then use it to create your control file
for your second instance.. remove any comments, modify the locations
of all the files and change the following
<create control file reuse database "dbname" noresetlogs> to
<create control file set database "newdbname" resetlogs>.
and make sure the last line reads alter database open resetlogs
3.) shutdown the source database
2.) set ORACLE_SID to the new value for your second instance.
3.) create new initsid.ora and configsid.ora files for your second instance(I copy them from the other instance), modify them to reflect the new sid and file locations of the second instance.
4.) run the script that will copy all your data files
5.) svrmgrl
6.) run your create control file .sql file and BE SURE all references to files are actually pointing the NEW locations and not those belonging to the other instance.
Don't forget to have complete backups before doing all this and you will have to add this instance to any sqlnet related .ora files,oratab etc.......
Good Luck
Robert Prendin
Email if you have any questions....
YATFG
#**************************************************** # RP Data Solutions Inc. # Specializing in ORACLE DBA Support Services # We offer 24HR remote DBA support!!! #****************************************************Received on Fri Aug 21 1998 - 19:50:41 CDT
![]() |
![]() |