This topic explains how to configure LabKey server to retrieve and display data from Microsoft SQL Server as an
external data source.
(Microsoft SQL Server can also be used as LabKey Server's primary database server. For more information see
Install Microsoft SQL Server.)
The MS SQL Server Driver
Use the jTDS JDBC driver for MS SQL Server.
Download the driver from
jTDS JDBC.
Place the driver JAR file in your Tomcat library path:
Configure the MS SQL Server Data Source
Add a <Resource> element to your installations 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/mssqlDataSource" auth="Container"
type="javax.sql.DataSource"
username="USERNAME"
password="PASSWORD"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://localhost:1433/DATABASE_NAME"
maxActive="20"
maxIdle="10"
accessToUnderlyingConnectionAllowed="true"
validationQuery="SELECT 1"/>
Define a New Schema
Now define a new schema from the SQL Server data source. For details see
Set Up an External Schema
Related Topics