Switch Tools Service to new SMO and Microsoft.Data.SqlClient driver (#865)

* switch to ambient props and targets files

* build against Microsoft.Data.SqlClient

* build tests

* fix test bug

* temporarily add SMO nuget to the repo

* update to released Microsoft.Data package
This commit is contained in:
David Shiflet
2019-09-17 17:51:19 -04:00
committed by GitHub
parent 47c9b968f6
commit 9d140b53f3
130 changed files with 160 additions and 183 deletions

View File

@@ -6,7 +6,7 @@
using System;
using System.Collections.Concurrent;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Diagnostics;
using System.Linq;
using Microsoft.SqlTools.Utility;

View File

@@ -5,7 +5,7 @@
using System;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using Microsoft.SqlTools.Utility;
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection

View File

@@ -5,7 +5,7 @@
using System;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using Microsoft.SqlTools.Utility;
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection

View File

@@ -6,7 +6,7 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
@@ -826,17 +826,24 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
// Get BDC endpoints
if (!serverInfo.IsCloud)
{
List<ClusterEndpoint> clusterEndpoints = new List<ClusterEndpoint>();
serverInfo.Options.Add(ServerInfo.OptionClusterEndpoints, clusterEndpoints);
if (serverInfo.ServerMajorVersion >= 15)
{
List<ClusterEndpoint> clusterEndpoints = new List<ClusterEndpoint>();
serverInfo.Options.Add(ServerInfo.OptionClusterEndpoints, clusterEndpoints);
try
{
LookupClusterEndpoints(connection, serverInfo, clusterEndpoints);
try
{
LookupClusterEndpoints(connection, serverInfo, clusterEndpoints);
}
catch (SqlException)
{
// Failed to find cluster endpoints DMV / table, this must not be a cluster
// or user does not have permissions to see cluster info
serverInfo.Options.Add(ServerInfo.OptionIsBigDataCluster, false);
}
}
catch (SqlException)
else
{
// Failed to find cluster endpoints DMV / table, this must not be a cluster
// or user does not have permissions to see cluster info
serverInfo.Options.Add(ServerInfo.OptionIsBigDataCluster, false);
}
}

View File

@@ -26,7 +26,7 @@
using System;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Diagnostics.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection

View File

@@ -27,7 +27,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Diagnostics;
using System.Globalization;
using System.Text;

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Diagnostics;
using Microsoft.SqlTools.Utility;

View File

@@ -4,7 +4,7 @@
//
using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
{

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
{

View File

@@ -4,7 +4,7 @@
//
using System.Collections.Generic;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
{

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
{

View File

@@ -5,7 +5,7 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Globalization;
using System.Linq;
using System.Text;

View File

@@ -24,7 +24,7 @@
// namespace Microsoft.SqlServer.Management.Common
using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Globalization;

View File

@@ -5,7 +5,7 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Diagnostics;
using System.Runtime.InteropServices;
using Microsoft.SqlTools.Utility;