Naming Indexes on IDS 7.31 ...
Posted in 2000
Topics: Triggers, Constraints & Referential Integrity, Versions, Editions & End-of-Life
Hi all ! I have to solve a 'great' problem with Informix Dynamic Server 7.31 TC2 on NT4 SP5 concerning system indexes naming : we design a database for a client who wants to apply explicits naming convention on indexes. Off course we do so on specific indexes we create on particular columns. But I did not found in Informix SQL documentation the mean to specify names of system indexes (indexes on primary or foreign keys) when creating these constraints... I tried to create all indexes but the script failed when it was run because system indexes where still existing ! Informix seems always to generate system indexes !! Could you tell me if it is possible to change this behaviour ? Or have you any solution to rename system indexes (please dont' tell me to drop and create all of these indexes...) Thanks a lot for your answers. Arnaud -- - ------------------------------------------------------------------ - - Arnaud ANDRIEUX arnaud.andrieux@aql.fr - - Ingenieur en developpement tel direct : 02.99.12.52.22 - - Direction Metier Industrie - - ------------------------------------------------------------------ - - ALLIANCE QUALITE LOGICIEL http://www.aql.fr - - Rue de la Chataigneraie - - B.P. 127 - - 35513 CESSON SEVIGNE - - FRANCE - - tel : (33) (0)2.99.12.50.00 - - fax : (33) (0)2.99.63.70.40 - - ------------------------------------------------------------------ -
Arnaud ANDRIEUX wrote:
>
> Hi all !
>
> I have to solve a 'great' problem with Informix Dynamic Server 7.31 TC2
> on NT4 SP5 concerning system indexes naming : we design a database for a
> client who wants to apply explicits naming convention on indexes. Off
> course we do so on specific indexes we create on particular columns. But
> I did not found in Informix SQL documentation the mean to specify names
> of system indexes (indexes on primary or foreign keys) when creating
> these constraints...
>
> I tried to create all indexes but the script failed when it was run
> because system indexes where still existing ! Informix seems always to
> generate system indexes !! Could you tell me if it is possible to change
> this behaviour ? Or have you any solution to rename system indexes
> (please dont' tell me to drop and create all of these indexes...)
>
> Thanks a lot for your answers.
Just create the indexes that the constraints need BEFORE adding the
constraints. When you ALTER the table and add the constraints they will
use your explicitely named indexes instead of creating their own indexes.
This is what my dbschema replacement utility, myschema, does for you. It
prints out the schema with ALL indexes created with explicit names. If you
have a specific naming convention you can then edit the output to change
the names that myschema generates to replace the unusable index names that
the schemas create with your own convention. Myschema is available from
the IIUG Software Repository in the package utils2_ak.
Art S. Kagel