【问题标题】:How to fix Dac Deployment error "InternalDeploymentPlanModifier could not be instantiated"如何修复 Dac 部署错误“InternalDeploymentPlanModifier 无法实例化”
【发布时间】:2019-03-28 11:01:58
【问题描述】:

我尝试使用以下代码以编程方式部署 .dacpac 包:

            var dacServices = new DacServices(myConnectionString);
            using (var bacPacPackage = DacPackage.Load(dacPacFilename))
            {
                var options = new PublishOptions();
                dacServices.Publish(bacPacPackage, dbName, options);
            }

它会抛出一个错误:

Microsoft.SqlServer.Dac.DacServicesException:部署计划生成期间出错。部署无法继续。 错误 72002:无法实例化扩展类型 Microsoft.SqlServer.Dac.Deployment.Internal.InternalDeploymentPlanExecutor。 错误 72002:无法实例化扩展类型 Microsoft.SqlServer.Dac.Deployment.Internal.InternalDeploymentPlanModifier。 ---> Microsoft.Data.Tools.Schema.Sql.Deployment.DeploymentFailedException:加载部署贡献者时出错。 北 Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.LoadDeploymentComponents() 在 Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.InitializePlanGeneratator() 北 Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.CreateController(Action`1 msgHandler) bei Microsoft.SqlServer.Dac.DacServices.CreateController(SqlDeployment deploymentEngine, ErrorManager errorManager) --- Ende der internen Ausnahmestapelüberwachung ---

大家有什么建议吗?

【问题讨论】:

  • 看来c#代码和数据库的映射需要更新了。
  • 您解决过这个问题吗?我在尝试导入 .bacpac 文件时遇到了同样的问题

标签: c# smo dac


【解决方案1】:

在我的情况下,以前的自动部署失败并导致数据库为空的问题。这很奇怪,但是在 dacpac 运行之后导致了InternalDeploymentPlanModifier could not be instantiated。 解决方案是删除现有数据库并运行整个部署。

第二件事是目标服务器上的内存不足。它也可能导致这些问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-14
    • 1970-01-01
    • 1970-01-01
    • 2012-07-15
    • 1970-01-01
    相关资源
    最近更新 更多