Subject FK violation in FB 1.5
Author Bob Murdoch
I'm having trouble doing a complete backup/restore cycle using FB 1.5.
The restore fails with the following error:



cannot commit index FK_TRUCK_TO_CARRIER

gbak: ERROR: violation of FOREIGN KEY constraint "PK_CARRIER" on table
"CARRIER"

gbak: ERROR: action cancelled by trigger (3) to preserve data
integrity

gbak: ERROR: Cannot deactivate primary index

gbak: Exiting before completion due to errors



This would indicate that I somehow have an invalid value in the column
TRUCK.CARRIER_ID that does not match a value in CARRIER.CARRIER_ID. I
have dropped the FK, closed all connections, and then recreated it. I
would expect to see the same error during creation of the FK as I do
during the restore, but it works successfully. However, I still
receive the same error when trying to backup/restore immediately
afterward.



What else can I check? If I drop the FK altogether, the backup and
restore works successfully.



tia,



Bob M..



[Non-text portions of this message have been removed]