From 5a7149e56315364c6dc12e808ce74e7d6f59fe83 Mon Sep 17 00:00:00 2001 From: gongzhongqiang <764629910@qq.com> Date: Wed, 6 Apr 2022 14:06:34 +0800 Subject: [PATCH] [sqlserver] Add more tested support version. --- README.md | 2 +- docs/content/about.md | 2 +- .../cdc/connectors/sqlserver/SqlServerValidator.java | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dec3fda41ad..2f2bf042463 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This README is meant as a brief walkthrough on the core features of CDC Connecto | [oceanbase-cdc](/docs/content/connectors/oceanbase-cdc.md) |
  • [OceanBase CE](https://open.oceanbase.com): 3.1.x | JDBC Driver: 5.7.4x | | [oracle-cdc](docs/content/connectors/oracle-cdc.md) |
  • [Oracle](https://www.oracle.com/index.html): 11, 12, 19 | Oracle Driver: 19.3.0.0 | | [postgres-cdc](docs/content/connectors/postgres-cdc.md) |
  • [PostgreSQL](https://www.postgresql.org): 9.6, 10, 11, 12 | JDBC Driver: 42.2.12 | -| [sqlserver-cdc](docs/content/connectors/sqlserver-cdc.md) |
  • [Sqlserver](https://www.microsoft.com/sql-server): 2017, 2019 | JDBC Driver: 7.2.2.jre8 | +| [sqlserver-cdc](docs/content/connectors/sqlserver-cdc.md) |
  • [Sqlserver](https://www.microsoft.com/sql-server): 2012, 2014, 2016, 2017, 2019 | JDBC Driver: 7.2.2.jre8 | | [tidb-cdc](docs/content/connectors/tidb-cdc.md) |
  • [TiDB](https://www.pingcap.com): 5.1.x, 5.2.x, 5.3.x, 5.4.x | JDBC Driver: 8.0.27 | ## Features diff --git a/docs/content/about.md b/docs/content/about.md index 3d869a23318..c1598b692db 100644 --- a/docs/content/about.md +++ b/docs/content/about.md @@ -14,7 +14,7 @@ The CDC Connectors for Apache Flink® integrate Debezium as the engin | [oceanbase-cdc](connectors/oceanbase-cdc.md) |
  • [OceanBase CE](https://open.oceanbase.com): 3.1.x | JDBC Driver: 5.7.4x | | [oracle-cdc](connectors/oracle-cdc.md) |
  • [Oracle](https://www.oracle.com/index.html): 11, 12, 19 | Oracle Driver: 19.3.0.0 | | [postgres-cdc](connectors/postgres-cdc.md) |
  • [PostgreSQL](https://www.postgresql.org): 9.6, 10, 11, 12 | JDBC Driver: 42.2.12 | -| [sqlserver-cdc](connectors/sqlserver-cdc.md) |
  • [Sqlserver](https://www.microsoft.com/sql-server): 2017, 2019 | JDBC Driver: 7.2.2.jre8 | +| [sqlserver-cdc](connectors/sqlserver-cdc.md) |
  • [Sqlserver](https://www.microsoft.com/sql-server): 2012, 2014, 2016, 2017, 2019 | JDBC Driver: 7.2.2.jre8 | | [tidb-cdc](connectors/tidb-cdc.md) |
  • [TiDB](https://www.pingcap.com/): 5.1.x, 5.2.x, 5.3.x, 5.4.x | JDBC Driver: 8.0.27 | ## Supported Flink Versions diff --git a/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/SqlServerValidator.java b/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/SqlServerValidator.java index 4f7c10dc3b1..359c90481f1 100644 --- a/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/SqlServerValidator.java +++ b/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/SqlServerValidator.java @@ -69,11 +69,13 @@ private void checkCdcEnabled(PreparedStatement preparedStatement) throws SQLExce private void checkVersion(Connection connection) throws SQLException { DatabaseMetaData metaData = connection.getMetaData(); - if (metaData.getDatabaseMajorVersion() != 14 && metaData.getDatabaseMajorVersion() != 15) { + // For more information on sqlserver version, please refer to + // https://docs.microsoft.com/en-us/troubleshoot/sql/general/determine-version-edition-update-level. + if (metaData.getDatabaseMajorVersion() < 11) { throw new ValidationException( String.format( "Currently Flink SqlServer CDC connector only supports SqlServer " - + "whose version is either 14 or 15, but actual is %d.", + + "whose version is larger or equal to 11, but actual is %d.", metaData.getDatabaseMajorVersion())); } }