I have two Always Encrypted enabled databases using Azure Key Vault for the keys. One is in Azure and the other one is local. When I try to use Data Comparison it crashes Visual Studio and VS restarts. It does not crash when the database did not have any AE enabled tables. I have tried it with and without “Column Encryption Setting=enabled”. I use Data Comparison to pull our databases down from Azure and test from my local database. I’m using the April 2016 version.
Thanks in advance for any advice!
The Event Viewer reports:
Log Name: Application
Source: .NET Runtime
Date: 5/5/2016 5:56:26 PM
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: DESKTOP-64U74F2
Description:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidCastException
at System.Data.SqlClient.SqlBuffer.get_SqlString()
at System.Data.SqlClient.SqlDataReader.GetSqlString(Int32)
at Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.SqlTableReader.get_CurrentRow()
at Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.ComparisonSession.CompareTable(Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.ITableReader, Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.ITableReader, Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.TableComparisonSetting, Int64, Int64 ByRef, Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.SessionSettings)
at Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.ComparisonSession.CompareDatabases(Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.Database, Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.Database, Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.TableComparisonSettings, Microsoft.Data.Tools.Schema.Utilities.Sql.Compare.Data.SessionSettings)
at Microsoft.VisualStudio.Data.Tools.DataCompare.UI.Editors.DataCompareDataPopulationJob.Run()
at Microsoft.Data.Tools.Schema.Utilities.Sql.Common.Threading2.JobManager+JobBase.<Microsoft.Data.Tools.Schema.Utilities.Sql.Common.Threading2.JobManager.IManageableJob.RunImpl>b__22_0(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at Microsoft.Data.Tools.Schema.Utilities.Sql.Common.Threading2.JobManager+JobBase.Microsoft.Data.Tools.Schema.Utilities.Sql.Common.Threading2.JobManager.IManageableJob.RunImpl(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()