Subject Re: [firebird-support] Re: corrupted database
Author Helen Borrie
At 09:24 PM 28/11/2005 +0000, you wrote:
>--- In firebird-support@yahoogroups.com, "Raith, Daniel"
><danielraith@m...> wrote:
> >
> > You should really get a copy of the book: "The Firebird Book" by Helen
> > Borrie. Appendix IV has a nice section on database repair.

http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_db_corr

> >
> > Use the -i switch to ignore the checksum errors.
> >
>
>Yes, I saw that switch in the Interbase docs, but I'm still fuzzy on
>what the syntax is to access my database. I've only used ODBC, and
>not tcp or other methods.

Hmm, ODBC is a data access interface, not a network protocol. Gfix and
gbak are command-line applications that access databases directly through
the API, so you don't need ODBC or any other sort of driver to run them.


>example says: dbserver:/db/mydb.fdb
>
>and my table is at c:\firebird\mailserver.fdb

OK, let's begin by understanding that you can't target a specific table
from either gfix or gbak. Firebird stores tables onto the disk using its
own internal system (that's the "MS" part of "RDBMS"). The *database file*
is as close as you're going to get with gbak and gfix.

Don't follow first example: that's a remote protocol and that path syntax
applies to a Unix server.

Use the second example for the <database> argument for gfix and gbak when
you follow through the d o c u m e n t e d steps in Paul Beach's repair
paper.

You must do this locally. You have to be a) sysdba and b) local to do
database repair. You also have to have exclusive access to the database,
i.e. put the database into "shutdown" mode.

Unfortunately, it's also the case that the gfix/gbak routine doesn't mend
all types of corruption. It's pretty good at mending logical corruption,
which it does by causing the missing or broken stuff to be bypassed; but,
if you have physically damaged the database or the data by some act of God
or some ill-advised practice, the database itself will be dead. You'll
need to use an expert service to retrieve the undamaged data and pump it
into a new database.

In another post, you said "I'm a newbie at this, and I don't follow the
documentation."

Don't you think it's time you did....? The Quick Start Guide (downloadable
from the new user's guide area of the Firebird website) at least will warn
you about some of the practices that will cause you to corrupt a database
in the first place...

./heLen