Discussion:
Database recovery after running out of disk space.
Tanveer Virani
2007-01-19 21:08:29 UTC
Permalink
Hi Tobias,

We have a client who ran out of diskspace, and corrupted their db. I've tried
running the repair tool on it, and it comes up with the same type of message:

+ Found state store: DefaultDatabase_sf
+ Initialized the state store: DefaultDatabase_sf
+ Repairing V2MasterTableDataSource 000SYS_INFO_sUSRSequenceInfo
- Store: [ JournalledFileStore: 000SYS_INFO_sUSRSequenceInfo ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 32 Free count = 0
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 001SYS_INFO_sUSRSequence
- Store: [ JournalledFileStore: 001SYS_INFO_sUSRSequence ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 0 Free count = 0
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 002SYS_INFO_sUSRPKeyInfo
- Store: [ JournalledFileStore: 002SYS_INFO_sUSRPKeyInfo ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 18 Free count = 14
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 003SYS_INFO_sUSRFKeyInfo
- Store: [ JournalledFileStore: 003SYS_INFO_sUSRFKeyInfo ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 3 Free count = 29
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 004SYS_INFO_sUSRUniqueInfo
- Store: [ JournalledFileStore: 004SYS_INFO_sUSRUniqueInfo ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 7 Free count = 25
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 005SYS_INFO_sUSRCheckInfo
- Store: [ JournalledFileStore: 005SYS_INFO_sUSRCheckInfo ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 0 Free count = 0
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 006SYS_INFO_sUSRPrimaryColumns
- Store: [ JournalledFileStore: 006SYS_INFO_sUSRPrimaryColumns ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 23 Free count = 9
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 007SYS_INFO_sUSRUniqueColumns
- Store: [ JournalledFileStore: 007SYS_INFO_sUSRUniqueColumns ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 12 Free count = 20
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 008SYS_INFO_sUSRForeignColumns
- Store: [ JournalledFileStore: 008SYS_INFO_sUSRForeignColumns ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 3 Free count = 29
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 009SYS_INFO_sUSRSchemaInfo
- Store: [ JournalledFileStore: 009SYS_INFO_sUSRSchemaInfo ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 3 Free count = 29
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 010SYS_INFO_sUSRDatabaseVars
- Store: [ JournalledFileStore: 010SYS_INFO_sUSRDatabaseVars ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 1 Free count = 31
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 011SYS_INFO_sUSRPassword
- Store: [ JournalledFileStore: 011SYS_INFO_sUSRPassword ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 1 Free count = 31
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 012SYS_INFO_sUSRUserPriv
- Store: [ JournalledFileStore: 012SYS_INFO_sUSRUserPriv ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 1 Free count = 31
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 013SYS_INFO_sUSRUserConnectPriv
- Store: [ JournalledFileStore: 013SYS_INFO_sUSRUserConnectPriv ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 2 Free count = 30
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 014SYS_INFO_sUSRGrant
- Store: [ JournalledFileStore: 014SYS_INFO_sUSRGrant ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 82 Free count = 14
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 015SYS_INFO_sUSRService
- Store: [ JournalledFileStore: 015SYS_INFO_sUSRService ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 0 Free count = 0
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 016SYS_INFO_sUSRFunctionFactory
- Store: [ JournalledFileStore: 016SYS_INFO_sUSRFunctionFactory ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 0 Free count = 0
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 017SYS_INFO_sUSRFunction
- Store: [ JournalledFileStore: 017SYS_INFO_sUSRFunction ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 1 Free count = 31
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 018SYS_INFO_sUSRView
- Store: [ JournalledFileStore: 018SYS_INFO_sUSRView ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 15 Free count = 17
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 019SYS_INFO_sUSRLabel
- Store: [ JournalledFileStore: 019SYS_INFO_sUSRLabel ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 0 Free count = 0
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 020SYS_INFO_sUSRDataTrigger
- Store: [ JournalledFileStore: 020SYS_INFO_sUSRDataTrigger ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 0 Free count = 0
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 021APP_Participants
- Store: [ JournalledFileStore: 021APP_Participants ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 1 Free count = 31
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 022APP_MeetingParameters
- Store: [ JournalledFileStore: 022APP_MeetingParameters ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 280 Free count = 200
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 023APP_Groups
- Store: [ JournalledFileStore: 023APP_Groups ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 0 Free count = 0
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 024APP_GroupMembers
- Store: [ JournalledFileStore: 024APP_GroupMembers ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 0 Free count = 0
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 025APP_ServerParameters
- Store: [ JournalledFileStore: 025APP_ServerParameters ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 280 Free count = 200
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 026APP_RecordingJournal
- Store: [ JournalledFileStore: 026APP_RecordingJournal ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 74 Free count = 22
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 027APP_MeetingPreloads
- Store: [ JournalledFileStore: 027APP_MeetingPreloads ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 0 Free count = 0
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 028APP_Meetings
- Store: [ JournalledFileStore: 028APP_Meetings ]
- Store areas are intact.
+ Rebuilding free bins.
- Store repair complete.
- Checking record integrity.
* Record count = 272 Free count = 720
- Rebuilding all table index information.
- Table check complete.
+ Repairing V2MasterTableDataSource 029APP_AuditLog
last_boundary = 80503076019634555
last_area_pointer = -80503076019285587
[com.mckoi.debug.Debug - Exception thrown: 'File corrupt: last_area_pointer
is before data part of file.'] java.io.IOException: File corrupt:
last_area_pointer is before data part of file. at
com.mckoi.store.AbstractStore.open(AbstractStore.java:205) at
com.mckoi.database.V1FileStoreSystem.openStore(V1FileStoreSystem.java:145)
at
com.mckoi.database.V2MasterTableDataSource.checkAndRepair(V2MasterTableData
Source.java:818) at
com.mckoi.database.TableDataConglomerate.checkVisibleTables(TableDataConglo
merate.java:438) at
com.mckoi.database.TableDataConglomerate.fix(TableDataConglomerate.java:232
3) at
com.mckoi.tools.DBConglomerateRepairTool.repair(DBConglomerateRepairTool.ja
va:57) at
com.mckoi.tools.DBConglomerateRepairTool.main(DBConglomerateRepairTool.java
:87) Exception in thread "main" java.lang.RuntimeException: IO Error: File
corrupt: last_area_pointer is before data part of file. at
com.mckoi.database.V1FileStoreSystem.openStore(V1FileStoreSystem.java:155)
at
com.mckoi.database.V2MasterTableDataSource.checkAndRepair(V2MasterTableData
Source.java:818) at
com.mckoi.database.TableDataConglomerate.checkVisibleTables(TableDataConglo
merate.java:438) at
com.mckoi.database.TableDataConglomerate.fix(TableDataConglomerate.java:232
3) at
com.mckoi.tools.DBConglomerateRepairTool.repair(DBConglomerateRepairTool.ja
va:57) at
com.mckoi.tools.DBConglomerateRepairTool.main(DBConglomerateRepairTool.java
:87)

Any help in recovering this data would be appriciated.

Thanks,
Tanveer



---------------------------------------------------------------
Mckoi SQL Database mailing list http://www.mckoi.com/database/
To unsubscribe, send a message to mckoidb-***@mckoi.com
Stefaan A Eeckels
2007-01-23 17:17:24 UTC
Permalink
On Fri, 19 Jan 2007 21:08:29 +0000 (UTC)
Post by Tanveer Virani
+ Repairing V2MasterTableDataSource 029APP_AuditLog
last_boundary = 80503076019634555
last_area_pointer = -80503076019285587
last_area_pointer is before data part of file.']
File corrupt: last_area_pointer is before data part of file.
at com.mckoi.store.AbstractStore.open(AbstractStore.java:205)
at com.mckoi.database.V1FileStoreSystem.openStore (V1FileStoreSystem.java:145)
That would mean that real length of 029APP_Auditlog is 348968, while
the header of the file says that its size is 80503076019634555 (this
is unlikely to say the least). The file is clearly corrupt, and there's
little hope you can recover it.

What you could try and to is create a new empty database, and copy the
freshly created, empty Auditlog table file (...APP_Auditlog.koi) to the
corrupted database's 029APP_Auditlog.koi file. Don't hold out too many
hopes, because the generation of the file is also kept in the database
structures and the new file might not be usable.

With access to the database, the database definition and the source code
a correct, empty file can be reconstructed - it all depends how
important it is and how much your customer wants to spend on it.

Recovering from the last good backup seems the way to go.

Take care,
--
Stefaan A Eeckels
--
Never explain by malice what can be adequately explained by stupidity.
However:
Sufficiently advanced stupidity is indistinguishable from malice.


---------------------------------------------------------------
Mckoi SQL Database mailing list http://www.mckoi.com/database/
To unsubscribe, send a message to mckoidb-***@mckoi.com
Loading...