gpt4 book ai didi

c# - 如何修复 Dac 部署错误 "InternalDeploymentPlanModifier could not be instantiated"

转载 作者:行者123 更新时间:2023-12-03 21:17:15 24 4
gpt4 key购买 nike

我尝试使用以下代码以编程方式部署 .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() 中 bei 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 ---

有人对这里有什么问题有什么建议吗?

最佳答案

在我的例子中,之前的自动部署失败并使数据库为空。这很奇怪,但在 dacpac 运行后导致 InternalDeploymentPlanModifier could not be instantiated。解决方案是删除现有数据库并重新运行整个部署。

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

关于c# - 如何修复 Dac 部署错误 "InternalDeploymentPlanModifier could not be instantiated",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55395949/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com