Working with Oracle data¶
OpenGeo Suite can read and publish data from an Oracle Spatial database. Any table that has a valid geometry column can be published as a layer in GeoServer.
Note
Oracle format support is only available with OpenGeo Suite Enterprise. For more information on OpenGeo Suite Enterprise, please contact us.
Installing Oracle support is the same with most OpenGeo Suite Extensions but with an important additional step required at the end.
The first task is to install the OpenGeo Suite extension. But because of licensing issues, an additional file is required to be installed, and this must be done manually.
Installing Oracle support¶
Windows¶
The Oracle extension can be added during the installation process. On the Components page, check the box for Oracle, in the section named GeoServer Extensions.
Note
If OpenGeo Suite has already been installed, and you wish to install Oracle support at a later time, simply run the installer once more and uncheck all other items except for Oracle. This will add Oracle support to the existing OpenGeo Suite installation.
Next, copy the Oracle JDBC driver from your Oracle installation to the GeoServer library directory. This file, often named
ojdbc##.jar
, can be found either on the installation media or by doing a search on the system that includes Oracle. To find the target, open the directory that contains your OpenGeo Suite installation (typically something likeC:\Program Files\Boundless\OpenGeo\
), navigate to the GeoServer Data Directory and then to .After the file is copied, restart GeoServer. This can be done from the Start Menu by navigating to Stop and then Start shortcuts, or by restarting the OpenGeo Jetty service in the Windows Services dialog.
and using the
OS X¶
The Oracle extension can be added to OpenGeo Suite by copying the contents of the
oracle
extension folder (not the folder itself) to the GeoServer library folder. The GeoServer library folder can be found by selecting Open Webapps Directory from the GeoServer menu and then navigating to .Next, copy the Oracle JDBC driver from your Oracle installation to the same directory. This file, often named
ojdbc##.jar
, can be found either on the installation media or by doing a search on the system that includes Oracle.Restart GeoServer. The easiest way to do this is to select Quit GeoServer from the GeoServer menu and then relaunch the application.
Ubuntu Linux¶
The Oracle extension can be added to OpenGeo Suite by installing the
geoserver-oracle
package:apt-get install geoserver-oracle
Note
This command will need to be run as root or with sudo.
Next, copy the Oracle JDBC driver from your Oracle installation to the GeoServer library directory. This file, often named
ojdbc##.jar
, can be found either on the installation media or by doing a search on the system that includes Oracle. The target in most installations will be/usr/share/opengeo/geoserver/WEB-INF/lib/
.Restart the Tomcat service.
Red Hat Linux¶
The Oracle extension can be added to OpenGeo Suite by installing the
geoserver-oracle
package:yum install geoserver-oracle
Note
This command will need to be run as root or with sudo.
Next, copy the Oracle JDBC driver from your Oracle installation to the GeoServer library directory. This file, often named
ojdbc##.jar
, can be found either on the installation media or by doing a search on the system that includes Oracle. The target in most installations will be/usr/share/opengeo/geoserver/WEB-INF/lib/
.Restart the Tomcat service.
Application servers¶
- The Oracle extension can be added to OpenGeo Suite by copying the contents of the
oracle
extension folder (not the folder itself) to the GeoServer library directory. If GeoServer is installed at/opt/tomcat/webapps/geoserver
, the GeoServer library directory will be found at/opt/tomcat/webapps/geoserver/WEB-INF/lib
. - Next, copy the Oracle JDBC driver from your Oracle installation to the same directory. This file, often named
ojdbc##.jar
, can be found either on the installation media or by doing a search on the system that includes Oracle. - Restart GeoServer or the application server.
Verifying installation¶
To verify that the extension has been installed properly:
Log in to the GeoServer web interface.
Click Stores then Add new store.
In the list of Vector data stores, you should see three entries:
- Oracle
- Oracle (JNDI)
- Oracle (OCI)
If you don’t see all of these entries, the extension did not install completely. In most cases, it is the plain Oracle option that is desired.
Note
If you see entries named Oracle NG, they are the correct entries. The NG
part can be ignored.
Caveats¶
Oracle data will be assumed to be point geometries, so new layers will be styled accordingly. Data can be rendered as intended by changing the styling of the layer to use the correct geometry.