IBM Support

DB2 : Prevent and resolve running out of LSN's

Question & Answer


Question

How to prevent and resolve the condition of "runnning out of LSN" ?

Answer

The following DB2 operations will truncate a log file and thus waste lot of LSN's.

  • ARCHIVE LOG FOR DATABASE command
  • Online backup
  • Deactivating and activating database frequently
  • SET WRITE SUSPEND command
  • rollforward and complete(including crash recovery)


Most users exhaust LSN's by deactivating and activating database frequently, since they do not activate database explicitly. If database is activated implicitly, i.e. activated via first connection, then the database will be deactivated automatically after all the applications terminated. This is the most common scenario for those users running out of LSN.

If log file size is big, then every time a log file is truncated it will waste much log space. Users will probably see many truncated log files in their archive log path.

Please upgrade the database to v97 to avoid exhausting 6-byte LSN.
DB2 v97 has increased the LSN from 6 bytes(281,474,976,710,656=256 TB) to 8 bytes(18,446,744,073,709,551,616=16777216 TB).

Please refer the technotes below which discuss the 6-byte LSN limitation:

"LSN limit in DB2 V9.1 and V9.5, and ADM1849C or ADM1850C messages"
https://www-304.ibm.com/support/docview.wss?uid=swg21420326

"Resolving an LSN limit-reached condition"
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.admin.ha.doc/doc/c0057417.html

"Upper limits for log sequence numbers"
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.admin.ha.doc/doc/c0057412.html

"Determining the current log sequence number in a database"
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.admin.ha.doc/doc/t0057413.html

Here is a list of APARs which added warning messages into db2diag.log and administration notification log, and put database into read-only mode:

IZ22171  -->  For V8.2
IZ22172
  -->  fixed in v91fp6, sysrouted from IZ22171
IZ22173
  -->  fixed in v95fp3, sysrouted from IZ22171

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Recovery - Logging","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.5;9.1;8.2","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21569832