This topic explains how to configure LabKey server to retrieve and display data from an Oracle database as an external data source.

Thanks to Trent Schafer and the University of New South Wales for developing and contributing support for Oracle data sources!

Oracle JDBC Driver

LabKey Server requires the Oracle JDBC driver to connect to Oracle databases. The driver can be downloaded from the Oracle JDBC/UCP Download page. It is not redistributed with LabKey Server due to licensing restrictions, but it can be downloaded and used for free.

Note: To download this driver, you are required to accept the license agreement, and have an Oracle Web account (which is free). At the moment, you must use the Oracle Database 12c Release 1 JDBC driver, the only Oracle driver that supports Java 8.

Download the file: ojdbc7.jar and place it in your Tomcat library path:

<tomcat home>/lib

Configure the Oracle Data Source

Add a <Resource> element to your installation's labkey.xml configuration file. Use the template below as a general starting point, replacing the words in capitals with their appropriate values.

<Resource name="jdbc/oracleDataSource" auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:USERNAME/PASSWORD@SERVER:PORT:SID"
maxActive="8"
maxIdle="4" accessToUnderlyingConnectionAllowed="true"/>

Note: The username and password have been included in the connection URL for debugging purposes. You can remove the USERNAME/PASSWORD portion from the URL and include them in their own fields, but if you do, any debug information will only have the SID name and not the actual schema name. Refer to Oracle FAQs: JDBC for other Oracle JDBC URL syntax.

Define a New Schema

Now define a new schema from the Oracle data source. For details see Set Up an External Schema

Related Documents


previousnext
 
expand allcollapse all