![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi ! We are using version 11.50.FC6W2 on HP-UX 11.31 I have on several occasions run into a problem when adding foreign keys, the problem is the following. I have a table A with a primary key. I now add a table B that has a foreign key constraint to the primary key on table A. Problem 1. If it is not possible to lock table A in exclusive mode I can't add the foreign key. Why is there a need for an exclusive lock on table A in this situation ? Problem 2. If I succed to add the foreign key I get -710 errors when trying to update table A.Why the -710 error on table A ? The solution I have found is to do an update statistics on table A. Is there other ways around the problem ? The behavior might have changed in later versions. TIA Ulf _______________________________________________ Informix-list mailing list Informix-list (AT) iiug (DOT) org http://www.iiug.org/mailman/listinfo/informix-list |
#3
| |||
| |||
|
|
Ulf Any change of the table structure requires an exclusive lock and adding a constraint (such as a foreign key) is such a change. -710 simply indicates the structrue of the table has changed. by adding a foreign key !!, since the last time that process accessed the table. If you had restarted the process, so that it connected to the new 'version' of the table , you would not have seen the error. Also it should not appear on any new connections. Keith On 2 August 2011 07:56, Ulf<ulf.akerberg (AT) gmail (DOT) com> wrote: Hi ! We are using version 11.50.FC6W2 on HP-UX 11.31 I have on several occasions run into a problem when adding foreign keys, the problem is the following. I have a table A with a primary key. I now add a table B that has a foreign key constraint to the primary key on table A. Problem 1. If it is not possible to lock table A in exclusive mode I can't add the foreign key. Why is there a need for an exclusive lock on table A in this situation ? Problem 2. If I succed to add the foreign key I get -710 errors when trying to update table A.Why the -710 error on table A ? The solution I have found is to do an update statistics on table A. Is there other ways around the problem ? The behavior might have changed in later versions. TIA Ulf _______________________________________________ Informix-list mailing list Informix-list (AT) iiug (DOT) org http://www.iiug.org/mailman/listinfo/informix-list _______________________________________________ Informix-list mailing list Informix-list (AT) iiug (DOT) org http://www.iiug.org/mailman/listinfo/informix-list |
#4
| |||
| |||
|
|
Hi ! We are using version 11.50.FC6W2 on HP-UX 11.31 I have on several occasions run into a problem when adding foreign keys, the problem is the following. I have a table A with a primary key. I now add a table B that has a foreign key constraint to the primary key on table A. Problem 1. If it is not possible to lock table A in exclusive mode I can't add the foreign key. Why is there a need for an exclusive lock on table A in this situation ? |
|
Problem 2. If I succed to add the foreign key I get -710 errors when trying to update table A.Why the -710 error on table A ? The solution I have found is to do an update statistics on table A. Is there other ways around the problem ? |
| The behavior might have changed in later versions. TIA Ulf _______________________________________________ Informix-list mailing list Informix-list (AT) iiug (DOT) org http://www.iiug.org/mailman/listinfo/informix-list |
![]() |
| Thread Tools | |
| Display Modes | |
| |