Subject Re: Re: [firebird-support] Broken databases
Author Dmitri Markov
It's interesting. Some bases really more than one GB(some of tham large than 3GB) or about it. I don't remember but it seems to me that small bases not corrupted. 

On Friday, November 15, 2013 3:13 PM, "fabianoaspro@..." <fabianoaspro@...> wrote:
10 servers cannot be with corrupted ram but one yes. Because this I asked if its always the same PC.
AntivĂ­rus can corrupt databases, specially if the have several Gb. I have had all of those problems.
Em 15/11/2013 09:07, "Dmitri Markov" <markovdmitri@...> escreveu:
10 servers with corrupted ram? I never look so different servers with corrupted ram, I know that not all of them real servers but real servers with ECC RAM has broken DB, too.

I try to work without antivirus, but how antivirus can crash DB?

On Friday, November 15, 2013 2:43 PM, "fabianoaspro@..." <fabianoaspro@...> wrote:
Turn off all antivĂ­rus software. If you take several times in the same PC broken fks maybe you have a corrupter ram in that PC!
Run a memory test on that PC!
Em 15/11/2013 08:37, <markovdmitri@...> escreveu:
 Broken DB decrease performance. I don't find any dessapeared records of value of fields, but if I try to validate database, I see errors in DB.
Hardware and OS always different, Firebird 2.5 with different architecture(cometimes classic, sometimes superserver). Force writes I check first and it's ON on for all servers.
Some servers used RAID, but some others used only one HDD, it's depend from nu,ber of users and consumer abilities.
When I restore DB I see the constraint error. My method of repair is more than easy recreating of FK and indexes. For the first I try backup and restore without garbage collection, than try different options of using gfix, last I try gbak -b -v -ig -g database.gdb database.gbk, than I try to restore withput activating Indexes, than I try to delete all indexes, and FK, and than spep-by-step create FK and than indexes. When I restore FK I foun some records that break referential integrity. I delete this records and create FK. After that I use IBExpert and use SchemeCompair check all indexes, functions, key etc. After all this steps I check DB, doing backup and restore and if all ok I send it to the client.

How I can attached log file here?
In log file a lot of records look like this 
PC (Server) Thu Nov 14 12:35:16 2013
INET/inet_error: read errno = 10054

---In, <aharrison@...> wrote:

On Thu, Nov 14, 2013 at 4:34 AM, <markovdmitri@...> wrote:

I use firebird for my product and for some times my databases start break.

OK.  What makes you think the database is broken?  Are you seeing error messages?
What are they?  Are you losing data?  Seeing incorrect data?  Have you checked the 
Firebird log for errors?
I read a lot of forums about protection of my databases, but I don't understand what the reason of breaking.

Nor do we, unless you give us some more information.  What version of Firebird?  What operating
environment?  Which Firebird architecture (classic, superserver, super classic)?  What disk 
architecture?  Are you using forced writes?

DataBase is broken and can't be restored from backup,

If you can create a database, but not restore it, then the problem may be with a broken constraint.
The error that gbak reports would be very helpful.
but I can work with database and I can repair it(I need about 3 hours for repairing, because I need to recreate all indexes and foreign key and delete phantom records).

 Phantom records?  What exactly are you doing to repair the database and why did you
choose the method of recreating all indexes and foreign key relationships?

I don't understand reasons for broken. Can you help me to find the solution of this problem? 

Probably, with some more clues... 

Maybe I must to show some log's or to turn on some logs that can help to fin solution?

The logs you need already exist - firebird.log and possibly the system error log.  Without
knowing more about your environment, I can't say where they are or what they're called.

Good luck,