SQL10004C An I/O error occurred while accessing the database directory

February 18, 2005

If there were no changes made to the Hardware. Then its most likely that the database directory file sqldbdir is corrupted.

You will not be able to create new databases, connect to or drop existing databases.


  • Move all the files found in “sqllib/sqldbdir” to a different location.
  • Now catalog all the databases. For Local databases use: db2 catalog db “dbname”.
  • This should get ride of the error.


I received this error after *successful* installation of DB2 8.1 fixpak 7a on DB2 8.1 Fixpak 2 OS AIX 5.3.

posted in DB2 by Visu

Follow comments via the RSS Feed | Leave a comment | Trackback URL

3 Comments to "SQL10004C An I/O error occurred while accessing the database directory"

  1. Michael wrote:

    Same thing happened to me. Upgraded from FP3 to FP7a on AIX 5.2 and hit the same problem.

  2. Visu wrote:


    Where you able to resolve with the solution provided?

  3. Brad Radaker wrote:

    I had the same thing happen. I am using Windows instead of Unix but I believe the issue is the same in either case. But there is something left out of the explanation. When this happens the local database directory is usually okay. But the system directory is corrupted. So what you need to do is rename all the files that are under the SQLDBDIR directory under Program FilesIBMSQLLIB (or Program FilesSQLLIB, depending on where your IBM program files were in the previous version of DB2). The local database directory is under the SQLDBDIR that is under the DB2 directory, and that is okay. Of course, if you are using Unix instead of Windows, these directories might be located in different locations, but the idea is the same. There are two different SQLDBDIR directories. Only the files in one of those directories are corrupt. You need to:

    1. Stop the DB2 instance.
    2. Rename those files in the proper SQLDBDIR directory.
    3. Restart DB2.
    4. Catalog the local databases again (DB2 CATALOG DB [name] on [drive]).

    That fixed my problem. Incidentally, It’s not like I just guessed all of that. I just got off the phone with an IBM support rep who walked me throught it all. Just thought I would share it with you guys since I tried doing the steps listed above but they were not detailed enough.

Leave Your Comment

Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org