Subject | Re: Re[3]: [firebird-support] Broken databases |
---|---|
Author | Dmitri Markov |
Post date | 2013-11-18T13:13:59Z |
I try restore broken backup, a lot of errors in firebird.log like this. So a lot of trigger Check_X is broken, when I repair DB, I also delete them when repairing structure of DB.
Server (Server) Mon Nov 18 10:10:27 2013
Database: C:\DATABASE\ERRORDB\MAINBASE.FDB
RDB$FLAGS for trigger CHECK_2791 in RDB$TRIGGERS is corrupted (304)
On , Dmitri Markov <markovdmitri@...> wrote:
When I restore DB I see
this error
IBE: Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.
action cancelled by trigger (2) to preserve data integrity.
internal Firebird consistency check (invalid
RDB$CONSTRAINT_TYPE).
Before It gbak retoring this "gbak: restoring privilege for user SYSDBA "
I delete all indexes because I can't activating indexes one by one, and I can't delete them, I can't activating FK, I can activating only PK. I should to delete some FK(about 3 or 5 not more) and indexes from system tables manualy, because I can't delete them by sql.
Because some our consumers is old they using Firebird 2.5.1, other use 2.5.2. I can't see any dependence
between achitecture of
firebird and version of firebird.
Later I try to copy log on validating errors.
On Friday, November 15, 2013 10:45 PM, Dmitry Kuzmenko <kdv@...> wrote:
Hello, Dmitri!
PS> When I fix a DB with error I also restore the DB without activating the
PS> Indexes.
WHY? Firebird 2.1 and higher restores all indices it can, and show error on indices that it can't create
(by the PK or FK violation caused by broken records).
So, after restore (without -i) option you just need to check restore
output for errors, then check non-active indices in the DB, and try to
fix data and activate those non-active indices.
--
Dmitry Kuzmenko, www.ib-aid.com
PS> When I fix a DB with error I also restore the DB without activating the
PS> Indexes.
WHY? Firebird 2.1 and higher restores all indices it can, and show error on indices that it can't create
(by the PK or FK violation caused by broken records).
So, after restore (without -i) option you just need to check restore
output for errors, then check non-active indices in the DB, and try to
fix data and activate those non-active indices.
--
Dmitry Kuzmenko, www.ib-aid.com