Mr.Benson, No, the constraint wasn´t change. As I explain to mr.Jesus Garcia, we take the DB having the data and the constraint in the needed conditions, we made a backup and then the restore. This mean = all the conditions were assured that the DB were in "good conditions" and, during the backup/restore process, the data at this column was "lost". Thank you, i.c.u.2 ! Roberto Camargo
________________________________ From: Alexandre Benson Smith <ibl...@thorsoftware.com.br> To: firebird-support@yahoogroups.com Sent: Tuesday, June 25, 2013 4:33 PM Subject: Re: [firebird-support] GBak Backup & Restore Problem Em 25/6/2013 16:23, Tupy... nambá escreveu: > > Dear Friends, > > We have a strange problem with GBak. We make a backup with gbak and then a > restore, also with the same. > > We have a table with 60 rows where a not null type SmallInt column has 0 > (zero) as content. > > When restoring, GBak returns null for this column. As this column is not > null, we get an error message (Error: Validation error for column .....). > > Between these two steps (backup and restore), no further action is done with > the backup file. > > I ask you = What can cause this problem? Is there any solution for this? Any > idea about this problem? > > Thanks a lot, > Roberto Camargo, > Rio de Janeiro / Brasil > > Did the null/not null constraint was applied after the table has some rows ? IIRC there is something regarding NULL stored and the column be changed to NOT NULL with a DEFAULT, and so FB will return the DEFAULT value to NOT NULL columns that in fact is NULL. I suggest you to do: update MyTable set MyColumn = 0 where MyColumn is null or MyColumn = 0; commit; and then perform a new back-up/restore cycle. see you ! ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org/and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links [Non-text portions of this message have been removed]