Skip to content
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c97b863
Fix AEv2 tests exclude for reqExternalSetup and cleanup (#1247)
lilgreenbird Feb 5, 2020
54b5a19
Fix | Add null check for getObject() with LocalTime and LocalDate (#1…
peterbae Feb 8, 2020
672b7d6
added all AKV tests to use reqExternalSetup tag so they will be skipp…
lilgreenbird Feb 10, 2020
3c3331b
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Mar 25, 2020
e2c5640
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Mar 26, 2020
aad6966
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Mar 28, 2020
92bf04c
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Mar 31, 2020
3ba5ab7
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Apr 4, 2020
d20823d
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Apr 7, 2020
4cc959f
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Apr 29, 2020
7b301f8
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Apr 30, 2020
56bcf13
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird May 7, 2020
744e0ca
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird May 12, 2020
df8fd41
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird May 19, 2020
652e68b
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird May 26, 2020
53736db
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird May 26, 2020
9ba6a42
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jun 2, 2020
6d156f7
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jun 5, 2020
e08ffe5
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jun 10, 2020
6b6cab2
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jun 18, 2020
c202590
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jun 24, 2020
0515d4b
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jun 24, 2020
2c63b58
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jun 25, 2020
78aa941
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jul 2, 2020
90e99cd
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jul 2, 2020
da1004b
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jul 6, 2020
9ca1284
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jul 28, 2020
c67d8ed
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Aug 1, 2020
1d0a4ad
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Aug 5, 2020
f1b1dfb
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Aug 26, 2020
d9bad87
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Sep 2, 2020
a2e50b9
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Sep 9, 2020
7ff97de
enable ADintegrated tests for non-windows
lilgreenbird Sep 9, 2020
7cae3b4
fixed user test for kerberos
lilgreenbird Sep 11, 2020
c8c5a29
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Sep 16, 2020
d76368a
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Sep 22, 2020
e5aafd3
Merge branch 'dev' of https://github.com/lilgreenbird/mssql-jdbc into…
lilgreenbird Sep 22, 2020
7800824
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Oct 5, 2020
a8199bb
merged
lilgreenbird Oct 14, 2020
3a91ea1
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Oct 16, 2020
3e39be1
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Oct 28, 2020
16d2bbd
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Nov 28, 2020
f9d22e9
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Dec 2, 2020
8eeb9a6
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Dec 8, 2020
465219f
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jan 8, 2021
dc836d0
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jan 12, 2021
0c9a08c
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Jan 13, 2021
ab9b2f2
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Feb 11, 2021
370cf6c
Merge remote-tracking branch 'upstream/dev' into dev
lilgreenbird Feb 24, 2021
440ab50
added sql azure synpase serverless sql pool and azure sql edge
lilgreenbird Mar 18, 2021
6a3b9d5
updated url
lilgreenbird Mar 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 26 additions & 18 deletions src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,12 @@ public class SQLServerConnection implements ISQLServerConnection, java.io.Serial

private boolean sendTemporalDataTypesAsStringForBulkCopy = true;

final int ENGINE_EDITION_FOR_SQL_AZURE = 5;
final int ENGINE_EDITION_FOR_SQL_AZURE_DW = 6;
final int ENGINE_EDITION_FOR_SQL_AZURE_MI = 8;
final int ENGINE_EDITION_SQL_AZURE_DB = 5;
final int ENGINE_EDITION_SQL_AZURE_SYNAPSE_ANALYTICS = 6;
final int ENGINE_EDITION_SQL_AZURE_MI = 8;
final int ENGINE_EDITION_SQL_AZURE_SQL_EDGE = 9;
final int ENGINE_EDITION_SQL_AZURE_SYNAPSE_SERVERLESS_SQL_POOL = 11;

private Boolean isAzure = null;
private Boolean isAzureDW = null;
private Boolean isAzureMI = null;
Expand Down Expand Up @@ -6547,21 +6550,23 @@ public void onEviction(CityHash128Key key, PreparedStatementHandle handle) {
/**
* Checks if connection is established to SQL Azure server
*
* SERVERPROPERTY('EngineEdition') is used to determine if the db server is SQL Azure. It should return 6 for SQL
* Azure DW. This is more reliable than @@version or serverproperty('edition').
* SERVERPROPERTY('EngineEdition') is used to determine if the db server is SQL Azure. This is more reliable
* than @@version or serverproperty('edition').
*
* Reference: http://msdn.microsoft.com/en-us/library/ee336261.aspx
* Reference: https://docs.microsoft.com/sql/t-sql/functions/serverproperty-transact-sql
*
* <pre>
* SERVERPROPERTY('EngineEdition') means
* Database Engine edition of the instance of SQL Server installed on the server.
* 1 = Personal or Desktop Engine (Not available for SQL Server.)
* 2 = Standard (This is returned for Standard and Workgroup.)
* 3 = Enterprise (This is returned for Enterprise, Enterprise Evaluation, and Developer.)
* 4 = Express (This is returned for Express, Express with Advanced Services, and Windows Embedded SQL.)
* 5 = SQL Azure
* 6 = SQL Azure DW
* 8 = Managed Instance
* 1 = Personal or Desktop Engine (Not available in SQL Server 2005 (9.x) and later versions)
* 2 = Standard (This is returned for Standard, Web, and Business Intelligence.)
* 3 = Enterprise (This is returned for Evaluation, Developer, and Enterprise editions.)
* 4 = Express (This is returned for Express, Express with Tools, and Express with Advanced Services)
* 5 = SQL Database
* 6 = Microsoft Azure Synapse Analytics
* 8 = Azure SQL Managed Instance
* 9 = Azure SQL Edge (This is returned for all editions of Azure SQL Edge)
* 11 = Azure Synapse serverless SQL pool
* Base data type: int
* </pre>
*
Expand All @@ -6575,11 +6580,14 @@ boolean isAzure() {
rs.next();

int engineEdition = rs.getInt(1);
isAzure = (engineEdition == ENGINE_EDITION_FOR_SQL_AZURE
|| engineEdition == ENGINE_EDITION_FOR_SQL_AZURE_DW
|| engineEdition == ENGINE_EDITION_FOR_SQL_AZURE_MI);
isAzureDW = (engineEdition == ENGINE_EDITION_FOR_SQL_AZURE_DW);
isAzureMI = (engineEdition == ENGINE_EDITION_FOR_SQL_AZURE_MI);
isAzure = (engineEdition == ENGINE_EDITION_SQL_AZURE_DB
|| engineEdition == ENGINE_EDITION_SQL_AZURE_SYNAPSE_ANALYTICS
|| engineEdition == ENGINE_EDITION_SQL_AZURE_MI
|| engineEdition == ENGINE_EDITION_SQL_AZURE_SQL_EDGE
|| engineEdition == ENGINE_EDITION_SQL_AZURE_SYNAPSE_SERVERLESS_SQL_POOL);
isAzureDW = (engineEdition == ENGINE_EDITION_SQL_AZURE_SYNAPSE_ANALYTICS
|| engineEdition == ENGINE_EDITION_SQL_AZURE_SYNAPSE_SERVERLESS_SQL_POOL);
isAzureMI = (engineEdition == ENGINE_EDITION_SQL_AZURE_MI);

} catch (SQLException e) {
if (loggerExternal.isLoggable(java.util.logging.Level.FINER))
Expand Down