Microsoft SQL Server

This section describes how to connect Microsoft SQL Server with Exasol. To view the SQL Server to Exasol migration script, refer to the GitHub repository.

Additionally, you can also use the jTDS driver, which is an open source Java type 4 JDBC driver for Microsoft SQL Server, to connect to Exasol.

Download Driver

You can download the JDBC driver for SQL Server from the Microsoft JDBC download page.

You can download the jTDS driver for SQL Server from the Sourceforge website.

Configure JDBC Driver in EXAoperation

Follow these steps to configure the JDBC driver for SQL Server in EXAoperation:

  1. Log in to EXAoperation user interface as an Administrator user.
  2. Select Configuration > Software and click the JDBC Drivers tab.
  3. Click Add to add the JDBC driver details.
  4. Enter the following details for the JDBC properties:
    • Driver Name: MSSQL
    • Main Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    • Prefix: jdbc:sqlserver:
    • Disable Security Manager: Don't select this option.
    • Comment: This is an optional field.
  5. Click Add to save the settings.
  6. Select the radio button next to the driver from list of JDBC driver.
  7. Click Choose File to locate the downloaded driver and click Upload to upload the JDBC driver.

Configure jTDS JDBC Driver in EXAoperation

Follow these step to configure the jTDS JDBC driver in EXAoperation:

  1. Log in to EXAoperation user interface as an Administrator user.
  2. Select Configuration > Software and click the JDBC Drivers tab.
  3. Click Add to add the JDBC driver details.
  4. Enter the following details for the JDBC properties:
    • Driver Name: JTDSMSSQL
    • Main Class: net.sourceforge.jtds.jdbc.Driver
    • Prefix: jdbc:jtds:sqlserver:
    • Disable Security Manager: Don't select this option.
    • Comment: This is an optional field.
  5. Click Add to save the settings.
  6. Select the radio button next to the driver from list of JDBC driver.
  7. Click Choose File to locate the downloaded driver and click Upload to upload the JDBC driver.

For additional information, refer to the JTDS Driver section in the Best Practice for IMPORT/EXPORT with SQL Server knowledgebase article.

Run Statement for MSSQL JDBC Driver

Run the following statement to create a connection.

CREATE OR REPLACE CONNECTION JDBC_SQLSERVER
    TO 'jdbc:sqlserver://192.168.99.100:1433;databaseName=master;instance=v1'
    USER 'user'
    IDENTIFIED BY 'Password';

Run the following statement to test the connection.

select * from 
(
import from JDBC at JDBC_SQLSERVER
statement 'select ''Connection works'' '
);

Run Statement for jTDS JDBC Driver

The jTDS connection string format used to connect to SQL Server is as follows: 

jdbc:jtds:sqlserver://{SERVER_NAME};databaseName={DATABASE_NAME);instance={INSTANCE}

Run the following statement to create a connection.

CREATE OR REPLACE CONNECTION JDBC_SQLSERVER
    TO 'jdbc:jtds:sqlserver://192.168.99.100:1433;databaseName=master;instance=v1'
    USER 'user'
    IDENTIFIED BY 'Password';

Run the following statement to test the connection.

select * from 
(
import from JDBC at JDBC_SQLSERVER
statement 'select ''Connection works'' '
);