Microsoft SQL Server is a Relational Database Management System (RDBMS) developed by Microsoft.
First download the jTDS JDBC driver.
- Create a bucket in BucketFS
- Upload the driver to BucketFS
Upload the latest available release of Virtual Schema JDBC Adapter to Bucket FS.
Then create a schema to hold the adapter script.
CREATE SCHEMA ADAPTER;
The SQL statement below creates the adapter script, defines the Java class that serves as entry point and tells the UDF framework where to find the libraries (JAR files) for Virtual Schema and database driver.
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-1.19.2.jar;
%jar /buckets/<BFS service>/<bucket>/jtds.jar;
/
Define the connection to SQL Server as shown below. We recommend using TLS to secure the connection.
CREATE OR REPLACE CONNECTION SQLSERVER_CONNECTION
TO 'jdbc:jtds:sqlserver://<server name>:<port>/<database name>'
USER '<user>'
IDENTIFIED BY '<passsword>';
Below you see how an SQL Server Virtual Schema is created.
CREATE VIRTUAL SCHEMA <virtual schema name>
USING ADAPTER.JDBC_ADAPTER
WITH
SQL_DIALECT = 'SQLSERVER'
CONNECTION_NAME = 'SQLSERVER_CONNECTION'
CATALOG_NAME = '<catalog name>'
SCHEMA_NAME = '<database name>';
The SQL Server Dialect was tested with the jTDS 1.3.1 JDBC driver and SQL Server 2014.