-
Bug
-
Resolution: Done
-
Blocker
-
1.2.1.Final
(I Couldn't really work out what Epic this might apply to)
When connecting to an Azure based SQL Server Managed Instance (a full SQL Server) the registration.json works, and connects to the server but fails to establish the version.
in "io.debezium.connector.sqlserver.SqlServerConnector",
This is because the "private int getSqlServerVersion()" function makes the following assumption...
// Always beginning with 'Microsoft SQL Server NNNN'
see the code here
https://github.com/debezium/debezium/blob/04254e3fe749b32e172136b48715e3ac1ac5b906/debezium-connector-sqlserver/src/main/java/io/debezium/connector/sqlserver/SqlServerConnection.java#L469
However, the Managed SQL Server instance returns a different version string name breaking the assumption above.
"Microsoft SQL Azure (RTM) - 12.0.2000.8 Jun 18 2020 16:54:11 Copyright (C) 2019 Microsoft Corporation"
However the version shown does not correspond to the actual SQL version, it is better to use the Product Version in TSQL.
In Azure... (I.e. Always the latest edition).
Whilst SQL Azure returns v12, connection properties reveal the underlying engine version to confirm this.
So perhaps can we track... Edition and ProductMajorVersion?
The use of substring is this bug waiting to happen
return Integer.valueOf(version.substring(21, 25));
If Edition <> "SQL Azure" && ProductMajorVersion >= 13 Then etc
In the mean time I was hoping the logs suggestion to set server.timezone doesn't seem to be an option?