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 [...]

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 [...]

HADR Tools: the HADR Simulator

I have not made extensive use of the HADR Tools that IBM offers in the past. Most of my HADR setups to date have either been same-data-center using NEARSYNC or have used ASYNC to copy data between data centers. I haven't had much cause to tweak my network settings or change my SYNCMODE settings based [...]

Checking the Output of SQL Scripts and Commands for Errors

Many DBAs who have been DBAs for a while have been bitten by executing an SQL script, not thoroughly checking the output, and finding later that one or more statements in the SQL script failed. I have certainly been guilty of this at times. In Linux and UNIX, when a command is run, the OS [...]

DB2 Basics: Executing a Script of SQL

There are quite a few scenarios in which DBAs need to execute a script of SQL. Sometimes developers provide such a script to be executed. Sometimes we just have a large number of commands that need to be done as a whole. For Linux and UNIX systems the file name does not matter a bit. [...]

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 [...]

Quick Hit Tips – CPUSPEED, RESTRICTIVE, and DB2_WORKLOAD

Today we are going to talk about some random DB2 features that can’t stand in a blog of their own, but are worth discussing nonetheless. These are tidbits I had discovered during "DB2’s Got Talent" presentations, IDUG conferences, or “Hey, look what I discovered” moments. You blow past this setting every time you execute “db2 [...]

DB2 Error Logging

(Edited 8/12/2014 to add links to the old tutorials from IBM) There are a number of ways to cover error logging. I have covered some specific elements in previous posts, so I'm going for a more comprehensive approach in this post. There used to be this great "Problem Determination Mastery" certification available. The study material [...]

Bad Message Queue Handler. Sit. Stay.

There's an error message that appears in my db2 diagnostic logs rather frequently. It looks like this: 2014-07-30-13.34.58.446316+000 E1638372A476 LEVEL: Error (OS) PID : 32374944 TID : 1 PROC : db2 INSTANCE: db2inst1 NODE : 000 HOSTNAME: redacted EDUID : 1 FUNCTION: DB2 UDB, oper system services, sqlodque, probe:2 MESSAGE : ZRC=0x870F003E=-2029060034=SQLO_QUE_BAD_HANDLE "Bad Queue Handle" [...]

When Index Scans Attack!

We all know that table scans can be (but aren't always) a negative thing. I have spent less time worrying about index scans, though. Index access = good, right? I thought I'd share a recent scenario where an index scan was very expensive. Maybe still better than a table scan, but with one index, I [...]