环境:
Dynamic 365 9.0.6.9,PRD和UAT组织在同一套服务器环境中。
操作:
1.备份PRD数据库,还原到UAT数据库
2.在CRM部署管理器中导入UAT组织数据库
提示错误如下:
12:31:12|Verbose| DatabaseAction execution time; Microsoft.Crm.SE.DatabaseActions.dll:EnableCacheSharing; 00:00:00.0048931
12:31:14| Info| UpdateVersionForAllOrgs(install = True): version = 9.0.6.9.
12:31:14| Info| UpdateRevision(): orgId = d5891c81-5a0b-e911-b0c6-c83345642b50, newVersion = 9.0.6.9, install = True.
12:31:14| Info| Database updates were successfully applied for orgId = d5891c81-5a0b-e911-b0c6-c83345642b50.
12:31:14| Info| CrmAction execution time; InstallDatabaseUpdatesAction; 00:00:05.0556571
12:31:14| Info| Executing Install action: Microsoft.Crm.Tools.Admin.InstallRibbonClientMetadataAction
12:33:17| Info| CrmAction execution time; InstallRibbonClientMetadataAction; 00:02:03.0371315
12:33:17| Info| Executing Install action: Microsoft.Crm.Tools.Admin.FlushOrgMetadataCacheInMTPDAction
12:33:17| Info| CrmAction execution time; FlushOrgMetadataCacheInMTPDAction; 00:00:00
12:33:17| Info| Executing Install action: Microsoft.Crm.Tools.Admin.FlushPluginAssemblyCacheAction
12:33:17| Info| CrmAction execution time; FlushPluginAssemblyCacheAction; 00:00:00.3320328
12:33:17| Info| Executing Install action: Microsoft.Crm.Tools.Admin.EnableSharedCacheAction
12:33:17| Info| CrmAction execution time; EnableSharedCacheAction; 00:00:00.0048851
12:33:17| Info| Executing Install action: Microsoft.Crm.Tools.Admin.EnableLabelCacheSharingAction
12:33:17| Info| CrmAction execution time; EnableLabelCacheSharingAction; 00:00:00.0087925
12:33:17| Info| Installer Complete: OrganizationDBUpdateInstaller
12:33:17| Info| Setting organization state. New state = Enabled
12:33:18|Verbose| Retrieving database base language code Data Source=172.0.0.1;Initial Catalog=prdcrm_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=UAT-CRM.mmc ...
12:33:18| Info| Database base language code: 2052.
12:33:18|Verbose| Begin: Check if CRM Solutions are installed Data Source=172.0.0.1;Initial Catalog=prdcrm_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=UAT-CRM.mmc
12:33:18|Verbose| End: Check if CRM Solutions are installed isXrmOrg = False
12:33:18|Verbose| Retrieving database base language code Data Source=172.0.0.1;Initial Catalog=prdcrm_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=UAT-CRM.mmc ...
12:33:18| Info| Database base language code: 2052.
12:33:18|Verbose| Begin: Check if CRM Solutions are installed Data Source=172.0.0.1;Initial Catalog=prdcrm_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=UAT-CRM.mmc
12:33:18|Verbose| End: Check if CRM Solutions are installed isXrmOrg = False
12:33:18| Error| 导入组织(名称=prdcrm,ID=d5891c81-5a0b-e911-b0c6-c83345642b50)失败,出现异常:
Microsoft.Crm.CrmException: Failed to install organization db updates. One or more actions have failed. Failing actions are: InstallCrmSystemConvertedSolutionsAction
在 Microsoft.Crm.Tools.Admin.OrganizationDBUpdateInstaller.ProcessFailedActions()
在 Microsoft.Crm.Tools.Admin.OrganizationDBUpdateInstaller.Execute()
在 Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, ICollection`1 users, MultipleTenancy multipleTenancy, Boolean patchOnImport, OrgDbUpdateMode orgDbUpdateMode)
12:33:18| Info| Found the older table DBUpdateInstallInfo_V5, updating new table and deleting
12:33:18| Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 9.0.0006.0009.
12:33:28| Error| 导入组织(名称=prdcrm,ID=d5891c81-5a0b-e911-b0c6-c83345642b50)失败,出现异常:
Microsoft.Crm.CrmException: Failed to install organization db updates. One or more actions have failed. Failing actions are: InstallCrmSystemConvertedSolutionsAction
在 Microsoft.Crm.Tools.Admin.OrganizationDBUpdateInstaller.ProcessFailedActions()
在 Microsoft.Crm.Tools.Admin.OrganizationDBUpdateInstaller.Execute()
在 Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, ICollection`1 users, MultipleTenancy multipleTenancy, Boolean patchOnImport, OrgDbUpdateMode orgDbUpdateMode)
提供了以下解决方案:
在CRM安装路径下找到脚本文件
(\Program Files\Dynamics 365\Setup\Serviceability\Latest\Actions\Org\Install\UpdateParentSolutionIdForSolutionPatches.sql)
在运行脚本之前,请备份数据库!运行后,请再次尝试导入即可。