IBM Support

SQL6028N trying to catalog local database and SQL1031 when running db2 "list db directory on .."

Troubleshooting


Problem

SQL1031N The database directory cannot be found on the indicated file system after db2start.

Symptom

When attempting to catalog the database on the file system you get SQL6028N

db2 "catalog db mydb on /home/db2inst1


 SQL6028N  Catalog database failed because database "MYDB" was not found in
 the local database directory.

When trying to list the content of the database directory path you get SQL1031N

db2 list db directory on /home/db2inst1


SQL1031N  The database directory cannot be found on the indicated file system. SQLSTATE=58031

Looking at the db2diag.log for additional information or clues, we see the following :


2013-06-25-16.20.05.336351-300 I104253E666         LEVEL: Warning
PID     : 4575                 TID  : 140361409922816PROC : java
INSTANCE: myinst               NODE : -001
FUNCTION: DB2 UDB, Connection Manager, sqleUCgetDirInfo, probe:1012
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
 sqlcaid : SQLCA     sqlcabc: 136   sqlcode: -1013   sqlerrml: 5
 sqlerrmc: SAMPLE
 sqlerrp : SQLEUCCM
 sqlerrd : (1) 0x00000000      (2) 0x00000000      (3) 0x00000000
           (4) 0x00000000      (5) 0x00000000      (6) 0x00000000
 sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)
           (7)      (8)      (9)      (10)        (11)
 sqlstate:

2013-06-25-16.20.05.342058-300 I104920E666         LEVEL: Warning
PID     : 4575                 TID  : 140361409922816PROC : java
INSTANCE: myinst               NODE : -001
FUNCTION: DB2 UDB, Connection Manager, sqleUCgetDirInfo, probe:1012
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
 sqlcaid : SQLCA     sqlcabc: 136   sqlcode: -1013   sqlerrml: 5
 sqlerrmc: SAMPLE
 sqlerrp : SQLEUCCM
 sqlerrd : (1) 0x00000000      (2) 0x00000000      (3) 0x00000000
           (4) 0x00000000      (5) 0x00000000      (6) 0x00000000
 sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)
           (7)      (8)      (9)      (10)        (11)
 sqlstate:

From the above messages we can see the the node number isn't getting picked up properly by the client, so it is defaulting to a node of -1, which isn't valid. DB2 will form NODE-001 in the path of the database as can be see from db2trc output below.

6606    entry DB2 UDB base sys utilities sqlegopn fnc (1.3.5.130.0)
        pid 8598 tid 140503614109472 cpid -1 node -1

        bytes 65

        Data1   (PD_TYPE_STRING,48) String:
        /home/myhome/db2/myinst/NODE-001/sqldbdir/sqldbdir
        Data2   (PD_TYPE_CHAR,1) ASCII Char:
        E

As a result, you will receive SQL6028N when cataloging the database and SQL1031N when you issue the db2 list db directory on <dir_name> commands

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Connectivity - Cataloging","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.7;9.5;9.1;10.1","Edition":"Advanced Enterprise Server;Enterprise Server;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
11 June 2026

UID

swg21642597