Subject | Re: Problem with corrupt backups |
---|---|
Author | Alexander V.Nevsky |
Post date | 2004-02-19T09:33:26Z |
--- In firebird-support@yahoogroups.com, Bradley Tate <btate@o...>
wrote:
assure you that FB1.0.3 g-utilities always return error message, but
it's really doubtful.
Select Count(*), ID
From This_Table
Group By ID
Having Count(*)>1 ?
Don't forget to add Plan (This_Table Natural) to such a query. Most
probably engine used index and this index have no link to duplicated
row. Check this table for NULLs in PK too, again forcing natural scan.
run on Red Hat too, survived many versions of both RH and FB. In my
practice such a corruptions were sometimes caused by killing processes
of Classic server. I think crash of Super can make the same damage.
Another reason I know is file access to database in use, third -
hidden hardware defects, usually RAM or disk controller. BTW, in FB1.5
were fixed several ancient bugs around savepoints and mass
inserts/updates which seldom could lead to such a corruptions.
Best regards,
Alexander.
wrote:
> Hi all,use
>
> For the second time the backup of our 3G Firebird 1.0.3 database has
> been corrupted. We do a backup and restore nightly for QA and for
> in other systems. All tables in the restored database then appearempty
> i.e. result sets from selects are empty and the roles havedisappeared.
> We suspected a permission problem but even when we add permissionsback
> using grant all we still cannot get access to any data from anytable
> even logging in as sysdba. There are no errors reported from thebackup
> or restore process, and gfix reports nothing wrong with either theLooks strange. I haven'nt failed restore since FB1 RC2 so can't
> restored database or the original.
assure you that FB1.0.3 g-utilities always return error message, but
it's really doubtful.
> To try and track down the problem we did the restore in Firebird 1.5RC8
> and it tells us that one of our tables has a duplicate on theprimary
> key. The problem is if we go back to our original database and do aWhat kind of select did you do? Something like
> select it performs as expected and there is no evidence of this.
Select Count(*), ID
From This_Table
Group By ID
Having Count(*)>1 ?
Don't forget to add Plan (This_Table Natural) to such a query. Most
probably engine used index and this index have no link to duplicated
row. Check this table for NULLs in PK too, again forcing natural scan.
> Giventhe
> that we know what the problem is we can fix it (copy table, drop
> original, copy back) but does anybody have any idea what could be
> causing it so we can stop it happening again? We're suspicious that
> backup is getting too much data i.e. records which should not existany
> more.Don't think so. 3Gb is'nt very large database, my own is about 8 and
> The original database is running on Linux (RedHat 7.3)
run on Red Hat too, survived many versions of both RH and FB. In my
practice such a corruptions were sometimes caused by killing processes
of Classic server. I think crash of Super can make the same damage.
Another reason I know is file access to database in use, third -
hidden hardware defects, usually RAM or disk controller. BTW, in FB1.5
were fixed several ancient bugs around savepoints and mass
inserts/updates which seldom could lead to such a corruptions.
Best regards,
Alexander.