I'm still loosing the Foreign Keys, what's wrong?
Posted in 1996
Topics: Server Administration, Triggers, Constraints & Referential Integrity
Hello InformiXperts:
Several days ago, I wrote about this, without get something practical way to
avoid it.
The situation is:
-----------------
I'm using INFORMIX-SE 7.10.UC1 on SCO UNIX 3.2.4; I'm creating my tables
using dbaccess utility and altering using "alter table" to add constraints.
As a normal development practice, in any moment I executed a dbschema for
any table and doesn't print the foreign keys; then I get info about the
table using dbaccess and see all the indexes created for those constraints,
but the constraints definitions went way!
I can't re-create the constraints because the indexes still in the database,
neither drop these indexes using "drop index" in order to recreate the
constraints, since Informix create them with special names.
I try, with a test database obviously, to drop these indexes using "delete
from sysindexes", but this made the database unusable!
What is the only way available? I'have to re-create the table, loosing all
the references from the other tables!!
Another way that I haven't tried is to redefine the constraints, inserting
the appropiate information in SYSCONSTRAINTS and SYSREFERENCES catalogs. Do
you think that it would be a good way to solve, by this time, the problem?
Somebody told me, that a thing he does is to create all the indexes first,
and then create the foreign keys. In this way, informix uses the indexes
already available instead to create new ones making possible to manage them.
But it looks too hard and time consuming to me. Is there any way to assign
the index name for a constraint definition?
Anybody knows the reason/cause of this BIG problem?
Thanks in Advance,
//////
+---------------------------ooo-O-O-ooo--------------------------------+
| U |
| Melvin Perez Cedano Santo Domingo, Dom. Rep.|
| Vice-President m.mejia@codetel.net.do |
| Systems Development Phone (809) 686-5574 |
| CAM Informatica, S. A. Fax (809) 686-5467 |
+----------------------------------------------------------------------+
| ALL RIGHTS RESERVED |
| This posting is copyright and may be used only for the purposes |
| of professional study or the professional exchange of information. |
| Use of this posting by any commercial organisation for the |
| purposes of vilifying another is explicitly prohibited. |
+----------------------------------------------------------------------+