AngocA
AngocA

Reputation: 7693

Quantity of transaction logs used per application/connection in DB2

I would like to know the quantity of logs used (active logs) by each connection in the database.

I know how to retrieve the quantity of active logs for the database, but not for each application. Knowing the quantity of active logs in the database helps me to identify if a log-full condition is approaching.

However, I want to know which application is approaching to this condition of log-full. For this reason, I need to know how much log is used by each transaction (each application), but I have not found a view, snapshot or something else for each application.

Any ideas?

Upvotes: 0

Views: 876

Answers (1)

mustaccio
mustaccio

Reputation: 19001

Logs are used by transactions (units of work), not connections, so -- something like this, may be?

select 
  application_handle, uow_log_space_used 
from 
  table(sysproc.mon_get_unit_of_work(null,null))
order by 2 desc
fetch first 5 rows only

Upvotes: 3

Related Questions