I am trying to Import my CRM 2016 Database (crm version : 8.2.5.0004 - Article number : 4494402) in following server Information :
Windows Server : 2016
SQL Server : 2016 SP2
Dynamics 365 Update 9.0.3.7
When I import my Organization I get below Error :
14:47:19|Verbose| DatabaseAction execution time; Bin\Microsoft.Crm.Setup.DiffBuilder.dll:InstallStoredProcedure; 00:00:00.0468801
14:47:19| Info| Executing: action Bin\Microsoft.Crm.Setup.DiffBuilder.dll:InstallStoredProcedure with id 00000000-0000-0000-0000-0000000000ff of type DllMethod to
Create p_RetrieveMultipleDirectAncestors
.
14:47:19| Info|
Create p_RetrieveMultipleDirectAncestors
14:47:19|Verbose| DatabaseAction execution time; Bin\Microsoft.Crm.Setup.DiffBuilder.dll:InstallStoredProcedure; 00:00:00.0937908
14:47:19| Info| Executing: action Bin\Microsoft.Crm.Setup.DiffBuilder.dll:Pass1 with id 00000000-0000-0000-0000-0000000000ff of type DllMethod to
Metadata xml upgrade: pass 1
.
14:47:19| Info|
Metadata xml upgrade: pass 1
14:50:46| Info| Action Bin\Microsoft.Crm.Setup.DiffBuilder.dll:Pass1 with id 00000000-0000-0000-0000-0000000000ff of type DllMethod to
Metadata xml upgrade: pass 1
failed on attempt 2. Retrying in 30 seconds. Exception: Exception has been thrown by the target of an invocation.
14:51:38| Info| Action Bin\Microsoft.Crm.Setup.DiffBuilder.dll:Pass1 with id 00000000-0000-0000-0000-0000000000ff of type DllMethod to
Metadata xml upgrade: pass 1
failed on attempt 3. Retrying in 30 seconds. Exception: Exception has been thrown by the target of an invocation.
14:52:29| Info| CrmAction execution time; UpgradeDatabaseAction; 00:06:41.1801398
14:52:29| Error| Installer Complete: OrganizationUpgrader - Error encountered
14:52:29| Error| Exception occurred during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction
InnerException:
Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:Pass1 on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabaseInternal(SqlExecutionContext context)
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabase(IOrganizationContext context)
at Microsoft.Crm.Metadata.MetadataHelper..ctor(ExecutionContext context, Guid organizationId, Boolean isOrganizationDataAvailable, Boolean processDataOperationsSeparately, IBusinessProcessObject systemFormService)
at Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
--- 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, Nullable`1 operationType)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall, Int32 languageCode)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass92_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass93_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
14:52:29| Info| Setting organization state. New state = Failed
14:52:29|Verbose| Retrieving database base language code Data Source=CRM-Upgrade1;Initial Catalog=CRM_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=CRM-UPGRADE1.mmc ...
14:52:29| Info| Database base language code: 1033.
14:52:29|Verbose| Retrieving database version Data Source=CRM-Upgrade1;Initial Catalog=CRM_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=CRM-UPGRADE1.mmc ...
14:52:29| Info| Database version: 8.1.0.359.
14:52:29|Verbose| Begin: Check if CRM Solutions are installed Data Source=CRM-Upgrade1;Initial Catalog=CRM_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=CRM-UPGRADE1.mmc
14:52:29|Verbose| End: Check if CRM Solutions are installed isXrmOrg = True
14:52:29| Error| Upgrade Organization with Id=4e7c342a-e14f-4ec9-a488-624d9f0b2471 failed with Exception:
System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:Pass1 on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabaseInternal(SqlExecutionContext context)
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabase(IOrganizationContext context)
at Microsoft.Crm.Metadata.MetadataHelper..ctor(ExecutionContext context, Guid organizationId, Boolean isOrganizationDataAvailable, Boolean processDataOperationsSeparately, IBusinessProcessObject systemFormService)
at Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
--- 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, Nullable`1 operationType)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall, Int32 languageCode)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass92_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass93_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass83_0.<DoAction>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass67_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
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.OrganizationUpgrader.Execute()
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
14:52:29| Error| An error occurred when trying import and upgrade organization database CRM-Upgrade1.CRM_MSCRM:
Microsoft.Crm.CrmException: Upgrade Organization with Id=4e7c342a-e14f-4ec9-a488-624d9f0b2471 failed with Exception:
System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:Pass1 on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabaseInternal(SqlExecutionContext context)
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabase(IOrganizationContext context)
at Microsoft.Crm.Metadata.MetadataHelper..ctor(ExecutionContext context, Guid organizationId, Boolean isOrganizationDataAvailable, Boolean processDataOperationsSeparately, IBusinessProcessObject systemFormService)
at Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
--- 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, Nullable`1 operationType)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall, Int32 languageCode)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass92_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass93_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass83_0.<DoAction>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass67_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
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.OrganizationUpgrader.Execute()
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:Pass1 on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabaseInternal(SqlExecutionContext context)
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabase(IOrganizationContext context)
at Microsoft.Crm.Metadata.MetadataHelper..ctor(ExecutionContext context, Guid organizationId, Boolean isOrganizationDataAvailable, Boolean processDataOperationsSeparately, IBusinessProcessObject systemFormService)
at Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
--- 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, Nullable`1 operationType)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall, Int32 languageCode)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass92_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass93_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass83_0.<DoAction>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass67_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
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.OrganizationUpgrader.Execute()
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
14:52:29| Error| Import Organization (Name=iCRM, Id=4e7c342a-e14f-4ec9-a488-624d9f0b2471) failed with Exception:
Microsoft.Crm.CrmException: Upgrade Organization with Id=4e7c342a-e14f-4ec9-a488-624d9f0b2471 failed with Exception:
System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:Pass1 on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabaseInternal(SqlExecutionContext context)
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabase(IOrganizationContext context)
at Microsoft.Crm.Metadata.MetadataHelper..ctor(ExecutionContext context, Guid organizationId, Boolean isOrganizationDataAvailable, Boolean processDataOperationsSeparately, IBusinessProcessObject systemFormService)
at Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
--- 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, Nullable`1 operationType)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall, Int32 languageCode)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass92_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass93_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass83_0.<DoAction>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass67_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
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.OrganizationUpgrader.Execute()
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:Pass1 on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabaseInternal(SqlExecutionContext context)
at Microsoft.Crm.OrganizationStateUtil.RetrieveOrganizationStateFromDatabase(IOrganizationContext context)
at Microsoft.Crm.Metadata.MetadataHelper..ctor(ExecutionContext context, Guid organizationId, Boolean isOrganizationDataAvailable, Boolean processDataOperationsSeparately, IBusinessProcessObject systemFormService)
at Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
--- 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, Nullable`1 operationType)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall, Int32 languageCode)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass92_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass93_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass83_0.<DoAction>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass67_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
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.OrganizationUpgrader.Execute()
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Execute(Object obj)
14:52:29| Info| Found the older table DBUpdateInstallInfo_V5, updating new table and deleting
14:52:29| Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 9.0.0003.0007.
I would appreciate if someone help me to fix it.
Best Regards