DB2 Version 9.7 for Linux, UNIX, and Windows

Upper limits for log sequence numbers

In DB2® Versions 9.7, LSNs are 8 byte numbers. They range from 0x0000 0000 0000 0000 at the time the database is first created to 0xFFFF FFFE FFFF FFEF, or almost 16 exbibytes (where one exbibyte = 260 = 10246 bytes). LSNs grow for the life of the database as records are added to log files.
Note: In partitioned database environments, LSNs increase in the log files for each database partition independently of the log files on other partitions. For this reason, when examining LSNs in a partitioned environment, you must look at the LSNs for each database partition.

It is rare (and in most cases, extremely unlikely) that database activity will be such that the log files approach the 16 exbibytes limit for LSNs. However, if they do, the database manager writes a message (ADM1849C) to the log, to advise you that the current LSN is approaching the maximum value. This message is added to the log when an LSN reaches 0xFFFF EFFF FFFF FFEF. Then, for each increase in the LSN of 0x0080 0000 0000 bytes, this message is again written to the log file.

If the LSN reaches 0xFFFF FFFE FFFF FFEF, the database manager writes a different message (ADM1850C) to the log. In addition, the database becomes read-only. Any subsequent attempts to write to the database fail (SQL0946C). Making the database read-only is a safeguard. This action is intended to prevent any inconsistency or integrity issues that might arise if the LSN grows larger than the maximum supported value. If either ADM1849C or ADM1850C are written to the log, follow the steps outlined in Resolving an LSN limit-reached condition.