Interfaces for database monitoring

There are two ways to monitor operations in your database. You can view information that shows the state of various aspects of the database at a specific point in time. Or, you can set up event monitors to capture historical information as specific types of database events take place.

You can monitor your database operations in real-time using monitoring table functions. For example, you can use a monitoring table function to examine the total amount of space used in a table space. These table functions let you examine monitor elements and metrics that report on virtually all aspects of database operations using SQL. The monitoring table functions use a lightweight, high-speed monitoring infrastructure.

In addition to the monitoring table functions, snapshot monitoring routines are also available. However, the snapshot monitoring facilities use an older monitoring infrastructure and are no longer being enhanced. So, where possible, use the monitoring table functions instead.

For information on how to move from snapshot monitoring to the latest monitoring interfaces, see Db2 monitoring: Migrate from snapshot monitor interfaces to in-memory metrics monitor interfaces, on the Hybrid Data Management Community site.
Note: The new in-memory MON_ table functions provide monitoring for only the connected database, unlike the deprecated SNAP_GET_ table functions. This behavior provides much better security separation and significantly reduces the impact on system resources during monitoring collection. Snapshot monitoring routines enable users to monitor other databases within the same instance. Consider this when planning your move from snapshot monitoring.

Event monitors capture information about database operations over time, as specific types of events occur. For example, you can create an event monitor to capture information about locks and deadlocks as they occur in the system. Or, you might create an event monitor to record when a threshold that you specify (for example, the total processor time used by an application or workload) is exceeded. Event monitors generate output in different formats, and can write this output to regular tables. Some event monitors have additional output options.

IBM® InfoSphere® Optim™ Performance Manager provides a Web interface that you can use to isolate and analyze typical database performance problems. You can also view a summary of the health of your databases and drill down. For more information, see Monitoring with Optim Performance Manager.