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.
Important: The LOG_UTILIZATION
administrative view is deprecated and has been replaced by the MON_TRANSACTION_LOG_UTILIZATION administrative view - Retrieve log utilization information.
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
- DBADM authority
- SQLADM authority
In addition, to access snapshot monitor data, one of the
following authorities is also required:
- SYSMON
- SYSCTRL
- SYSMAINT
- SYSADM
Default PUBLIC privilege
In a non-restrictive database, SELECT privilege is granted to PUBLIC when the view is automatically created.
Example
List the log utilization for the
currently connected database, SAMPLE.
SELECT * FROM SYSIBMADM.LOG_UTILIZATIONThe
following is an example of 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
| 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 | dbpartitionnum - Database partition number monitor element |
| MEMBER | SMALLINT | member - Database member monitor element |