Subject Re: [firebird-support] Re: Backing up tables with procedures
Author Richard Poulin
Resolved. Thanks a lot.

Another question about backup:
- Can backup be done while users are using tables? (through a software)
- Any automatic backup software recommended?

---------------------

Adam a écrit :
> > Thank You all and Adam.
> > Tou are right, the FIB error was a table introduced by my Delphi
> > program. I dropped that table and got a good backup with gbak. No
> > errors. I however get error restoring it : The restored file is
> fine
> > but is missing some entries. And GOOD news, my procedures are back
> in
> > the restored file.
> >
> > Here the error i get:
> > gbak: restoring index I_AR_SALESPEOPLE_NAME
> > gbak: restoring data for table AR_SALESPEOPLE
> > gbak: ERROR: validation error for column GLDEPT, value "*** null
> ***"
> > gbak: ERROR: warning -- record could not be restored
> > gbak: Exiting before completion due to errors
> >
> > I have to find out about this null value. ???
>
> My prior response is sitting in dev/null. Sorry if it turns up later.
> It is more detailed but this is the gist.
>
> The usual reason for this is that someone has added a not null field
> but has not made sure all pre-existing records in that table have
> some value. Consequently, the restore is attempting to add a not null
> constraint but has encountered a NULL value.
>
> select *
> from AR_SALESPEOPLE
> where GLDEPT IS NULL;
>
> Will show you the records you need to address. It is a bit of a
> gotcha. They may have defined a default value, but this default value
> is not applied retrospectively to existing records.
>
> A simple update statement will get things working again.
>
> For example
>
> UPDATE AR_SALESPEOPLE
> SET GLDEPT = 1
> WHERE GLDEPT IS NULL;
>
> (change 1 to whatever value is appropriate).
>
> Adam
>
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
> SPONSORED LINKS
> Technical support
> <http://groups.yahoo.com/gads?t=ms&k=Technical+support&w1=Technical+support&w2=Computer+technical+support&w3=Compaq+computer+technical+support&w4=Compaq+technical+support&w5=Hewlett+packard+technical+support&w6=Microsoft+technical+support&c=6&s=196&.sig=-XIO8GxY6hqd3NaD5WSEyw>
> Computer technical support
> <http://groups.yahoo.com/gads?t=ms&k=Computer+technical+support&w1=Technical+support&w2=Computer+technical+support&w3=Compaq+computer+technical+support&w4=Compaq+technical+support&w5=Hewlett+packard+technical+support&w6=Microsoft+technical+support&c=6&s=196&.sig=B29J78SYXnNTjjMFBMznqA>
> Compaq computer technical support
> <http://groups.yahoo.com/gads?t=ms&k=Compaq+computer+technical+support&w1=Technical+support&w2=Computer+technical+support&w3=Compaq+computer+technical+support&w4=Compaq+technical+support&w5=Hewlett+packard+technical+support&w6=Microsoft+technical+support&c=6&s=196&.sig=7_je1A94xs82CFXUjEqA6g>
>
> Compaq technical support
> <http://groups.yahoo.com/gads?t=ms&k=Compaq+technical+support&w1=Technical+support&w2=Computer+technical+support&w3=Compaq+computer+technical+support&w4=Compaq+technical+support&w5=Hewlett+packard+technical+support&w6=Microsoft+technical+support&c=6&s=196&.sig=2zMAuRCo5cJrVBr1Bxa3_w>
> Hewlett packard technical support
> <http://groups.yahoo.com/gads?t=ms&k=Hewlett+packard+technical+support&w1=Technical+support&w2=Computer+technical+support&w3=Compaq+computer+technical+support&w4=Compaq+technical+support&w5=Hewlett+packard+technical+support&w6=Microsoft+technical+support&c=6&s=196&.sig=_ytYU7aXb57AVaeUfmvLcA>
> Microsoft technical support
> <http://groups.yahoo.com/gads?t=ms&k=Microsoft+technical+support&w1=Technical+support&w2=Computer+technical+support&w3=Compaq+computer+technical+support&w4=Compaq+technical+support&w5=Hewlett+packard+technical+support&w6=Microsoft+technical+support&c=6&s=196&.sig=4hRo6NXYavRAbTkaYec5Lw>
>
>
>
> YAHOO! GROUPS LINKS
>
> * Visit your group "firebird-support
> <http://groups.yahoo.com/group/firebird-support>" on the web.
>
> * To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
> <mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
>