Friday, May 20, 2016

DB2 Export error - SQL10018N The disk is full

While trying to run this export command
db2 "export to /filepath/schema.tablename.ixf of ixf messages v.msgs select * from wcsproln.catentryattr

I got this error "SQL10018N  The disk is full.  Processing was ended.

df -g showed that /proddump had 19 GB free space.

Looked into the db2diag log and found this:

2016-05-17-18.51.46.775102-240 E48658514A815      LEVEL: Error (OS)
PID     : 48627918             TID  : 1           PROC : db2bp
INSTANCE: db2inst1             NODE : 000
APPID   : *LOCAL.db2inst1.160517215412
EDUID   : 1
FUNCTION: DB2 UDB, oper system services, sqlowrite, probe:60
MESSAGE : ZRC=0x850F000C=-2062614516=SQLO_DISK "Disk full."
          DIA8312C Disk was full.
CALLED  : OS, -, write
OSERR   : EFBIG (27) "A file cannot be larger than the value set by ulimit."
DATA #1 : File handle, PD_TYPE_SQO_FILE_HDL, 8 bytes
0x0FFFFFFFFFFFE170 : 0000 0004 0000 0080                        ........
DATA #2 : unsigned integer, 8 bytes
34
DATA #3 : signed integer, 8 bytes
-1
DATA #4 : String, 105 bytes
Search for ossError*Analysis probe point after this log entry for further
self-diagnosis of this problem.

I did some research on this error message "A file cannot be larger than the value set by ulimit.” and found that file size limit set may be too low.

Command “ulimit -a” showed the limits set:

time(seconds)        unlimited
file(blocks)         2097151
data(kbytes)         131072
stack(kbytes)        32768
memory(kbytes)       32768
coredump(blocks)     2097151
nofiles(descriptors) 2000
threads(per process) unlimited
processes(per user)  unlimited

There are two ways to change these values:

  1. Edit the limits file under /etc/security/limits (takes effect after reboot) 
  2. Use the chuser command to change individual user settings (logout and login required)
Used the chuser command to change the fsize value:

chuser fsize=5000000 db2inst1

Logged off and logged back in and tried the export command. Voila !! It worked.

No comments: