Category: Troubleshooting

2

Binding DB2 Base Packages for Various Versions

When connecting between different versions of DB2, you generally need to bind packages from the different versions against the DB2 database. Just because you’ve bound db2ubind and db2cli on the server does not mean that all possible clients connecting in are covered. Sometimes binds happen implicitly, but sometimes they don’t. And you don’t necessarily want to grant a user rights...

select2 2

DB2 Administrative SQL Cookbook: Finding Problem SQL in the Package Cache

I wrote a developerWorks article on finding problem SQL in your package cache. But I refine and play with my SQL over time, so I thought I’d share the version I’ve been using recently. Purpose To find problem SQL in the Package Cache across several importance performance categories. Computes how bad a particular statement is in comparison to other statements...

2

Querying Tables for an Activity Event Monitor

I’ve been working with a developer to profile some SQL from a process he’s running. He has no insight into the SQL that the tool is using, primarily to insert data. I thought I’d share some of the details. I still think of this kind of event monitor as a “Statement Event Monitor”. Setup I started with the same exact...

0

Tracking Table Activity using Triggers

There are a number of situations in which a DBA may need to deterimine when data in a table is being inserted or changed. The most obvious tool for tracking this may be using the db2 auditing facility. If you haven’t looked at audit for a while, it has been significantly improved in more recent versions, and you can limit...

1

DB2 Quick Tip: Checking Connection State

Sometimes the connection state is unclear. The following can all make it fuzzy wether or not you have a valid connection: A db2 error or warning related to your connection A system error related to network connectivity Changing VPNs or adding a VPN connection Leaving a connection up overnight or over longer periods This tip is strictly related to the...

1

Example of A Clustering Low-Cardinality Index Helping Query Performance

The request from the developers was something along the lines of “Help, Ember, this query needs to perform better”. Sometimes the query I’m working on is not one that shows up as a problem from the database administrator’s perspective, but one that is especially important in some part of application functioning. In this case, this query is related to the...

4

DB2 Basics: db2top

There are a lot of things I can cover on db2top, and probably more tips and tricks using db2top than many other tools out there. Searching the web on db2top gets more good results than on many other db2 topics. I thought I’d start with some of the basics. Using db2top requires some general knowledge of how db2 works. I...