Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Moving tables and constraints
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