SHARE
Facebook X Pinterest WhatsApp

Using the Activity Monitor to Actively Monitor Application Locks

Apr 5, 2005

by Paul C Zikopoulos

One of the most frustrating tasks that database administrators (DBAs) have to perform is trying to figure out when one database application’s request is blocking another. Sure, most databases have built-in deadlock detectors and timeouts to help these sorts of issues work themselves out. However, being able to easily identify applications or requests that block others could significantly enhance the end-user experience of your system with minimal intervention. As any DBA who has ever had to deal with concurrency issues resulting from varying application locks can attest, investigating lock chains involves a significant annoyance factor and time investment.


The IBM DB2 Universal Database Version 8.2 for Linux, UNIX and Windows product (DB2 UDB) has a new wizard-driven feature called the Activity Monitor. In this article, I will introduce you to this tool’s blocking-resolution capabilities (it has others, which I will cover in future articles), and walk you through an example. Just think: a graphical view of locks and lock chains – I can see you smiling already!


A Little Blurb About the Activity Monitor


The Activity Monitor helps you improve the efficiency of database performance monitoring, problem determination, and resolution. By tracking a set of predefined monitor data, the Activity Monitor allows you to quickly locate the cause of the problem. You can then take direct action to resolve the problem or invoke another tool for further investigation.


The Activity Monitor can help you monitor application performance, application concurrency, resource consumption, and SQL statement usage. It can assist you in diagnosing database performance problems such as lock-waiting situations, and in tuning queries for optimal utilization of the database resources.


You can start the Activity Monitor by right-clicking your database in the Control Center and selecting Activity Monitor from the pop-up window, as shown in the figure below.




However, certain events triggered in the Health Center (for example, a locking event) will also give you the option to start this tool when you perform investigative work on the problem at hand. For many DBAs, the Health Center will likely be the launching point for this tool after they are notified about a locking issue, as shown below:




You can see in the preceding figure that there are too many applications that are waiting on locks. DB2 UDB has been configured to alert me if more than 75% of applications are waiting on locks. I could also configure a warning threshold that would alert me of a potential growing problem (an eventual alarm state) – the mixture of warnings and alarms is a great protective strategy.


From the Health Center, you use the Recommendation Advisor to have DB2 UDB help solve your blocking problem. Depending on how you respond to a number of questions, you could end up in the Activity Monitor as well. The Recommendation Advisor, which recommends using the Activity Monitor to investigate the locking problem at hand, is shown below:



Recommended for you...

Understanding Views in SQL
How do OODBMS and ORDBMS Differ from RDBMS?
Manoj Debnath
Feb 10, 2020
IBM Db2 for z/OS Useful Features
Lockwood Lyon
Aug 19, 2019
Doing Analytics Against Critical Production Data
Lockwood Lyon
Jul 29, 2019
Database Journal Logo

DatabaseJournal.com publishes relevant, up-to-date and pragmatic articles on the use of database hardware and management tools and serves as a forum for professional knowledge about proprietary, open source and cloud-based databases--foundational technology for all IT systems. We publish insightful articles about new products, best practices and trends; readers help each other out on various database questions and problems. Database management systems (DBMS) and database security processes are also key areas of focus at DatabaseJournal.com.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.