Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy an instance to another instance?

Status
Not open for further replies.

jballum

MIS
Jul 10, 2000
161
CA
What is the easiest way to copy an instance running on a machine to another new instance that will be running on the same machine?

Would exporting the old instance (full export) then importing this into the new instance be the easiest?

Or could I stop the services of both instances and then copy the datafiles of the old instance to the locations of the new instance? This is under the assumption that all names are the same and just file locations are different.

Thanks for your help.

JB
 
Hi

The fastest is to use transport tablespace option in Exp and Imp. You only copy the datafiles belonging to the tablespace.

But you can only do this if you got "clean" tablespaces and not mixed or split dependencies – but Exp warns you.

In Oracle 9i Oracle discover mixed and split tablespaces and export also these dependencies.


Do like this:

1. Make tablespace read-only
a. Alter tablespace data_ts read only

2. Export metadata from source
a. Exp file=EUROaol.dmp transport_tablespace=y tablespaces=data_ts triggers=n constraints=n

3. Copy datafiles to target system

4. Transfer export file
a. It is the EUROaol.dmp file

5. Import metadata into target
a. Imp file=EUROaol.dmp transport_tablespace=y datafiles=(/disk1/data_ts01.dbf,/disk2/data_ts02.dbf)

6. Make tablespace in target read-write and on source
a. Alter tablespace data_ts read write


Notes that you have to give the whole directory path for datafiles because Oracle save the information in the control files.

You can’t do it faster with other methods.
Regards
Allan
Icq: 346225948
! If you can't prove it - don't bother try to teach me !
 
You may be using Oracle 8.0 in which case AOLEURO's method will not work.

I assume as you talk about 'services' you are using NT, so I think you have three choices

1. Export / Import - will be slow and involved

2. Shutdown and copy the datafiles, rename the instance and recreate the controlfile and services - probably quit fast

3. Hot backup to disk the live instance, rename the instance and recreate the controlfile, recover - probably quit fast

Only you know which is easiest :)

I only work with UNIX but I use 3 all the time I do this kind of operation

Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top