IBM Support

DB2LUW LOGSECOND set to -1 can cause confusing outputs in monitoring tools

Technical Blog Post


Abstract

DB2LUW LOGSECOND set to -1 can cause confusing outputs in monitoring tools

Body

In DB2LUW  the  LOGSECOND  is a database  level configuration parameter  which represents the total number of secondary transaction logs which the database can allocate and use.

A  value  "-1"   represents infinite logging.

With the value of "-1"  it indicates the  database is configured with infinite amount of active log space.

The value "-1"  can cause  issues unless it's decided consciously to take care of some momentary log space need  etc.

 

However,  there is another  kind of problem which could be faced by various  monitoring tools which try to generate reports using the db2's  configuration settings.

Thosel include various  3rd party tools as well as IBM's internal database monitoring products.

 

The value "-1",  if not handled correctly  can show  different kind of outputs in various  calculations which depend on the value of LOGSECOND.

Example,  a value of  65535  or,   FFFF  etc

These are usually a defect in those tools which should be fixed in the tools  itself.

 

There is another kind of observation  which could be faced is the calculated value is represented by "-"  which indicates no specific value and that usually correspond  to an infinite value.

 

One such example,

 

$ db2 get db cfg for sample |grep LOGSECOND
 Number of secondary log files               (LOGSECOND) = 10

 

$ db2 "select TOTAL_LOG_AVAILABLE  FROM TABLE(SNAP_GET_DB('', -2))"
TOTAL_LOG_AVAILABLE
--------------------
            52988000
  1 record(s) selected.

 

Then,

$ db2 get db cfg for sample |grep LOGSECOND
 Number of secondary log files               (LOGSECOND) = -1
 

$ db2 "select TOTAL_LOG_AVAILABLE  FROM TABLE(SNAP_GET_DB('', -2))"
TOTAL_LOG_AVAILABLE
--------------------
                   -
  1 record(s) selected.

 

This is  a  normal output  when  LOGSECOND is set to  -1.

To avoid this confusion it's  suggested to set the value to something specific instead of  -1 

 

 

 

 

 

 

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm11139908