Troubleshooting

Problems sometimes arise when attempting to connect to an DB2 Spatial database. This is almost always due to a misconfiguration in the user’s environment. The following suggestions can often help detect and overcome such problems.

  • Ensure you can connect to the database with the data source name, username, and password using DB2 Command Line processor.
  • Ensure that you have the correct version of the DB2 client software installed.
  • Ensure that the appropriate version of DB2 Spatial Extender is installed and the database is ‘Spatially enabled’. If you get an error which says something like “DB2GSE.*.. is an undefined name”, then it is most likely that the database is not enabled for spatial operations. For enabling a DB2 database for spatial operations, please refer to IBM DB2 Spatial Extender User’s Guide and Reference.
  • Ensure that you have the appropriate privileges to perform the operations like creating, dropping, inserting into, and deleting from tables when writing. DBADM privileges may be required to create indexes. Please check the DB2 database manuals for more information.
  • When reading/writing large volumes of data, please ensure that the database configuration parameters are set for large data processing. For example, when reading/writing large volumes of data, failure may occur due to “app_ctl_heap_sz” and/or “logprimary” parameters not set to appropriate values. Most database errors will be logged as obtained from the database. Some error messages may not immediately imply the actual problem. For such messages, please refer to DB2 database manuals.
  • If offset and scale values are not chosen appropriately for the dataset, some or all geometries may be rejected. Error messages may not indicate the actual problem. For example, not choosing an appropriate scale may result in duplicate coordinates and the error message may be “not enough points” or “polygon intersects itself”. Please refer to the IBM DB2 Spatial Extender User’s Guide and Reference manual for the resolution of such errors.