Article ID: 946597 - Last Review: January 2, 2008 - Revision: 1.1

Error message when you upgrade to Microsoft Dynamics CRM 4.0: "Exception has been thrown by the target of an invocation"

Expand all | Collapse all

SYMPTOMS

When you upgrade to Microsoft Dynamics CRM 4.0, the upgrade process cannot be completed. Additionally, you receive the following error message in the CRM40setup.log file:
Time| Info| Updating precision and scale of decimal attributes
Time| Error| System.Exception: Action
Microsoft.Crm.Setup.Server.InstallDatabaseAction failed. --->
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: The statistics 'hind_1090102924_1A_2A_4A_9A_15A' is dependent on column 'Quantity'.
ALTER TABLE ALTER COLUMN Quantity failed because one or more objects access this column.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)
at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)
at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command)
at Microsoft.Crm.Setup.DiffBuilder.UpdatePrecisionAndScaleOnDecimalAttributes()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle 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()
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseCollection releases, Int32 currentProgress)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal()
at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
at Microsoft.Crm.Setup.Server.InstallDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Common.Action.ExecuteAction(Action action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---, Error, RetryCancel, Option1
Note By default, the CRM40setup.log file is in the following folder:
C:\Documents and Settings\upgrading user\Application Data\Microsoft\MSCRM\logs

This problem occurs if you have custom statistics in the OrgName_MSCRM database.

CAUSE

This problem occurs because the upgrade process cannot handle custom statistics in the OrgName_MSCRM database.

RESOLUTION

To resolve this problem, follow these steps:
  1. Manually drop the custom statistics from the Microsoft Dynamics CRM database.
  2. Upgrade to Microsoft Dynamics CRM 4.0.
  3. Re-create the custom statistics in the Microsoft Dynamics CRM database.
For more information about how to drop the statistics, view the related topic in SQL Books Online.

APPLIES TO
  • Microsoft Dynamics CRM 4.0
Keywords: 
kberrmsg kbmbsupgrade kbtshoot kbprb kbexpertisebeginner kbmbsmigrate kbexpertiseinter KB946597
 

Article Translations

 

Related Support Centers