Re: Moving a table
Posted in 2008
Alas Detach drops indices as well as column level constraints and defaults.
I'm not clear on what you're trying to accomplish yet. Are you trying to c=
reate a fragmented table based on a previous schema or move data from a non=
-fragmented table to a new fragmented table - and (or) also migrate the dat=
a from previous dbspaces to new dbspaces?
j.
>From: MIKE MAGIE <jmmagie@yahoo.com>
>Date: 2008/05/07 Wed PM 03:06:12 CDT
>To: ids@iiug.org
>Subject: Moving a table [12020]
>Dudes and Dudettes,=20
>
>10.00.UC8=20
>Solaris 2.8=20
>6-1, 180=20
>11/17/1967=20
>Scorpio=20
>
>I have been messing with alter frag, attach detach init, etc. all day. Som=
eone=20
>clue me in on the secret ALTER TABLE statement that lets me move a=20
>non-fragmented table with indexes created IN TABLE to a new dbspace. I am =
at=20
>this point settling on the following sequence of events which leaves my ne=
wly=20
>moved table index-less:=20
>
>alter fragment on table <TABLE> INIT=20
>fragment by expression=20>reins_yr_id =3D =C2=932005=C2=94 in <DBSPACE_1>,=20
>reins_yr_id !=3D =C2=932005=C2=94 in <DBSPACE_2>;=20
>
>Simple and keeps rows out of my new fragment - which I dig.=20
>
>Then I :=20
>
>alter fragment on table <TABLE> detach <DBSPACE_2> <NEW_TABLE>;=20>
>Now I have my new, empty, non-fragged table in the dbspace I want. I next =
drop=20
>the original table and rename the new one to the old ones name.=20
>
>But I have no indexes - as is freaking documented.=20
>
>Help -=20
>
>Mike=20
>
>
>**************************************************************************=
*****=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20