Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: NEWBIE: copying a schema from one instance to another
HAP,
There is a *much* faster way - if you've planned for it. Simplest is
on different boxes. Take a cold backup of your source. Recover the
backup to your target - with all files in *exactly* the same location.
You now have a copy database with same database name.
If you want to change database name and location of files (which you'll have to do if you only have a single machine), you can do this but you will need to backup the control files to trace, rename the database (and control files, if you want to) and recover the new control file. You will also need to startup nomount (I think, of hand) and "rename" the files, if you need them in different locations - or even change the name. If you always do this in a consistent manner, you can write a script to manage most of it.
Len
On Sat, 11 Jul 1998 01:58:32 -0400, HAP <shield_at_mindspring.com> wrote:
>Hi, there out in Oracle land. It's 1:45AM and I am a slave to an inport
>that I am running now. It has been running since 7:30PM from the prior
>day.
>
>I have been analyzing what I have done and I would like some advice. I
>am copying the tables in our production schema to our test schema as a
>massive update. The production schema is in a separate instance from the
>test schema.
>
>Here's what I propose to do next time I have to do this (BTW the
>structure of both schemas is the same):
>
>1. Export source tables
>2. Export target schema
>3. Disable constraints on target
>4. Remove data from target.
>5. Import source tables into target (with ignore create error)
>6. Enable contraints on target
>
>What do you think? Is it overkill to use exp and imp? Is there a
>better/faster way to do this?
>
>PS. This kind of think doesn't happen often. If it did, I would be
>exploring the replication options.
>
>Many thanks in advance!
>
>HAP
>
>
Received on Sat Jul 11 1998 - 08:42:35 CDT
![]() |
![]() |