Attempting to ALTER INDEX TO CLUSTER on Primary Key
Posted in 1999
So what's wrong?
I'm attempting to use ALTER INDEX TO CLUSTER to reorganize a table.
The table definition includes a PRIMARY KEY and two other indexes but
the primary key would appear to be the best candidate for the ALTER.
The table definition looks like:
create table client_dob
(
client_rsn INTEGER not null,
client_dob_rsn INTEGER not null,
dob DATE not null,
validated SMALLINT default 0 ,
active_cd CHAR(1)
check (active_cd is null or (active_cd in ("I","A")))
constraint CKC_ACTIVE_C_992,
add_date DATETIME YEAR TO SECOND ,
add_userid INTEGER ,
mod_date DATETIME YEAR TO SECOND ,
mod_userid INTEGER ,
primary key (client_dob_rsn) constraint pk_107
)
extent size 16next size 16
lock mode row
;
When I check the SYSINDEXES table I see an index name of 280_1305 with
what appears to be a space in front of the '280'.
I have yet to determine how to use this index name in the alter
statement. All the attempts listed below fail:
ALTER INDEX 280_1305 TO CLUSTERALTER INDEX ' 280_1305' TO CLUSTER
ALTER INDEX " 280_1305" TO CLUSTER