locked
CRM 4 to 2011 Upgrade Fails - Column names in each table must be unique RRS feed

  • Question

  • I am getting this error upgrading a working CRM 4 org to CRM 2011. They are on different database servers. CRM 4 is on rollup 18 and CRM 2011 is rollup 8. I don't understand how it thinks I've got the same column name in a table twice since it isn't possible. Anyone have any suggestions?

    10:47:47|  Error| Installer Complete: OrganizationUpgrader - Error encountered
    10:47:47|  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: Column names in each table must be unique. Column name 'OrgDbOrgSettings' in table 'OrganizationBase' is specified more than once.
       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.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.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
       at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command, Boolean capturePerfTrace)
       at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
       at Microsoft.Crm.Metadata.SqlHelper.ExecuteNonQuery(ISqlExecutionContext context, IDbCommand sqlCommand)
       at Microsoft.Crm.Metadata.SqlHelper.ExecuteNonQuery(MetadataHelper helper, String sqlCommand)
       at Microsoft.Crm.Metadata.EntityAttributeCreateBatchingAction.ExecuteBatchForTable(String tableName, Boolean isPrimary)
       at Microsoft.Crm.Metadata.EntityAttributeCreateBatchingAction.DatabaseOperation()
       at Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
       at Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& 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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)

    Tuesday, July 31, 2012 4:43 PM

Answers

  • Solved - deleted the column it complained about from the table and the view and it worked. Strange.
    • Marked as answer by mcocroft Friday, August 3, 2012 1:47 PM
    Friday, August 3, 2012 1:47 PM

All replies

  • Hi mcocroft,

                    Check the default database collation that is configured on the target server against the source database collation, I have seen weird things like those when migrating from different collations.

     


    Regards,
    Damian Sinay

    Tuesday, July 31, 2012 6:26 PM
  • Latin1_General_CI_AI for both unfortunately. Good suggestion though.

    Tuesday, July 31, 2012 7:09 PM
  • Solved - deleted the column it complained about from the table and the view and it worked. Strange.
    • Marked as answer by mcocroft Friday, August 3, 2012 1:47 PM
    Friday, August 3, 2012 1:47 PM