Question & Answer
Question
How to resolve SQL20569N error for external table operation ?
Answer
When you are trying to create external table you may receive following error:
$ db2 "create external table '/scratch/test/test.tbl' as select * from Table1;"
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
SQL20569N The external table operation failed due to a problem with the corresponding data file or diagnostic files. File name: "/scratch/test/test.tbl". Reason code: "1". SQLSTATE=428IB
We receive this error because we are trying to create external table in different path where it is not allowed.
How to check path which is allowed to create external tables:
$ db2 get db cfg | grep -i external
Allowed paths for external tables (EXTBL_LOCATION) = /mnt/blumeta0/home;/mnt/bludata0/scratch
From the above we see the paths where it is allowed to create external tables:
/mnt/blumeta0/home
/mnt/bludata0/scratch
Specify one of the above path while create external table:
Example:
$ db2 "create external table '/mnt/bludata0/scratch/test.tbl' as select * from Table1;"
DB20000I The SQL command completed successfully.
Was this topic helpful?
Document Information
Modified date:
17 October 2019
UID
ibm10730231