Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Moving tables and constraints

Re: Moving tables and constraints

From: Greg Kainz <gkainz_at_orapro.com>
Date: 1997/12/30
Message-ID: <34A9875F.583EBB58@orapro.com>#1/1

CAUTION: This response is sent prior to any intelligent analysis process started on my end.... take if for what it's worth....

Try
create table table_temp as select * from table_old; drop table table_old;
rename table_temp to table_old;

Michael Wilson wrote:

> We have a number of tables which we're moving from regular disk to
> RAID, and
> are resizing the tablespaces at the same time. Some of these tables
> are
> referenced by forign key constrains in many other tables. Here's what
> we end
> up doing:
>
> 1. Export the table.
> 2. Rename the old table.
> 3. Drop ALL the foriegn constraints, and constraints on the origional
> table
> (since they can't be renamed, that we can tell).
> 4. Define the new table in the "right" tablespaces.
> 5. Import.
> 6. Recreate all the foriegn key constraints.
>
> The problem is, we're running into tables with scores of foriegn key
> constraints, and this is becoming quite tedious (since the system has
> to be
> down while we do this).
>
> Is there a better way?
>
> Thanks!
Received on Tue Dec 30 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US