DB2 Version 9.7 for Linux, UNIX, and Windows

LOG_UTILIZATION administrative view - Retrieve log utilization information

The LOG_UTILIZATION administrative view returns information about log utilization for the currently connected database. A single row is returned for each database partition.

The schema is SYSIBMADM.

Authorization

One of the following authorizations is required:
  • SELECT privilege on the LOG_UTILIZATION administrative view
  • CONTROL privilege on the LOG_UTILIZATION administrative view
  • DATAACCESS authority
In addition, to access snapshot monitor data, one of the following authorities is also required:
  • SYSMON
  • SYSCTRL
  • SYSMAINT
  • SYSADM

Example

List the log utilization for the currently connected database, SAMPLE.
SELECT * FROM SYSIBMADM.LOG_UTILIZATION
The following example is a sample output for this query.
DB_NAME  ... LOG_UTILIZATION_PERCENT TOTAL_LOG_USED_KB    ...   
-------- ... ----------------------- -------------------- ...   
SAMPLE   ...                    9.75                 1989 ...   
                                                          ...   
  1 record(s) selected.                                   ...   
Output for this query (continued).
... TOTAL_LOG_AVAILABLE_KB TOTAL_LOG_USED_TOP_KB DBPARTITIONNUM  
... ---------------------- --------------------- --------------  
...                  18411                  1990              0  
...                                                              
...                                                              

Usage note

For databases that are configured for infinite logging, the LOG_UTILIZATION_PERCENT and TOTAL_LOG_AVAILABLE_KB will be NULL.

Information returned

Table 1. Information returned by the LOG_UTILIZATION administrative view
Column name Data type Description or corresponding monitor element
DB_NAME VARCHAR(128) db_name - Database name
LOG_UTILIZATION_PERCENT DECIMAL(5,2) Percent utilization of total log space.
TOTAL_LOG_USED_KB BIGINT total_log_used - Total log space used . This interface returns the value in KB.
TOTAL_LOG_AVAILABLE_KB BIGINT total_log_available - Total log available . This interface returns the value in KB.
TOTAL_LOG_USED_TOP_KB BIGINT tot_log_used_top - Maximum total log space used . This interface returns the value in KB.
DBPARTITIONNUM SMALLINT The database partition from which the data was retrieved for this row.