75 ways to demystify DB2: #24: Techtip: SQL10004C An I/O error occurred while accessing the database directory. SQLSTATE=58031
Mayooran 2700069HTP Comments (2) Visits (10281)
Getting SQL10004C An I/O error occurred while accessing the database directory?
The reason for SQL10004C may vary. Possible reasons are:
- sqldbdir being corrupted
- incorrect permission or access issues to the sqldbdir file under database directory
Another possible cause is that the system may have been maxed out of available file handles. If you scan the /var/log/messages, you may see an error during the same time frame you got SQL10004C error.
kernel: VFS: file-max limit ### reached , where the ### is the fs-max set on the system.
How to confirm and fix it?
To determine the maximum number of file handles for the entire system, run:
If the # reported in /var/log/messages is same as this number, then we know the system has reached the maximum number of file handles and we need to increase it.
MESSAGE : ZRC=
Check for VFS: file-max limit error in /var/log/messages as well. If it matches the timestamp of the diag then the reason why db2 reported this error is due to the fact it didn't have enough file handlers.