Subject Re: error in restore
Author Svein Erling
Sounds like you've somehow managed to get NULL into the ID field. Find the record in your table (e.g. by doing SELECT * FROM <MyTable> WHERE ID+0 IS NULL) and change ID to a unique value (NULL may be unique, but it is not a value). Then try backup and restore again. I think you need to use ID+0 since I doubt the record will be found if the RDB$PRIMARY16 index is part of the plan.

I have to admit that I've little or no experience with Firebird errors and do not know what precautions you have to take before trying what I suggested above. I guess I would make sure no-one was connected to the database, make a file copy and then use my suggestion on the copy rather than the original. I don't think the error is all too dangerous, but it is better to be safe than sorry.

HTH,
Set

--- In firebird-support@yahoogroups.com, "Sergio H. Gonzalez" wrote:
> Hello, I'm having this error when I restore a database. What I don't undestand
> is that the database is working fine. So why would I have such an error when I
> backup and restore it? Does it means that the databse is corrupted? Thank you
> very much in advance!!!
>
>
> gbak:cannot commit index RDB$PRIMARY16
> gbak: ERROR:validation error for column ID, value "*** null ***"
> gbak: ERROR:action cancelled by trigger (3) to preserve data integrity
> gbak: ERROR: Cannot deactivate index used by a PRIMARY/UNIQUE constraint
> gbak:Exiting before completion due to errors