首页 > 解决方案 > Firebird 2.5 错误,文件“ReadFile”操作期间的 I/O 错误

问题描述

我希望你能帮助我找到一种方法来解决我在使用 Firebird 数据库时遇到的问题。

使用火烈鸟的错误是:

在此处输入图像描述

我曾尝试使用数据库进行 gfix,但它不会验证与 powershell 中出现的相同错误。

PS C:\Program Files\Firebird\Firebird_2_5\bin> .\gfix.exe -v C:\databases2\Issue\RFS.FDB -user sysdba -password masterkey
I/O error during "ReadFile" operation for file "C:\DATABASES2\ISSUE\RFS.FDB"
-Error while trying to read from file
-Reached the end of the file.
PS C:\Program Files\Firebird\Firebird_2_5\bin> .\gfix.exe -v -f C:\databases2\Issue\RFS.FDB -user sysdba -password masterkey
I/O error during "ReadFile" operation for file "C:\DATABASES2\ISSUE\RFS.FDB"
-Error while trying to read from file
-Reached the end of the file.
PS C:\Program Files\Firebird\Firebird_2_5\bin> .\gfix.exe -v -f -i C:\databases2\Issue\RFS.FDB -user sysdba -password masterkey
I/O error during "ReadFile" operation for file "C:\DATABASES2\ISSUE\RFS.FDB"
-Error while trying to read from file
-Reached the end of the file.
PS C:\Program Files\Firebird\Firebird_2_5\bin>

在任何其他命令上都是相同的错误-mendgbak

标签: firebirdfirebird2.5

解决方案


该错误可能意味着您的数据库已损坏,无法恢复(或者至少,在没有专家帮助的情况下)。从本质上讲,这意味着您的数据库文件比 Firebird 认为的要小,并且 Firebird 会尝试读取超出文件长度的内容。这可能表明文件被截断(并且任何超出截断点的数据现在都丢失了),数据库的内部元数据已损坏,或者当 Firebird 试图增加数据库文件的大小时出现问题。

这可能可以通过重写一些内部元数据来挽救。但据我所知,这超出了gfix. 我认为您将需要提供恢复服务的公司的帮助,例如 IB-Aid 的 IB-Surgeon,请参阅https://ib-aid.com/。我建议您在 firebird-support 邮件列表上发布您的问题,看看是否有其他解决方案。


推荐阅读