[IBM][CLI Driver] SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031

By Kwok WhyeNo Comments

Recently, I have started to work on IBM DB2 database , which is another giant database creature that I haven’t touch in my life before.

However , it is a good experience and it extends my knowledge on another type of database. One of the issues that I spent quite a lot of time to research and fix is the error in the title of this article.

Error Message

[IBM][CLI Driver] SQL1031N  The database directory cannot be found on the indicated file system.  SQLSTATE=58031

Symptom

It sounds like the error is something to do with the database itself. However, in fact, the resolution for this issue has nothing to do about the database itself.It is related with the client environment that try to connect to the DB2 database server.

The following are the scenario when I faced this issue.

  • I am trying to connect to database ABC on DB2 database instance DB2 through window ODBC on my laptop. DB2 database are hosted on Server CDE, and I am connect through my laptop EFG.
  • The window ODBC configuration are setup correctly and you can received ” Connection Tested Successfully” when you try to connect.
  • When you try to run Command Line Processor ( CLP ) with the following commands, it can connect without problem and I can even list the table using db2 list tables .

db2 connect to ABC user DB2ADMIN using DB2ADMIN

  • At my laptop EFG, only IBM ODBC driver was installed.
  • The DB2 version is 10.1.4.

Resolution

After quite number of researches, I found that the resolution is relatively simple. I tested it and it proved to fix.

The window account at my laptop EFG, will have to have access to the ODBC driver to be able to connect to it successfully.

For examples, if my window account login is XOX, I have to perform the following steps to fix this issue.

  • Press window key + R. On run, type compmgmt.msc.  It will lead you to computer manager. Go to Local User  and Groups > Groups, click on DB2ADMNS. Double click it and add user XOX into it. Click ok to apply.
  • Click on DB2USERS again. Add user XOX into it. Click ok to apply.
  • After this, restart laptop EFG and try again. ( It must be restarted. I tested it won’t work if it is not restart. ).

After restart, this issue should have fix. If not, the problem you face might be different with the scenario I mentioned above.

If this article helps you  or any suggestion on this articles, please feel free to comments. :) Happy troubleshooting.

 

 

Database, IBM DB2

Leave your Comment

Your email address will not be published. Required fields are marked *


six × 9 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Blue Taste Theme created by Jabox