Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Alter table ... index in tablespace

517 views
Skip to first unread message

danfan

unread,
Aug 18, 2009, 4:54:06 AM8/18/09
to
Hi! (DB2 LUW 9.5)

When you create a table you can specify create table ... index in
<tablespace> ....
Once the table is created this can not be changed or added?
The only solution I can see is to drop and recreate the table.
Is this correct, or is there a way ?

/dg

Ian

unread,
Aug 18, 2009, 2:24:23 PM8/18/09
to

That is correct. Once a table has been assigned to a tablespace
(whether the data portion of the table, index portion, or lob
portion) this is "set in stone".


Serge Rielau

unread,
Aug 18, 2009, 3:20:14 PM8/18/09
to
Actually, there is a trick you can use a range partitioned table - with
one partition :-)
Range partitioned tables to allow random placement of indexes.

--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab

Ian

unread,
Aug 19, 2009, 3:43:50 AM8/19/09
to

Yes, but that requires that the table is created with range
partitioning enabled. You can't alter a non-range-partitioned
table to enable range partitioning.

So you're back to drop/create the table.

Arun Srinivasan

unread,
Aug 19, 2009, 4:40:51 AM8/19/09
to

Come 9.7, online table move with awesome options are supported in db2.

danfan

unread,
Aug 19, 2009, 9:41:53 AM8/19/09
to
Maybe it is a good idea to wait then. 9.7 is not far away, but must upgrade my Redhat RHEL4 to RHEL5 first.

/dg

Mark A

unread,
Aug 19, 2009, 2:30:56 PM8/19/09
to
"danfan" <danf...@hotmail.com> wrote in message
news:1250689312.11230.2.camel@ubuntu...

> Maybe it is a good idea to wait then. 9.7 is not far away, but must
> upgrade my Redhat RHEL4 to RHEL5 first.
>
> /dg

9.7 is available now if you want it. Will require a new license file from
Passport Advantage (like 9.5 when upgrading from 9.1).


0 new messages