After a fresh install of DB2 Express C (free download from IBM) 9.5.2 on Linux AMD 64bit, I got the following error trying to load some tables for testing:

SQL3500W  The utility is beginning the "LOAD" phase at time "01/22/200907:40:27.557594".SQL0958C  The maximum number of open files has been reached.  SQLSTATE=57009

After some investigation, I found that the following 3 places impact the open files:

  • /etc/security/limits.conf
  • /proc/sys/fs/file-max & /etc/sysctl.conf & sysctl -w fs.file-max=xxxx
  • DB2 Config parameter MAXFILOP (max on Linux 64 is 61440)

Once all these are correclty set, things should run smoothly.  Remember to restart the instance. 

In addition, if you are using NFS, either for the core database or for the files involving LOAD, EXPORT, BACKUP, RESTORE, make sure that nfslock is running:

chkconfig nfslock onservice nfslock start