-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
4febc54
commit c97fe48
Showing
22 changed files
with
14 additions
and
1,676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
# Exasol Virtual Schemas 6.0.0, released 2021-XX-XX | ||
|
||
Code name: Migrated Oracle and DB2 dialect implementations to their own repository. | ||
Code name: Migrated Oracle, DB2 and SQL Server dialect implementations to their own repository. | ||
|
||
## Summary | ||
|
||
Please we aware you can not create Oracle nor DB2 Virtual Schemas using this JAR anymore. | ||
Oracle dialect implementation has been migrated to https://github.com/exasol/oracle-virtual-schema. | ||
DB2 dialect implementation has been migrated to https://github.com/exasol/db2-virtual-schema. | ||
Please we aware you can not create Oracle, DB2 nor SQL Server Virtual Schemas using this JAR anymore. | ||
- Oracle dialect implementation has been migrated to https://github.com/exasol/oracle-virtual-schema. | ||
- DB2 dialect implementation has been migrated to https://github.com/exasol/db2-virtual-schema. | ||
- SQL Server dialect implementation has been migrated to https://github.com/exasol/sqlserver-virtual-schema. | ||
|
||
## Refactoring | ||
|
||
* #438: Removed Oracle dialect implementation as it has been migrated to https://github.com/exasol/mysql-virtual-schema. | ||
* #440: Removed DB2 dialect implementation as it has been migrated to https://github.com/exasol/db2-virtual-schema. | ||
* #442: Removed SQL Server dialect implementation as it has been migrated to https://github.com/exasol/sqlserver-virtual-schema. | ||
|
||
## Dependency updates | ||
|
||
* Removed `org.testcontainers:oracle-xe:1.15.0` | ||
* Removed `com.oracle.ojdbc:ojdbc8:19.3.0.0` | ||
* Removed `com.oracle.ojdbc:ojdbc8:19.3.0.0` | ||
* Removed `org.testcontainers:mssqlserver:1.15.0` | ||
* Removed `com.microsoft.sqlserver:mssql-jdbc:8.4.1.jre11` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,130 +1,3 @@ | ||
# SQL Server SQL Dialect | ||
|
||
[Microsoft SQL Server](https://www.microsoft.com/en-us/sql-server/sql-server-2017) is a Relational Database Management System (RDBMS) developed by Microsoft. | ||
|
||
## Registering the JDBC Driver in EXAOperation | ||
|
||
First download the [SQL Server JDBC driver](https://github.com/microsoft/mssql-jdbc/releases). | ||
We recommend using a `jre8` driver. | ||
|
||
Now register the driver in EXAOperation: | ||
|
||
1. Click "Software" | ||
1. Switch to tab "JDBC Drivers" | ||
1. Click "Browse..." | ||
1. Select JDBC driver file | ||
1. Click "Upload" | ||
1. Click "Add" | ||
1. In a dialog "Add EXACluster JDBC driver" configure the JDBC driver (see below) | ||
|
||
You need to specify the following settings when adding the JDBC driver via EXAOperation. | ||
|
||
| Parameter | Value | | ||
|-----------|-----------------------------------------------------| | ||
| Name | `SQLSERVER` | | ||
| Main | `com.microsoft.sqlserver.jdbc.SQLServerDriver` | | ||
| Prefix | `jdbc:sqlserver:` | | ||
| Files | `mssql-jdbc-<version>.jre8.jar` | | ||
|
||
## Uploading the JDBC Driver to EXAOperation | ||
|
||
1. [Create a bucket in BucketFS](https://docs.exasol.com/administration/on-premise/bucketfs/create_new_bucket_in_bucketfs_service.htm) | ||
1. Upload the driver to BucketFS | ||
|
||
## Installing the Adapter Script | ||
|
||
Upload the latest available release of [Virtual Schema JDBC Adapter](https://github.com/exasol/virtual-schemas/releases) to Bucket FS. | ||
|
||
Then create a schema to hold the adapter script. | ||
|
||
```sql | ||
CREATE SCHEMA SCHEMA_FOR_VS_SCRIPT; | ||
``` | ||
|
||
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. | ||
|
||
```sql | ||
CREATE OR REPLACE JAVA ADAPTER SCRIPT SCHEMA_FOR_VS_SCRIPT.ADAPTER_SCRIPT_SQLSERVER AS | ||
%scriptclass com.exasol.adapter.RequestDispatcher; | ||
%jar /buckets/<BFS service>/<bucket>/virtual-schema-dist-8.0.0-bundle-6.0.0.jar; | ||
%jar /buckets/<BFS service>/<bucket>/mssql-jdbc-<version>.jre8.jar; | ||
/ | ||
``` | ||
|
||
## Defining a Named Connection | ||
|
||
Define the connection to SQL Server as shown below. We recommend using TLS to secure the connection. | ||
|
||
```sql | ||
CREATE OR REPLACE CONNECTION SQLSERVER_JDBC_CONNECTION | ||
TO 'jdbc:sqlserver://<server name>:<port>' | ||
USER '<user>' | ||
IDENTIFIED BY '<passsword>'; | ||
``` | ||
|
||
## Creating a Virtual Schema | ||
|
||
Below you see how an SQL Server Virtual Schema is created. | ||
|
||
```sql | ||
CREATE VIRTUAL SCHEMA <virtual schema name> | ||
USING SCHEMA_FOR_VS_SCRIPT.ADAPTER_SCRIPT_SQLSERVER | ||
WITH | ||
SQL_DIALECT = 'SQLSERVER' | ||
CONNECTION_NAME = 'SQLSERVER_JDBC_CONNECTION' | ||
CATALOG_NAME = '<database name>' | ||
SCHEMA_NAME = '<schema name>'; | ||
``` | ||
|
||
|
||
Please, do not forget to specify the `SCHEMA_NAME` property. | ||
|
||
Provide the SQL server's database name using one of the suggested ways: | ||
1. Via the `CATALOG_NAME` property; | ||
1. Via connection string definition: 'jdbc:sqlserver://<server name>:<port>/<database name>'; | ||
|
||
## Data Types Conversion | ||
|
||
MS SERVER Data Type | Supported | Converted Exasol Data Type| Known limitations | ||
--------------------|-----------|---------------------------|------------------- | ||
BIGINT | ✓ | DECIMAL | | ||
BINARY | × | | | ||
BIT | ✓ | BOOLEAN | | ||
CHAR | ✓ | CHAR | | ||
DATE | ✓ | DATE | | ||
DATETIME | ✓ | TIMESTAMP | | ||
DATETIME2 | ✓ | TIMESTAMP | | ||
DATETIMEOFFSET | ✓ | VARCHAR(34) | | ||
DECIMAL | ✓ | DECIMAL | | ||
FLOAT | ✓ | DOUBLE PRECISION | | ||
GEOMETRY | × | | | ||
GEOGRAPHY | × | | | ||
HIERARCHYID | × | | | ||
IMAGE | × | | | ||
INT | ✓ | DECIMAL | | ||
MONEY | ✓ | DECIMAL | | ||
NCHAR | ✓ | CHAR | | ||
NTEXT | ✓ | VARCHAR(2000000) | | ||
NVARCHAR | ✓ | VARCHAR | | ||
NUMERIC | ✓ | DECIMAL | | ||
SQL_VARIANT | × | | | ||
REAL | ✓ | DOUBLE PRECISION | | ||
ROWVERSION | × | | | ||
SMALLDATETIME | ✓ | TIMESTAMP | | ||
SMALLINT | ✓ | DECIMAL | | ||
SMALLMONEY | ✓ | DECIMAL | | ||
TEXT | ✓ | VARCHAR(2000000) | | ||
TIME | ✓ | VARCHAR(16) | | ||
TINYINT | ✓ | DECIMAL | | ||
UNIQUEIDENTIFIER | ✓ | CHAR(36) | | ||
VARBINARY | × | | | ||
VARCHAR | ✓ | VARCHAR | | ||
XML | × | | | ||
|
||
## Testing information | ||
|
||
In the following matrix you find combinations of JDBC driver and dialect version that we tested. | ||
|
||
| Virtual Schema Version | SQL SERVER Version | Driver Name | Driver Version | | ||
|------------------------|------------------------------|-------------------|----------------| | ||
| Latest | 2019-CU6-ubuntu-16.04 8.0.20 | MS SQL JDBC JRE 8 | 8.4.0 | | ||
The SQL Server Virtual Schema has been migrated to its [own repository](https://github.com/exasol/sqlserver-virtual-schema/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
src/main/java/com/exasol/adapter/dialects/sqlserver/SqlServerColumnMetadataReader.java
This file was deleted.
Oops, something went wrong.
64 changes: 0 additions & 64 deletions
64
src/main/java/com/exasol/adapter/dialects/sqlserver/SqlServerIdentifier.java
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
src/main/java/com/exasol/adapter/dialects/sqlserver/SqlServerMetadataReader.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.