Troubleshooting

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

  • Ensure you can connect to the database using the DB2 Command Line Processor. This ensures that the database is reachable.
  • Ensure you can connect to the database with the ODBC Data Source Name (for example, by clicking the “Connect” button in the ODBC control panel, and supplying a username and password if needed).
  • Ensure that you have the correct version of the DB2 client software installed.
  • If your FME is 32 bits, you must install the 32-bit DB2 client software. Likewise, if your FME is 64 bits, you must install the 64-bit DB2 client software.
  • 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 operations like creating tables, dropping tables, and inserting into and deleting from tables. 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 verbatim. Some error messages may not directly reflect the underlying 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 problem. For example, not choosing an appropriate scale may result in duplicate coordinates and the error message may be Too few 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.
  • When writing a geometry via a SQL statement, please ensure that the SRID supplied in the geometry constructor matches the SRID of the target spatial column.