2

在我们的生产服务器上尝试从汇总 11 升级到汇总 13 时,我们在尝试升级数据库时收到与元数据缓存相关的错误,如下所示。以前有人见过这样的错误吗?任何想法从哪里开始解决问题?

21:59:08| 错误| Microsoft.Crm.Tools.Admin.OrganizationDatabaseHotFixer 期间发生异常:操作 Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction 失败。InnerException:System.Reflection.TargetInvocationException:调用的目标已引发异常。---> System.ArgumentException:已添加具有相同键的项目。在 System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at Microsoft.Crm.Metadata.PreloadedOptionSetMetadataDataProvider.LoadNormalOptions(IPreloadedMetadataInitializationContext context, Boolean initializeEnumOptionProvider) at Microsoft.Crm.Metadata.PreloadedMetadataCacheDataProvider.InitializeOptionSets(IPreloadedMetadataInitializationContext context, LoadMasks masks, IOrganizationContext organizationContext) at Microsoft.Crm.Metadata.PreloadedMetadataCacheDataProvider.Initialize(IOrganizationContext organizationContext, MetadataContainer container, LoadMasks masks) at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.CreateMetadataCacheDataProvider(MetadataContainer container, IOrganizationContext context, LoadMasks masks, CounterList counter) at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.BuildMetadataCacheFromMetadataContainer(MetadataContainer container, LoadMasks masks, IOrganizationContext context, CounterList counter) at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabaseInternal(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, IOrganizationContext context, CounterList counter) at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabase(LoadMasks masks, IOrganizationContext context, CounterList counter) at Microsoft.Crm.Metadata.DynamicMetadataCacheFactory.LoadMetadataCache(LoadMethod method, CacheType type, IOrganizationContext context) at Microsoft.Crm.Metadata.MetadataCache.LoadCache(IOrganizationContext context, Boolean fileOnlyIfExists) at Microsoft.Crm.Metadata.MetadataCache.GetInstance(IOrganizationContext context) at Microsoft.Crm.BusinessEntities.ExecutionContext.ProcessDependencies(FlushCacheOption option, CreateNewCollectorOption createOption) at Microsoft.Crm.BusinessEntities.ExecutionContext.OnEndRequest() at Microsoft.Crm.Setup.MetadataPatchService.ProcessMetadataDiffFile(String targetRevision) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId) at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall) at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall) at Microsoft.Crm.Setup.Database.DatabaseInstaller.InstallUpdate(String configurationFilePath, Boolean upgradeDatabase) at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId) at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdatesInternal(Guid orgId, String orgUniqueName, String releaseFilePath, Boolean ignoreErrors) at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdates(Guid orgId, String orgUniqueName, OrganizationOperationType operationType) at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.Do(IDictionary parameters) at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo) InnerException: System.ArgumentException: An item with the same key has already been added. at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at Microsoft.Crm.Metadata.PreloadedOptionSetMetadataDataProvider.LoadNormalOptions(IPreloadedMetadataInitializationContext context, Boolean initializeEnumOptionProvider) at Microsoft.Crm.Metadata.PreloadedMetadataCacheDataProvider.InitializeOptionSets(IPreloadedMetadataInitializationContext context, LoadMasks mask, IOrganizationContext organizationContext)在 Microsoft.Crm.Metadata.PreloadedMetadataCacheDataProvider.Initialize(IOrganizationContext organizationContext,MetadataContainer 容器,LoadMasks 掩码)在 Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.CreateMetadataCacheDataProvider(MetadataContainer 容器,IOrganizationContext 上下文,LoadMasks 掩码,CounterList 计数器)在 Microsoft.Crm.Metadata。动态元数据缓存加载器。在 Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabaseInternal(LoadMasks 掩码,CrmDbConnection 连接,CrmTransaction 事务,IOrganizationContext 上下文,CounterList 计数器)在 Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabase (LoadMasks 掩码、IOrganizationContext 上下文、CounterList 计数器)在 Microsoft.Crm.Metadata.MetadataCache.LoadCache(IOrganizationContext context, Boolean fileOnlyIfExists) 在 Microsoft.Crm.Metadata.DynamicMetadataCacheFactory.LoadMetadataCache(LoadMethod method, CacheType type, IOrganizationContext context) 在 Microsoft。 Microsoft.Crm 中的 Crm.Metadata.MetadataCache.GetInstance(IOrganizationContext context)。BusinessEntities.ExecutionContext.ProcessDependencies(FlushCacheOption option, CreateNewCollectorOption createOption) 在 Microsoft.Crm.BusinessEntities.ExecutionContext.OnEndRequest() 在 Microsoft.Crm.Setup.MetadataPatchService.ProcessMetadataDiffFile(String targetRevision)

4

1 回答 1

3

经过大量的谷歌搜索后,我能够找到以下处理问题的 Microsoft KB。我仍然不知道问题的根本原因,但知识库文章中的脚本起到了作用:

http://support.microsoft.com/kb/2808349

于 2013-09-11T07:49:06.910 回答