Benutzer mit den meisten Antworten
Upgrade 2013 to 2015 causes error

Frage
-
We are currently working on a in-place-upgrade from CRM 2013 to 2015. While running the wizard whe are faced with the following error message:
System.ArgumentOutOfRangeException: DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/1753 00:00:00, Minimum value supported: 01/01/1900 00:00:00
Has anybody a similar issue? Thanks in advance!
Antworten
-
We found a workaround:
The problem:
While running the wizard the application itself sets the colum effectivedatetime of the table timezonerules to SQL Datetime min-value ('1753-01-01'). In one of the the next steps the same upgrade process causes an error because because crmdatetime accepts only 1.1.1900 as min value.
A look into the log file gave us the hint (e.g. C:\Users\...\AppData\Roaming\Microsoft\MSCRM\Logs\crmdmsnapin.log):
18:58:23| Error| An error occurred when trying import and upgrade organization database DBCRM2OFFICE\MSSQL2014.ecp_MSCRM:
Microsoft.Crm.CrmException: Upgrade Organization with Id=1d2c25aa-65ee-e411-8979-00155d02b612 failed with Exception:
System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmArgumentOutOfRangeException: DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/1753 00:00:00, Minimum value supported: 01/01/1900 00:00:00 ---> System.ArgumentOutOfRangeException: DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/1753 00:00:00, Minimum value supported: 01/01/1900 00:00:00
Parameter name: universalTime
Actual value was 01.01.1753 00:00:00.
--- End of inner exception stack trace ---
at Microsoft.Crm.BusinessEntities.CrmDateTime.ValidateTime(String parameterName, DateTime time)
at Microsoft.Crm.BusinessEntities.CrmDateTime.Initialize(Style style, DateTime time)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ProcessDataRecord(IDataRecord record, ProcessAttributeCallback processAttributeCallback)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.FillEntityFromDataReaderUsingEntityExpression(BusinessEntity entity, IDataReader reader, EntityExpression entityExpression, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.FillEntityCollectionFromDataReader(BusinessEntityCollection entities, IDataReader reader, EntityExpression entityExp, Boolean useEntityExpression, String aggregateLimitExceededName, Boolean quickFindRecordLimitCheckRequired, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.QueryAndFillEntityCollection(CrmDbConnection dbConnection, IDbCommand dbCommand, BusinessEntityCollection entities, EntityExpression entityExp, PagingHelper pagingHelper, Boolean useEntityExpression, String aggregateLimitExceededName, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoRetrieveMultiple(BusinessEntityCollection entities, EntityExpression entityExp, DatabaseQueryTarget queryTarget, PagingHelper pagingHelper, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoRetrieveMultiple(BusinessEntityCollection entities, EntityExpression entityExp, DatabaseQueryTarget queryTarget, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.RetrieveMultiple(FilterExpression filter, ColumnSetExpression columnSet, ExecutionContext context)
at Microsoft.Crm.Caching.TimeZoneRuleCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.BusinessEntities.ServerTimeZoneFactory.GetDynamicTimeZone(Int32 index, IOrganizationContext context)
at Microsoft.Crm.Caching.UserDataCacheLoader.GetTimeZone(BusinessEntityCacheEntityWrapper userSettingsWrapper, ExecutionContext context)
at Microsoft.Crm.Caching.UserDataCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.CreateEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.BusinessEntities.ExecutionContext.SetCaller(Guid callerId, Boolean setCallerLanguage, Boolean verifyUser)
at Microsoft.Crm.BusinessEntities.ExecutionContext.SwitchCaller(Guid callerId, Boolean switchAuditInfo, Boolean changeLanguageCode, Boolean verifyUser)
at Microsoft.Crm.BusinessEntities.UserContext..ctor(ExecutionContext context, Guid callerId, Boolean switchAuditingInfo, Boolean changeCallerLanguage, Boolean verifyUser)
at Microsoft.Crm.DataUpgrade.CleanupSolutionComponents.CleanupNonExistingSolutionReferences(SqlExecutionContext context)
at Microsoft.Crm.DataUpgrade.CleanupSolutionComponents.Cleanup()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
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.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
at Microsoft.Crm.Setup.Shared.Installer.Install(IDictionary stateSaver)
at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmArgumentOutOfRangeException: DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/1753 00:00:00, Minimum value supported: 01/01/1900 00:00:00 ---> System.ArgumentOutOfRangeException: DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/1753 00:00:00, Minimum value supported: 01/01/1900 00:00:00
Parameter name: universalTime
Actual value was 01.01.1753 00:00:00.The solution:
We created a Trigger on timezonerulebase before starting the upgrade wizard:
create trigger MyBasicTrigger on timezonerulebaseafter insert, updateas set NoCount ON if update(effectivedatetime) begin update timezonerulebase set EffectiveDateTime = '1900-01-01' from timezonerulebase inner join inserted on timezonerulebase.TimeZoneRuleId = inserted.TimeZoneRuleId where Inserted.EffectiveDateTime < '1900-01-01' end
Finally don't Forget it to delete:
drop trigger MyBasicTrigger
Alle Antworten
-
We found a workaround:
The problem:
While running the wizard the application itself sets the colum effectivedatetime of the table timezonerules to SQL Datetime min-value ('1753-01-01'). In one of the the next steps the same upgrade process causes an error because because crmdatetime accepts only 1.1.1900 as min value.
A look into the log file gave us the hint (e.g. C:\Users\...\AppData\Roaming\Microsoft\MSCRM\Logs\crmdmsnapin.log):
18:58:23| Error| An error occurred when trying import and upgrade organization database DBCRM2OFFICE\MSSQL2014.ecp_MSCRM:
Microsoft.Crm.CrmException: Upgrade Organization with Id=1d2c25aa-65ee-e411-8979-00155d02b612 failed with Exception:
System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmArgumentOutOfRangeException: DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/1753 00:00:00, Minimum value supported: 01/01/1900 00:00:00 ---> System.ArgumentOutOfRangeException: DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/1753 00:00:00, Minimum value supported: 01/01/1900 00:00:00
Parameter name: universalTime
Actual value was 01.01.1753 00:00:00.
--- End of inner exception stack trace ---
at Microsoft.Crm.BusinessEntities.CrmDateTime.ValidateTime(String parameterName, DateTime time)
at Microsoft.Crm.BusinessEntities.CrmDateTime.Initialize(Style style, DateTime time)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ProcessDataRecord(IDataRecord record, ProcessAttributeCallback processAttributeCallback)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.FillEntityFromDataReaderUsingEntityExpression(BusinessEntity entity, IDataReader reader, EntityExpression entityExpression, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.FillEntityCollectionFromDataReader(BusinessEntityCollection entities, IDataReader reader, EntityExpression entityExp, Boolean useEntityExpression, String aggregateLimitExceededName, Boolean quickFindRecordLimitCheckRequired, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.QueryAndFillEntityCollection(CrmDbConnection dbConnection, IDbCommand dbCommand, BusinessEntityCollection entities, EntityExpression entityExp, PagingHelper pagingHelper, Boolean useEntityExpression, String aggregateLimitExceededName, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoRetrieveMultiple(BusinessEntityCollection entities, EntityExpression entityExp, DatabaseQueryTarget queryTarget, PagingHelper pagingHelper, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoRetrieveMultiple(BusinessEntityCollection entities, EntityExpression entityExp, DatabaseQueryTarget queryTarget, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.RetrieveMultiple(FilterExpression filter, ColumnSetExpression columnSet, ExecutionContext context)
at Microsoft.Crm.Caching.TimeZoneRuleCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.BusinessEntities.ServerTimeZoneFactory.GetDynamicTimeZone(Int32 index, IOrganizationContext context)
at Microsoft.Crm.Caching.UserDataCacheLoader.GetTimeZone(BusinessEntityCacheEntityWrapper userSettingsWrapper, ExecutionContext context)
at Microsoft.Crm.Caching.UserDataCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.CreateEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.BusinessEntities.ExecutionContext.SetCaller(Guid callerId, Boolean setCallerLanguage, Boolean verifyUser)
at Microsoft.Crm.BusinessEntities.ExecutionContext.SwitchCaller(Guid callerId, Boolean switchAuditInfo, Boolean changeLanguageCode, Boolean verifyUser)
at Microsoft.Crm.BusinessEntities.UserContext..ctor(ExecutionContext context, Guid callerId, Boolean switchAuditingInfo, Boolean changeCallerLanguage, Boolean verifyUser)
at Microsoft.Crm.DataUpgrade.CleanupSolutionComponents.CleanupNonExistingSolutionReferences(SqlExecutionContext context)
at Microsoft.Crm.DataUpgrade.CleanupSolutionComponents.Cleanup()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
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.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
at Microsoft.Crm.Setup.Shared.Installer.Install(IDictionary stateSaver)
at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmArgumentOutOfRangeException: DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/1753 00:00:00, Minimum value supported: 01/01/1900 00:00:00 ---> System.ArgumentOutOfRangeException: DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/1753 00:00:00, Minimum value supported: 01/01/1900 00:00:00
Parameter name: universalTime
Actual value was 01.01.1753 00:00:00.The solution:
We created a Trigger on timezonerulebase before starting the upgrade wizard:
create trigger MyBasicTrigger on timezonerulebaseafter insert, updateas set NoCount ON if update(effectivedatetime) begin update timezonerulebase set EffectiveDateTime = '1900-01-01' from timezonerulebase inner join inserted on timezonerulebase.TimeZoneRuleId = inserted.TimeZoneRuleId where Inserted.EffectiveDateTime < '1900-01-01' end
Finally don't Forget it to delete:
drop trigger MyBasicTrigger