JDBC drivers

Before you can connect a database server with instantOLAP or any other Java application, you need a to install a matching database driver. For Java systems, you will need a driver which implements the Java JDBC standard and almost all database vendors provide a JDBC driver for their product.

Because of copyright reasons, only a few drivers are included in the instantOLAP standard distribution (an open source driver for Sybase and Microsoft SQL-Server and a second driver for HSQLDB databases). For all other database servers, you can find the driver in the internet. This is a list of the common database servers and some internet addresses where to find the driver.

[toc]

How to install a new driver under Tomcat

If you use Apache Tomcat as your Application Server (which is the default Application Server installed together with instantOLAP), installing a new driver is very simple:

  1. Download the driver from the vendors driver page
  2. If neccesary, extract the driver or execute the driver installer to extract the driver files onto your hard disk.
  3. Locate the driver files (they always end with .jar) and copy them into the library folder of your Tomcat server. Depending on the Tomcat version, the library folder is <tomcat>/common/lib (for Tomcat 5.5) or <tomcat>/lib (for Tomcat 6)
  4. Restart Tomcat

How to use drivers in instantOLAP

After you installed the driver in your Application Server you can use from instantOLAP. Generally there are two different ways to access a driver or database: You can connect the server directly out of instantOLAP or you can use a predefined datasource, which has to be prepared inside the Application Server. For testing, developing or small installations, we recommend the first alternative.

To connect a database directly out of instantOLAP, simply use the „Add datasource“ button when you are inside the „Datasources“ section of a configuration. This will open a datasource wizard, which asks you for the name, driver, connection URL and credentials of the target database. Refer our online documentation for more details.

JDBC drivers for database servers

Microsoft SQL-Server

There are at least two good drivers for the Microsofts SQL-Server: The original Microsoft JDBC driver and the open source driver jDTS for Microsoft SQL and Sybase databases, which is included in the instantOLAP standard distribution.

Microsoft SQL-Server (original driver)

The original Microsoft JDBC driver can be found and downloaded from the Microsoft page.

  • Download: Microsoft SQL Server JDBC Driver 2.0
  • Driver file(s): sqljdbc.jar
  • Driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
  • Connection-URL: jdbc:sqlserver://<server>[:<port>];databasename=<database>

Escpecially in older versions of the originial driver, it is important to know how to form the connection URL. You must include the database name in your URL, otherwise you will be able to see the tables but not to access their content.

Microsoft SQL-Server (jDTS open source driver)

jDTS is an open source alternative for Microsoft SQL and Sybase databases and already included in the instantOLAP standard distribution.

  • Download: http://jtds.sourceforge.net
  • Driver files(s):  jdts-<version>.jar
  • Driver class: net.sourceforge.jtds.jdbc.Driver
  • Connection-URL: jdbc:jtds:sqlserver://<server>[:<port>][/<database>]

MySQL

When using MySQL databases, make sure to use the most current available driver version, because older drivers may cause problems with newer versions of the database.

Oracle

For Oracle databases it is imporant to use the correct version of the driver which matches the version of your database server. The drivers for all version can be downloaded from the Oracle page, but you will need to create an account before (if you don’t have already).

  • Download: Oracle JDBC/UCP Download Page
  • Driver file(s): ojdbc15.jar or ojdbc16.jar
  • Driver class: oracle.jdbc.driver.OracleDriver
  • Connection-URL: jdbc:oracle:thin:@<server>:1521:<database>

Sybase

Like in the case of Microsoft SQL Server, you can use the original Sybase driver or the open source driver jDTS to connect a Sybase driver.

Sybase (original Sybase driver jConnect)

  • Download: jConnect – Software Developer Kit
  • Driver file(s): jconn3.jar
  • Driver class: com.sybase.jdbc2.jdbc.SybDriver
  • Connection-URL: jdbc:sybase:Tds:<server>[:<port>]/<database>

Sybase (jDTS open source driver)

jDTS is an open source alternative for Microsoft SQL and Sybase databases and already included in the instantOLAP standard distribution.

  • Download: http://jtds.sourceforge.net
  • Driver file(s): jtds-<version>.jar
  • Driver class: net.sourceforge.jtds.jdbc.Driver
  • Connection-URL: jdbc:jtds:sybase://<server>[:<port>][/<database>]

IBM DB/2

For all current versions of DB/2 you can use the Universal Database Driver (UDB) from DB/2. However, when you wan’t to connect a DB/2 database running on a mainframe system, you’ll have to purchase an additional license from IBM.

  • Download: IBM – Application Development with DB/2 (Follow the links and download the DB/2 client)
  • Driver file(s): db2jcc.jar
  • Driver class: com.ibm.db2.jcc.DB2Driver
  • Connection-URL: jdbc:db2://<server>[:<port>]/<database>

Informix

Since IBM bought the Informix database, you can find the Informix drivers on the IBM homepage now, too:

  • Download: IBM Software Downloads
  • Driver file(s): ifxjdbc.jar
  • Driver class: com.informix.jdbc.IfxDriver
  • Connection-URL: jdbc:informix-sqli://<host>:<port>/<database>:informixserver=<dbservername>

Leave a comment