Result File Contents
Any errors detected in the databank file are written to the result file directly after the identification record for the table affected.
The result file begins with the following information:
- Databank file name.
- Time when the DBC operation was performed.
- Version of Mimer SQL under which the databank was created (if this is not the same as the current version there will also be a "converted to" message).
- A backup timestamp.
- Structure level.
- System identifier for the databank.
- Databank sequence number (0 = master databank, >0 = a shadow).
- Check flag.
- Number of bitmap pages (starting at 0).
- Root pages (starting at 1).
- Number of pages allocated.
- Number of pages used.
Note: If the databank was not properly closed when Mimer SQL was stopped, there may be an additional message saying:* No bitmap checking against databank!
If the check flag indicates that the databank was not properly closed, the database server will not allow the databank to be accessed and it will, therefore, not be possible to perform any operations.
DBC Table Information
An identification record is given for each table in the databank. The following information is shown:
The system identification number of the table. This is the number used to identify the table in the data dictionary. The table name is not stored directly in the databank file.
The page number of the start page for the highest index level. If the number of levels is 1, this is the only data page. If the start page is 0, the table is empty.
The number of levels in the table storage structure.
The length of the primary key in bytes.
The record length (row length) of the table.
Type of table
"Base table", "Base table (VL)", "Secondary index table" or "Secondary index table (VL)". (VL) indicates that data pages have variable-length records (i.e. are compressed).
Status of table
"Resident" or "Marked for delete".
Index page size
Size of the index page in bytes.
Data page size
Size of the data page in bytes.
Number of index pages
Indicates how many index pages were checked.
Number of data pages
Indicates how many data pages were checked.
Gives an approximate measure of the space used in the data pages. This is expressed as a percentage, which may be >100% for data pages having variable-length (i.e. compressed) records because the required number of pages is calculated based on uncompressed record sizes.
Reached no of records
If no errors are reported, the number of records reached is equal to the total number of records (rows) stored for the table.
DBC Table Information for LOGDB, TRANSDB and SQLDB
For LOGDB, TRANSDB and SQLDB, the identification record contains the following information:
First page in the sequential file.
Last page in the sequential file.
Type of table
"Sequential table" or "Sequential table (VL)". (VL) indicates that pages have variable-length records (i.e. are compressed).
Status of table
"Resident" or "Marked for delete".
Size of the page in bytes.
No. of pages read
Number of pages checked.
No. of records read
Number of records checked.
Example of Result File
The following example illustrates the result of running DBC on the HOTELDB databank file.
The fact that the file was not properly closed is flagged.MIMER Databank Check Utility Version 8.2.1 Databank file: HOTELDB Time: 2000-06-23 16:29:09 Version created: 812 Backup timestamp: 1 Structure level: 6 System ident.: 269 Check flag: Databank not properly closed Bitmap pages: 0 Root pages: 1 No. of pages allocated: 160 No. of pages used: 115 Tabid: 270 Startp: 3 Levels: 2 Keylen: 4 Reclen: 25 Base table, Resident Index page size 2048 Data page size 2048 Number of index pages: 1 Number of data pages: 4 Required/Allocated datapages: 100% Reached no of records: 255 Tabid: 271 Startp: 5 Levels: 2 Keylen: 8 Reclen: 12 Base table, Resident Index page size 2048 Data page size 2048 Number of index pages: 1 Number of data pages: 6 Required/Allocated datapages: 83% Reached no of records: 700 Tabid: 272 Startp: 15 Levels: 2 Keylen: 8 Reclen: 89 Base table (VL), Resident Index page size 2048 Data page size 2048 Number of index pages: 1 Number of data pages: 92 Required/Allocated datapages: 183% Reached no of records: 3707 Tabid: 273 Startp: 108 Levels: 2 Keylen: 8 Reclen: 12 Base table, Resident Index page size 2048 Data page size 2048 Number of index pages: 1 Number of data pages: 2 Required/Allocated datapages: 100% Reached no of records: 222 Tabid: 274 Startp: 4 Levels: 1 Keylen: 4 Reclen: 8 Base table, Resident Index page size 2048 Data page size 2048 Number of index pages: 0 Number of data pages: 1 Required/Allocated datapages: 100% Reached no of records: 166 Tabid: 275 Startp: 112 Levels: 2 Keylen: 4 Reclen: 89 Base table (VL), Resident Index page size 2048 Data page size 2048 Number of index pages: 1 Number of data pages: 3 Required/Allocated datapages: 266% Reached no of records: 166 . . . . No errors found
The following error situations are described by explicit messages in the result file:
Bitmap Errors* Illegal number of free bits in bitmap
The number of free bits in the bitmap is marked as a negative number or as a number greater than the permissible value.* Illegal pointer to first word with free bit in bitmap
The pointer to the first word is either negative or greater than the number of words per page, or points outside the number of allocated pages.
Root Page Errors* Illegal record length in root page
The record length is not valid for the current version or for the site.* Pageno. outside databank: x * Pageno. not marked as used: x
The reference to the page number (x) is invalid. (Applies only where there is more than one root page.)
Sequential Structure Errors* Pointer to previous page invalid
Error in page linkage.* Invalid record length
The record length is either not the same as in the previous page or outside the page limits.* Record crosses page boundary
A record stretches over the page limits.
Table Structure Errors* Error in root record
The value for start page, levels, key length or record length is outside the legal values for the site.* Page has illegal record length: x
The record length (x) given in the page is not the same as that given for the table.* Page has illegal last-record pointer: x
The pointer (x) to data within a page is outside the page limits. The limits are the values of bytes/header and bytes/page.* Page has records in wrong order. Pos: x
The records in the page are not correctly sorted. The value of x is the byte position within the page for the start of the wrong record.* Page has last-record key > index key. Pos: x
The records within a page include key values greater than those in the index level above. The value of x is the byte position within the page for the start of the last record.* Page no. outside databank: x
Reference is made to a page number (x) which is higher than the highest allocated page.* Page no. referenced twice
There are at least two references to the same page number (x). One of these references should also give another error, or an error should have been notified earlier in the file.* Page no. not marked as used: x Bitmap pageno: Word: Bit:
A page that is used is illegally marked as free. Continued insertion of data in the databank will result in a double referenced page.
All table structure errors are followed by a listing of the page numbers passed in the B*-tree structure on the way to the error. In the example below a y-value indicates the byte position in the page (corresponding x-value) where the record holding the reference to the next level starts:B*-tree Page no: x1 x2 x3 .... xn Byte pos: y1 y2 y3 .... yn
If the error occurs at an index level, the following additional message is given, and no checks are made at lower levels:Branch is interrupted
Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40