Quantity of transaction logs used per application/connection in DB2

走远了吗. 提交于 2020-01-17 12:37:52

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!