Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Corrupt catalog file
Mon, Dec 3 2007 10:23 AMPermanent Link

Michael Fullerton
I had a user report what appears to be a corrupt catalog file. This
resulted in #401 errors that the various tables don't exist though
physically they exist on the disk. You can fix it by copying over a
fresh catalog file but is there some way to resolve this situation
automatically in code? How could the catalog become damaged anyway?
Mon, Dec 3 2007 10:38 AMPermanent Link

"Fons Neelen"
Hi Michael,

This answer aint gonna help you, but I have added a sugguestion for Tim.

> fresh catalog file but is there some way to resolve this situation
> automatically in code? How could the catalog become damaged anyway?

Currently the RESTORE DATABASE looks like this:

RESTORE DATABASE <Name>
FROM <BackupName>
IN <Path>
[TABLES <TableName> [,<TableName>]]
[INCLUDE CATALOG]

which means there will  always be at least a single table that would be
restored (unless I am mistaken).

Could we have a SQL command as follows:

RESTORE CATALOG DATABASE <Name>
FROM <BackupName>
IN <Path>

Would be nice. Or you could alter the original RESTORE command into this:

RESTORE DATABASE <Name>
FROM <BackupName>
IN <Path>
[TABLES <TableName> [,<TableName>]]
[INCLUDE CATALOG | ONLY CATALOG]

Just a suggestion.

Best regards,
Fons

Mon, Dec 3 2007 8:33 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Fons,

<< which means there will  always be at least a single table that would be
restored (unless I am mistaken). >>

You are correct, but I can change that and will do so when I get a chance.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Dec 3 2007 8:39 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< I had a user report what appears to be a corrupt catalog file. >>

Did they get an error message to that effect ?

<< This resulted in #401 errors that the various tables don't exist though
physically they exist on the disk. You can fix it by copying over a fresh
catalog file but is there some way to resolve this situation automatically
in code? >>

When you say "fresh catalog", do you mean the old version of the catalog
prior to the last metadata changes(edbdatabase.edbcat.old) ?  You have to be
careful when restoring the old version of the catalog because it may not
match the current table structures.  When restoring the old version of the
catalog, you also have to make sure to restore the .old versions of any
tables whose structures were modified also (if any).

However, having said all that, the purpose of the backup is to, at some
point, allow for an automated reversal to the last version of the catalog
and table files on disk.

<< How could the catalog become damaged anyway? >>

An improper shutdown would do it after any changes to the catalog.  However,
updates to the catalog should be rather infrequent at most.  Is that not the
case with your application ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Dec 4 2007 2:55 PMPermanent Link

"Fons Neelen"
Hi Tim,

> You are correct, but I can change that and will do so when I get a chance.

Much appreciated. Don't hope I need to use it much, but it is nice to be
able to when needed.

Best regards,
Fons
Image