db2.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. .. _data_Db2:
  2. Db2
  3. ===
  4. .. note:: GeoServer does not come built-in with support for Db2; it must be installed through an extension. Proceed to :ref:`Db2_install` for installation details.
  5. The Db2 spatial support implements the OGC specification "Simple Features for SQL using types and functions" and the ISO "SQL/MM Part 3 Spatial" standard. When installing Db2 on Linux, Unix and Windows platforms, the "custom" option must be selected and the server spatial support included.
  6. A free of charge copy of Db2 can be downloaded from https://www.ibm.com/analytics/db2/trials.
  7. .. _Db2_install:
  8. Installing the Db2 extension
  9. ----------------------------
  10. .. warning:: Due to licensing requirements, not all files are included with the extension. To install Db2 support, it is necessary to download additional files. **Just installing the Db2 extension will have no effect.**
  11. GeoServer files
  12. ```````````````
  13. #. From the :website:`download` page locate the release of GeoServer you are running and download the Db2 extension: :download_extension:`db2`
  14. .. warning:: Ensure to match plugin (example |release| above) version to the version of the GeoServer instance.
  15. #. Extract the contents of the archive into the :file:`WEB-INF/lib` directory of the GeoServer installation.
  16. Required external files
  17. ```````````````````````
  18. The Db2 JDBC driver is not packaged with the GeoServer extension: :file:`db2jcc4.jar`. This file should be available in the :file:`java` subdirectory of your Db2 installation directory. Copy this file to the ``WEB-INF/lib`` directory of the GeoServer installation.
  19. After all GeoServer files and external files have been downloaded and copied, restart GeoServer.
  20. Adding a Db2 data store
  21. -----------------------
  22. When properly installed, :guilabel:`Db2` will be an option in the :guilabel:`Vector Data Sources` list when creating a new data store.
  23. .. figure:: images/db2create.png
  24. :align: center
  25. *Db2 in the list of raster data stores*
  26. Configuring a Db2 data store
  27. ----------------------------
  28. .. figure:: images/db2configure.png
  29. :align: center
  30. *Configuring a Db2 data store*
  31. Configuring a Db2 data store with JNDI
  32. --------------------------------------
  33. Notes on usage
  34. --------------
  35. Db2 schema, table, and column names are all case-sensitive when working with GeoTools/GeoServer. When working with Db2 scripts and the Db2 command window, the default is to treat these names as upper-case unless enclosed in double-quote characters but this is not the case in GeoServer.