问题
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?
回答1:
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
来源:https://stackoverflow.com/questions/30385577/quantity-of-transaction-logs-used-per-application-connection-in-db2