Problem with Alter Index
Posted in 2000
Topics: Storage & Space Management
Hi All,
I basically want to delete unwanted chunks from the Informix database (
sysmaster table )
I'm trying to use Alter Index to do this.
I'm facing a small problem here.
Alter Index works fine if the index names start with a alphabet (ex:
arc_req)
But, if the index names start with a letter ( say 155_8 ) then it says" Syntax error".
Can anyone help me out in this ?
TIA
Those indexes that seem to start with a digit actually start with a
space followed by a digit and are esentially illegal index names
which are automatically created when you add a constraint to a table
that does not find a compatible index already existing. The
constraint creates a 'hidden' index with one of these invalid names
for you.
Solution? You can get my dbschema replacement utility, myschema,
from the package utils2_ak in the IIUG Software Repository. One of
the many features myschema provides beyond supporting ALL dbschema
features, except -hd, is that it will automatically generate LEGAL
index definitions for these hidden indexes and THEN add the
constraints so that you can do the kind of reorganization you want to
do. Just get, compile, and run myschema (it can write the create
index statements and constraints to a separate file BTW) to get an
updated schema with the new indexes and ALTER TABLE statements needed
to add the constraints back, then drop the constraints, add back the
indexes and constraints using the commands myschema output.
Art S. Kagel
diwesh sahai wrote:
>
> Hi All,
> I basically want to delete unwanted chunks from the Informix database (
> sysmaster table )
> I'm trying to use Alter Index to do this.
>
> I'm facing a small problem here.
> Alter Index works fine if the index names start with a alphabet (ex:
> arc_req)
> But, if the index names start with a letter ( say 155_8 ) then it says> " Syntax error".
>
> Can anyone help me out in this ?
>
> TIA