Does anyone know (How Informix choose a constraint name)?
Posted in 1996
Topics: Server Administration
Hi all,
One of our database has a table aaa, and if we run the following in dbaccess:
drop table aaa;
create table aaa
( col1 char(2) not null,
col2 char(25),
col3 char(1),
unique (col1));
we get the 625 error( Constraint name u303_172 already exists.) Somehow Informix
wants to use "u303_172" as the constraint name, but "u303_172" already belongs
to table bbb. We know if we specify a constraint name in our script then we
will not have this problem, in fact if we run the exact same script the second
time, it works too, Informix creates a constraint "u304_173", Both table aaa
and bbb are owned by Informix.
So now we have these questions: how does Informix choose a constraint name if we
don't specify one? Why can't it figure out the name it wants has already been
used and why it works the second time? Or is there something wrong with our
database (it sure does not look like, we have done all kinds of tbcheck we can
think of, but anything is possible) and if so, what do we need to do to fix it?
I searched through the Informix bug list and did not find anything similar.
Has anyone else seen this before? Or does anyone have any idea? (We are using
OnLine 5.02UC3 on SCO.)
Thanks in advance
Zhenling Sun
zsun@bx00dbss.med.osd.mil