What is the DBTOOL Warning about the small size of the first record fragment?
Warning - first record fragment of <recid> area <num> is only <n> bytes, LOB <n>
- LOB 0 is a record
- LOB 1 is a BLOB
- LOB 2 is a CLOB
Since OpenEdge 10.1B, any record in a Type II Area will be at least 10 bytes. This is to assure that a fragment can hold the 64 bit rowid to the next fragment.
- Any record/lob data created in prior versions, has the possibility that the next fragment may point to a 64 bit rowid which will not fit in the space of the original fragment.
- This DBTOOL warning indicates the potential for record corruption when a record is fragmented accross the 32/64 bit boundary
- When DBTOOL Option 3. Record Validation reports this warning, it indicates that these records with small record fragments will cause a problem when an update to that record that requires a new fragment, because the current small fragment cannot hold the size of the rowid to find the next fragment (32->64 bit), What does tabanalys or dbanalys Fragments Factor value mean?
DBTOOL Warning message about the first fragment with a positive byte value:
- Is not expected to cause any issues with LOBS that were created post 10.1B, where a special algorithm for mini lobs, deletes and re-creates the updated LOB instead of adding a fragment to it.
- May cause issues with records or LOBS that were created pre 10.1B should they be updated and rowids in the 64-bit boundary are used for the fragment.
- Will not cause any issues when the record or LOB is read or deleted
DBTOOL Warning message about the first fragment with a negative byte value:
- If a negative size is reported, this is a different Warning message and indicates corruption which needs to be fixed through dump and load. Example:
Warning - first record fragment of <recid> area <num> is only -513 bytes, LOB 0
Use DBTOOL Option 6. Record Fixup to address the issue.
- This DBTOOL Option of will locate any records that have < 10 byte header. The record will be deleted and recreated with the new header size, if there are enough space available in the current block.
- The DBTOOL utility can be run online or offline and will be replicated in after-image notes in hotspare and OpenEdge Replication enabled environments.
- If these Warnings are generated on direct-mini-lobs, the warning can be ignored since OpenEdge 10.1C. Refer to Article LOB < 10 bytes cannot be fixed after re-creating the LOB
- When addressing an issue with the LOB field, run the utility offline. An attempt to address the issue online will result in the message: LOB record can only be fixed offline
DBTOOL Record Fixup repair Option only works at the Table or Area level
:
$ dbtool <dbname>
1. Select: Option 9. Enable/Disable File Logging (to write information messages to dbtool.out).2. Select: Option 6. Record Fixup from the Database Tools Menu.3. Identify how DBTOOL should connect to the database and how many threads: <connect>: (0=single-user 1=self-service >1=#threads)?4. Identify
<rowid>: (rowid or all). In this case Enter:
all even if recids are known.
5a Identify
<table>: (Table number or all). Enter:
all or the table number, use the information in Article
How to find a Table Name with it's Area by its Table Number 5b Identify
<area>: (Area number or all). Enter: The Area number that the table resides in.
- This Area number is the same as the one reported in the DBTOOL warning message.
- Do not select all Areas. The Record Fixup repair Option only works at the Table or Area level.
6. Display (verbose level 0-3). Enter 1.
If repairing the record fails with "ERROR - attempt to repair record fragment of <recid> area <num> failed - no free space in block":
- For records (LOB 0), dump delete and load the record back
- For LOBS (BLOB 1, CLOB 2), either dump delete and load the entire table or use ABL to first remove blob-data by setting blob-fields to ?, then re-populate the LOB data with COPY-LOB to re-load LOBS back.