locked
Exception when upgrading organization from crm 4 to 2011- invalid column names RRS feed

  • Question

  • In development and QA environments we've upgraded dozens of organizations from dynamics v.4 to v. 2011 without a hitch.

    Naturally, when we try to upgrade our first prod organization, we run into a previously unseen error during the import process.

    It seems like the new schema for the 'Organization' table contains several new columns, which, for some reason, are not being created in that database, therefore failing the whole upgrade process. We've tried this several times, with the same result every time.

    Those columns are created correctly in other upgrades that we've made.

    From the import log:

    13:46:05|  Error| Installer Complete: OrganizationUpgrader - Error encountered
    13:46:05|  Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed.
    InnerException:
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: Invalid column name 'UseSkypeProtocol'.
    Invalid column name 'IsUserAccessAuditEnabled'.
    Invalid column name 'IsDefaultCountryCodeCheckEnabled'.
    Invalid column name 'YammerGroupId'.
    Invalid column name 'EnableBingMapsIntegration'.
    Invalid column name 'YammerOAuthAccessTokenExpired'.
    Invalid column name 'QuickFindRecordLimitEnabled'.
    Invalid column name 'DefaultCountryCode'.
    Invalid column name 'YammerNetworkPermalink'.
    Invalid column name 'YammerPostMethod'.
    Invalid column name 'UserAccessAuditingInterval'.
    Invalid column name 'AllowUserFormModePreference'.
    Invalid column name 'UseReadForm'.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
       at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
       at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
       at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context, Nullable`1 commandTimeout)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoRetrieve(BusinessEntityMoniker moniker, BusinessEntity entity, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode, DatabaseQueryTarget queryTarget)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.TryRetrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode, DatabaseQueryTarget queryTarget, BusinessEntity& businessEntity)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode, DatabaseQueryTarget queryTarget)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context)
       at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.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.Metadata.LocalizationHelper.GetLabelsForResource(String resourceName, Guid objectId, String objectColumnName, LabelTypeCode labelTypeCode, String collectionName, String labelName, IOrganizationContext context)
       at Microsoft.Crm.DataUpgrade.PartnerAuthenticationAuditingFieldsUpgrade.CreateAuditAttributeInternal(MetadataBusinessEntity entity, String attributeName, MetadataHelper metadataHelper, ExecutionContext context)
       at Microsoft.Crm.DataUpgrade.PartnerAuthenticationAuditingFieldsUpgrade.CreateAuditingFields(MetadataBusinessEntity entity, MetadataHelper metadataHelper, ExecutionContext context)
       at Microsoft.Crm.DataUpgrade.PartnerAuthenticationAuditingFieldsUpgrade.UpgradeImpersonationAuditingFields()
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature 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.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
       at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
    InnerException:
    System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'UseSkypeProtocol'.
    Invalid column name 'IsUserAccessAuditEnabled'.
    Invalid column name 'IsDefaultCountryCodeCheckEnabled'.
    Invalid column name 'YammerGroupId'.
    Invalid column name 'EnableBingMapsIntegration'.
    Invalid column name 'YammerOAuthAccessTokenExpired'.
    Invalid column name 'QuickFindRecordLimitEnabled'.
    Invalid column name 'DefaultCountryCode'.
    Invalid column name 'YammerNetworkPermalink'.
    Invalid column name 'YammerPostMethod'.
    Invalid column name 'UserAccessAuditingInterval'.
    Invalid column name 'AllowUserFormModePreference'.
    Invalid column name 'UseReadForm'.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
       at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
       at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
       at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context, Nullable`1 commandTimeout)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoRetrieve(BusinessEntityMoniker moniker, BusinessEntity entity, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode, DatabaseQueryTarget queryTarget)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.TryRetrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode, DatabaseQueryTarget queryTarget, BusinessEntity& businessEntity)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode, DatabaseQueryTarget queryTarget)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context)
       at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.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.Metadata.LocalizationHelper.GetLabelsForResource(String resourceName, Guid objectId, String objectColumnName, LabelTypeCode labelTypeCode, String collectionName, String labelName, IOrganizationContext context)
       at Microsoft.Crm.DataUpgrade.PartnerAuthenticationAuditingFieldsUpgrade.CreateAuditAttributeInternal(MetadataBusinessEntity entity, String attributeName, MetadataHelper metadataHelper, ExecutionContext context)
       at Microsoft.Crm.DataUpgrade.PartnerAuthenticationAuditingFieldsUpgrade.CreateAuditingFields(MetadataBusinessEntity entity, MetadataHelper metadataHelper, ExecutionContext context)
       at Microsoft.Crm.DataUpgrade.PartnerAuthenticationAuditingFieldsUpgrade.UpgradeImpersonationAuditingFields()
    ClientConnectionId:0d6f5dcb-b9cf-4d1f-b3e7-1b0d30ed8e6b

    13:46:05|   Info| Setting organization state.  New state = Failed

    Tuesday, July 16, 2013 7:24 AM

All replies

  • Did you ever get a resolution to this? I am encountering the same issue. Thanks!
    Tuesday, February 18, 2014 4:41 PM
  • Hi When upgrading did u try to select "do not install updates " ?
    Tuesday, February 18, 2014 6:06 PM
  • We solved same issue by Rebooting all Server i.e. 1. CRM web server 2. SQL Server 3. Reporting Server
    • Edited by Rushikesh Ingle Wednesday, March 25, 2015 11:11 AM
    • Proposed as answer by Jussi M Friday, May 6, 2016 7:43 AM
    Wednesday, March 25, 2015 11:10 AM
  • Rebooting the servers solved same issue for us as well.
    Friday, May 6, 2016 7:44 AM