HOW TO: Connecting to SQL Server from EXASOL

Here’s how¬†to connect EXASOL to SQL Server.

To do this I created a connection. The following connection from EXASOL connects to the default instance of SQL Server.

CREATE CONNECTION SQLDB_CONNECTION
TO 'jdbc:sqlserver://192.168.0.2;databaseName=My_SQLDB'
USER 'sa'
IDENTIFIED BY '********';

If you are not connecting on the default port, stipulate the port with a colon as follows.

CREATE CONNECTION SQLDB_CONNECTION
TO 'jdbc:sqlserver://192.168.0.2:1435;databaseName=My_SQLDB'
USER 'sa'
IDENTIFIED BY '********';

Finally, use the connection as follows.

IMPORT INTO MYSCHEMA.MYTABLE
FROM JDBC DRIVER='MSSQL'
AT SQLDB_CONNECTION TABLE SQLSERVERTABLE;