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 with constraints

Re: Moving tables with constraints

From: Tom Best <oracle_person_at_yahoo.com>
Date: Wed, 24 Jul 2002 13:44:24 -0400
Message-ID: <ahml98$h5c$1@news.bentley.com>


This has a lot of discussion and examples of moving tables to other tablespaces:

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:478123480 53

HTH.
Tom Best

"Kip Gray" <jgray_at_learningframework.com> wrote in message news:3D3EDD16.5070101_at_learningframework.com...
> What is the best way to move a table to a different tablespace,
> including all of its constraints? Without constraints, I could do this:
>
> 1. Create tmp table in new t/s as select * from orig table
> 2. Drop orig table
> 3. Rename tmp table to orig table
>
> However, step 2 fails if FK constraints reference orig table. I can drop
> using cascade constraints, but then step 3 won't go back and relink all
> the FKs in the child tables (obviously).
>
> So, what steps do I follow to move a constrained table to a different
> tablespace? BTW, what I'm trying to do is move tables out of dictionary
> managed t/s to locally managed t/s.
>
> Thanks in advance,
> Kip
>
Received on Wed Jul 24 2002 - 12:44:24 CDT

Original text of this message

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