IBM Books

Administrative API Reference


Long Field Manager Log Records

Long field manager log records are written only if a database is configured with LOG RETAIN on or USEREXITS enabled. They are written whenever long field data is inserted, deleted, or updated.

To conserve log space, long field data inserted into tables is not logged if the database is configured for circular logging. In addition, when a long field value is updated, the before image is shadowed and not logged.

All long field manager log records begin with a header.

All long field manager log record offsets are from the end of the log manager log record header.

When a table has been altered to capture LONG VARCHAR OR LONG VARGRAPHIC columns (by specifying INCLUDE LONGVAR COLUMNS on the ALTER TABLE statement):


Table 108. Long Field Manager Log Record Header (LongFieldLogRecordHeader)
Description Type Offset (Bytes)
Originator code (component identifier = 3) unsigned char 0(1)
Operation typea unsigned char 1(1)
Pool identifier unsigned short 2(2)
Object identifier unsigned short 4(2)
Parent pool identifierb unsigned short 6(2)
Parent object identifierc unsigned short 8(2)
Total Length: 10 bytes
Note:

  • a Valid operation type values and definitions:
      Operation type value     Long Field Log Record Type
     
       110                      Add Long Field Record
       111                      Delete Long Field Record
       112                      Non-Update Long Field Record
    

  • b Pool ID of the data object

  • c Object ID of the data object

Add/Delete/Non-update Long Field Record

These log records are written whenever long field data is inserted, deleted, or updated. The length of the data is rounded up to the next 512-byte boundary.

Table 109. Add/Delete/Non-update Long Field Record Log Record Structure
Description Type Offset (Bytes)
Log header LongFieldLogRecordHeader 0(10)
Long field lengtha unsigned short 10(2)
File offsetb unsigned long 12(4)
Long field data char[ ] 16(variable)
Note:

  • a Long field data length in 512-byte sectors (actual data length is not logged). The value of this field is always positive. The long field manager never writes log records for zero length long field data that is being inserted, deleted, or updated.

  • b 512-byte sector offset into long field object where data is to be located.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]