无法将.dacpac部署到SQL 16。找不到方法:set_Encryption

时间:2016-07-18 22:48:54

标签: sql-server-2016 dacpac dac

我有一个从SQL 2005到SQL 2016数据库使用的dacpac文件。我们的开发人员过去几个月一直在使用SQL 2016,因此我们现在正在使用它进行生产。

尝试使用我们的.dacpac文件升级数据库(没有以前的dacpackage)时,会在下面给出此错误

===================================

Method not found: 'Void Microsoft.SqlServer.TransactSql.ScriptDom.AlterTableAlterColumnStatement.set_Encryption(Microsoft.SqlServer.TransactSql.ScriptDom.ColumnEncryptionDefinition)'. (Microsoft.Data.Tools.Schema.Sql)

------------------------------
Program Location:

   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.AlterStatementGenerator.GenerateForSimpleColumn(SqlSimpleColumn oldColumn, SqlSimpleColumn newColumn)
   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.AlterStatementGenerator.GenerateAlterTableForColumn(IModelElement oldElement, IModelElement newElement)
   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.AlterStatementGenerator.GenerateStatement(IModelElement oldElement, IModelElement newElement)
   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.Sql90AlterStatementGenerator.GenerateScriptDom(IModelElement oldElement, IModelElement newElement)
   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.DeploymentScriptDomGenerator.GenerateTableAlter(SqlTable sourceTable, SqlTable targetTable)
   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.DeploymentScriptDomGenerator.GenerateFragment(Int32 operation, IModelElement element)
   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.DeploymentScriptDomGenerator.GenerateSteps(Int32 operation, IModelElement element)
   at Microsoft.Data.Tools.Schema.Sql.Deployment.OrderedStepGenerator.Add(DeploymentScriptDomGenerator scriptDom, IModelElement element, Int32 operation)
   at Microsoft.Data.Tools.Schema.Sql.Deployment.Analyzers.PlanMediator.BuildDependencyOrderedSteps(Int32 operation, List`1 classOrder, List`1 operationOrder, Dictionary`2 changes, Boolean preserveGraphs, Dictionary`2& relating, Dictionary`2& related)
   at Microsoft.Data.Tools.Schema.Sql.Deployment.Analyzers.PlanMediator.BuildOperations()
   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.OnGeneratePlan()
   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.GeneratePlan(List`1 drops)
   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.BuildPlan()
   at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.Controller.CreatePlan()
   at Microsoft.SqlServer.Dac.DacServices.<>c__DisplayClass25.<CreateDeploymentArtifactGenerationOperation>b__23(Object operation, CancellationToken token)
   at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
   at Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
   at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken)
   at Microsoft.SqlServer.Dac.DacServices.GenerateDeployReport(DacPackage package, String targetDatabaseName, DacDeployOptions options, Nullable`1 cancellationToken)
   at Microsoft.SqlServer.Management.Dac.DacWizard.ReviewPlanPage.ActionStepCalculator_DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

据我所知,我们在任何表格上都没有启用加密功能。这是一个新鲜的数据库。我们甚至尝试从头开始重新创建它,但是一旦我们尝试应用dacpac文件,我们就会遇到同样的错误。

有谁知道我能做些什么来让服务器识别它似乎缺少的set_Encryption方法?任何建议都表示赞赏。

编辑:我进一步确定它不是SQL 2016问题,而是SQL Server Management Studio 2016问题。

1 个答案:

答案 0 :(得分:1)

首先通过SqlPackage.exe运行dacpac,我能够解决这个错误。之后 - 我能够通过管理工作室发布。

相关问题