Personal tools
You are here: Home DB2 DB2 UDB v9 How to check the log space usage
Navigation
Log in


Forgot your password?
 
Document Actions

How to check the log space usage

A database log full condition effects all of the update transactions
using the database. This query checks the vital statistics for database
log space, including how much is currently being used and how much is still
available. The High Water Mark for log space usage is shown, so that you can
properly set your log space parameters, logprimary, logsecond and logfilsiz.
The query uses the SYSIBMADM.SNAPDB view to retrieve database snapshot
statistics for the current and maximum log space utilization.

db2 "select int(total_log_used/1024/1024) as Log_Used_Meg, \
int(total_log_available/1024/1024) as Log_Space_Free_Meg, \
int((float(total_log_used) /float(total_log_used+total_log_available))*100) \
as Percent_Used,int(tot_log_used_top/1024/1024) as Max_Log_Used_Meg, \
int(sec_log_used_top/1024/1024) as Max_Secundary_Used_Meg, \
int(sec_logs_allocated) as Secondaries from sysibmadm.snapdb"


The following is an example of the output for this query:

LOG_USED_MEG LOG_SPACE_FREE_MEG PERCENT_USED MAX_LOG_USED_MEG   MAX_SECUNDARY_USED_MEG SECONDARIES
--------------------  ------------------------------ ----------------- -------------------------------  ------------------------------------ -------------------
                     12                                 843                     1                                    61                                             0                     0

Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls