Em ambientes de desenvolvimento e controle de qualidade, atualizamos dezenas de organizações da dinâmica v.4 para v. 2011 sem problemas.
Naturalmente, quando tentamos atualizar nossa primeira organização de produtos, nos deparamos com um erro nunca visto antes durante o processo de importação.
Parece que o novo esquema para a tabela 'Organização' contém várias novas colunas, que, por algum motivo, não estão sendo criadas nesse banco de dados, portanto, falhando em todo o processo de atualização. Nós tentamos isso várias vezes, sempre com o mesmo resultado.
Essas colunas são criadas corretamente em outras atualizações que fizemos.
No registro de importação:
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