Subject | Re: DB Restore error - arithmetic exception |
---|---|
Author | tickerboo2002 |
Post date | 2008-09-29T11:29:11Z |
Hello Milan
Thanks for your reply. It's entirely likely that I did change a
column from NULL to NOT NULL using Database Workbench, but I've now
had the client send me their database and all columns that are marked
as NOT NULL contain a valid value. There are no NOT NULL columns
which are NULL.
This is for my TELEPHONE_SYSTEM_ALLOCATION table, but that does not
contain a FORM_ID column. From the errors I listed previously, is it
certain that the errors are for the TELEPHONE_SYSTEM_ALLOCATION table,
or could it be the table following that?
I now have a copy of their database and performing a back-up and
restore reproduces the error.
Thanks
David
--- In firebird-support@yahoogroups.com, Milan Babuskov <milanb@...>
wrote:
Thanks for your reply. It's entirely likely that I did change a
column from NULL to NOT NULL using Database Workbench, but I've now
had the client send me their database and all columns that are marked
as NOT NULL contain a valid value. There are no NOT NULL columns
which are NULL.
This is for my TELEPHONE_SYSTEM_ALLOCATION table, but that does not
contain a FORM_ID column. From the errors I listed previously, is it
certain that the errors are for the TELEPHONE_SYSTEM_ALLOCATION table,
or could it be the table following that?
I now have a copy of their database and performing a back-up and
restore reproduces the error.
Thanks
David
--- In firebird-support@yahoogroups.com, Milan Babuskov <milanb@...>
wrote:
>NULL by
> tickerboo2002 wrote:
> > gbak: restoring data for table TELEPHONE_SYSTEM_ALLOCATION
> > gbak: 49 records restored
> > ERROR: validation error for column FORM_ID, value "*** null ***"
> > attempted retrieval of more segments than exist.
> >
> > Any idea what can cause these errors?
>
> You used some tool in the past to change column from NULL to NOT
> modifying the system tables, but the tool probably didn't warn you that
> you should UPDATE the existing rows with NULL to something else.
>
> > Is this error in the live database and needs fixing there?
>
> Yes. Just run something like:
>
> update TELEPHONE_SYSTEM_ALLOCATION set FORM_ID = 1
> where FORM_ID is null;
>
> Of course, the value you would use (instead of 1) depends on the
> semantics of FORM_ID field.
>
> --
> Milan Babuskov
> http://www.flamerobin.org
> http://www.guacosoft.com
>