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"
          DIA8555C An invalid message queue handle was encountered.
Read the rest Continue reading »

Quick Tip: Simple Errors on Database Connection

There are a couple of errors that you can get on database connection that simply mean you typed something wrong, but I figure there are people who will search on these errors, so I thought I would share. If you do not already have a database connection, you can get:

db2 conenct to SAMPLE
DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.
Read the rest Continue reading »

Scrambled Output from db2top

I don’t know about you, but I’m pretty addicted to db2top. I started using it way back when it was a download from Alphaworks. It is simply unparalleled for free real-time monitoring for DB2. No, it’s not full enough of a feature set to be your only monitoring tool, but I can barely troubleshoot a locking issue any more without it.… Read the rest

Continue reading »

Relocating the Instance Home Directory

Krafick_HeadshotSometimes you just have to think out of the box. Sometimes there isn’t an answer on google. Sometimes you have to bend the laws of physics to get the answer. Sometimes you get lucky.

I had a problem, I desperately needed to relocate where my instance was physically installed and move it from one filesystem to another.… Read the rest

Continue reading »

The Danger of FETCH FIRST ROW ONLY

There are a a vast array of things you can do in SQL. But just because you can doesn’t always mean that you should.

I recently ran into an interesting situation with FETCH FIRST ROW ONLY.

How the Problem Manifested

The day after new code was deployed, a production database system that usually runs with 40% CPU utilization or less was suddenly pegged at 100% CPU utilization.… Read the rest

Continue reading »

Using an Event Monitor to Capture Statements with Values for Parameter Markers

Recently, I needed to do some SQL profiling – discovering exactly what SQL a web application was executing against the database. I learned a lot, and when I learn a lot, I try to share with my readers.

I went into this exercise with two major misconceptions:

  1. A statement event monitor would collect parameter marker values
  2. Event monitor table output would be well documented and easy to figure out

I had the first misconception proven wrong pretty immediately.… Read the rest

Continue reading »