SQLEUCCM error message for DB2

Posted on Tue 18 October 2005 in Databases

Hopefully this proves useful to someone else in the same position in the future... I have been working on a simple PHP application that connects to DB2 using the ibm_db2 extension. Recently I decided to try scaling it up to test the application with a more realistic (10GB) database.

I created a new test database on a partition that had enough room, but then encountered a very strange error message just trying to connect to the database:

[IBM][CLI Driver] SQL0969N There is no message text corresponding to SQL error "-2079391743" in the message file on this workstation. The error was returned from module "SQLEUCCM" with original tokens "". SQLCODE=-2079391743

Needless to say, this message really didn't help me much. Googling and Yahooing for the terms also gave me no useful results (there was a thread on the International DB2 User Group mailing list, but the site requires a user ID and login and I just wanted to get on with my day). The DB2 support site didn't provide any hits, and neither did the DB2 Information Center.

It took me a while to figure this out, but apparently the ownership and permissions on the directory that contains your tablespaces (if you're using filesystem-based, or "system managed" tablespaces) have to be "just so". DB2, for the uninitiated, uses operating system accounts and groups for database authentication and privileges. My DB2 instance user was "db2inst1", belonging to the "db2iadm1" group -- default values -- however, the directory in which I created the tablespaces belonged to user "dan" and group "db2iadm1".

localhost php4 # ls -l /opt/photos/db2base -ddrwxrwxrwx  3 dan db2iadm1 72 Oct 18 10:35 /opt/photos/db2base

Okay, so even though the db2inst1 user is a member of the db2iadm1 group, DB2 apparently also wants it to own the directory in which the tablespaces live. By issuing a "chown db2inst1 /opt/photos/db2base" command, DB2 was satisfied and my PHP scripts started working again. And maybe, just maybe, the next user that runs into this problem will find this post in a search engine and save themselves an hour or two of befuddlement...

DB2