Microsoft KB Archive/946597

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

Article ID: 946597

Article Last Modified on 1/2/2008

-

APPLIES TO


 * Microsoft Dynamics CRM 4.0

-



Source: Microsoft Support

RAPID PUBLISHING
RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION THAT IS CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED TO SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.



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:

| Info| Updating precision and scale of decimal attributes

| 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.



DISCLAIMER
MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, THE RELIABILITY OR THE ACCURACY OF THE INFORMATION THAT IS CONTAINED IN THE DOCUMENTS AND THE RELATED GRAPHICS PUBLISHED ON THIS WEB SITE (THE “MATERIALS”) FOR ANY PURPOSE.

THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON-INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.

Keywords: kberrmsg kbmbsupgrade kbexpertiseadvanced kbtshoot kbprb kbnomt kbexpertisebeginner kbmbsmigrate kbexpertiseinter KB946597

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.