Subject Re: Odp: Re[3]: [firebird-support] Broken databases
Author Dmitri Markov
I'll try it, but later. I hope it's not very dangerous.


On Monday, November 18, 2013 12:58 PM, "liviuslivius@..." <liviuslivius@...> wrote:
 
Hi,

Try "install" current snapshot of Firebird 2.5. Go to firebirsql.org downloads on the left you have snapshot builds. After download you must stop server and replace files. After replace start FB server. You should have version 2.5.3.26715 or greater

Regards,
Karol Bieniaszewski

----- Reply message -----
Od: "Dmitri Markov" <markovdmitri@...>
Do: "firebird-support@yahoogroups.com" <firebird-support@yahoogroups.com>
Temat: Re[3]: [firebird-support] Broken databases
Data: pon., lis 18, 2013 08:18


 
No, I mistak, there are records with message, that sweep is complete, but between messages of start and finish always exist messages, that "Internal Firebird consistency check (record disappeared (186), file: vio.cpp line 408)".


On , Dmitri Markov <markovdmitri@...> wrote:
And I read a very big log from one of the server and found this records(In september this database has broken)

BIGKSAMUSRV   Sun Sep 15 12:53:27 2013
Sweep is started by SWEEPER
Database "C:\DATABASE\MAINBASE.FDB"
OIT 1322776, OAT 2783916, OST 2783916, Next 2956444

BIGKSAMUSRV   Sun Sep 15 13:01:51 2013
Sweep is started by SWEEPER
Database "C:\DATABASE\MAINBASE.FDB"
OIT 1322776, OAT 2783916, OST 2783916, Next 2956665

BIGKSAMUSRV   Sun Sep 15 13:03:37 2013
Database "C:\DATABASE\MAINBASE.FDB"
        Internal Firebird consistency check (record disappeared (186), file: vio.cpp line 408) 

BIGKSAMUSRV   Sun Sep 15 13:03:37 2013
Database "C:\DATABASE\MAINBASE.FDB"
        Internal Firebird consistency check (record disappeared (186), file: vio.cpp line 408)

after some records I found the record when was one record about finishing sweep.
After this sweep always stop with exception "disappeared records(186)"


On Monday, Nov ember 18, 2013 10:25 AM, Dmitri Markov <markovdmitri@...> wrote:
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