locked
Upgrading CRM 4.0 to 2011 Failures

    Question

  • I've had multiple issues upgrading from CRM 4.0 to 2011.  I did a clean install of CRM 2011 on a new server, restored the CRM 4.0 database to it locally to avoid interfering with my production CRM deloyment, and then did organization -> import to import the old database.  The first error i got was: Column names in each table must be unique. Column name 'IsIntegrationUser' in table 'SystemUserBase' is specified more than once.

     

    So i renamed the column to IsIntegrationUserOld and it gave a slightly different error and crashed.

    So then i deleted the column entirely and it blew up in a whole new way.  Does anybody have any ideas?

     

    I wrote a post about my problems getting CRM 2011 installed here, which includes more detail and all of the error messages I came up against.  http://www.andrewparisio.com/2011/05/installing-microsoft-dynamics-crm-2011.html

     

    Thanks!


    Tuesday, May 17, 2011 6:16 PM

Answers

  • I fixed it, thank you for your help david you sent me in the right direction.  I wrote a full post about what I did, but here is the final answer. 

     

    Post: 

    http://www.andrewparisio.com/2011/05/installing-microsoft-dynamics-crm-2011.html

     

    Final Solution:

     

    1. On the CRM 4.0 Server
      1. Update attribute set IsCustomField = 1 where name = 'IsIntegrationUser'  
      2. Modify the SystemUserExtensionBase table and add a column for IsIntegrationUser with type bit.
      3. Navigate to Settings -> Customisability -> users -> attributes -> and delete the IsIntegrationUser value
      4. Now go to the SystemUserBase table and delete the IsIntegrationUser column if it still exists.
      5. Backup the CRM Database from SQL Management Studio
    2. On the CRM 2011 Server
      1. Restore the 4.0 CRM Database to SQL
      2. Navigate to Organizations, and import the old CRM Database

     

    Wednesday, May 18, 2011 9:45 PM

All replies

  • Have you imported customisations from a CRM 4.0 Online implementation into your existing CRM 4.0 organisation ? The reason for asking is that the IsIntegrationUser column applied only to CRM 4.0 Online (and not onpremise) - I wouldn't normally expect that you'd have this column in a CRM 4.0 onpremise implementation.

    Trying to rename and/or delete columns directly in SQL won't help - there are too many other dependencies within CRM and you'll just get an unstable schema.

    The way I'd try and get rid of this field is to:

    • Mark it is a custom field - the quick way is to run this SQL: Update attribute set IsCustomField = 1 where name = 'IsIntegrationUser'
    • You should then be able to delete the field via the CRM customisation screen. Delete the field, and publish the systemuser entity, then try again

    Note that this is unsupported, but I don't see a supported way to fix this


    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Wednesday, May 18, 2011 8:36 AM
    Moderator
  • We had a CRM consultant that created some reports or something, i'm not really sure i wasn't in charge of that stuff.  I know he wasn't exactly the brightest, so who knows what he did.

     

    I did mark it as a custom field, and then i went in and attempted to delete the attribute from the user customisation screen, unfortunately it gives a generic failure and says to talk to your sys admin or check the community forums.

     

    Any other ideas?

    edit: thank you for your help!
    Wednesday, May 18, 2011 6:03 PM
  • I enabled tracing and found this:

    ALTER TABLE SystemUserExtensionBase DROP COLUMN IsIntegrationUser Exception: System.Data.SqlClient.SqlException: ALTER TABLE DROP COLUMN failed because column 'IsIntegrationUser' does not exist in table 'SystemUserExtensionBase'.

     

    So I added this field to the table SystemUserExtensionBase thinking maybe if it exists it will let me delete it cleanly, and.... SUCCESS!!!!  I got past this error.  The field still shows up in my CRM 4.0 database but it no longer shows up as an attribute in the User settings under customisability.   I am currently attempting to upgrade to CRM 2011 with this latest fix.

    Wednesday, May 18, 2011 9:00 PM
  • Here is the full error that it spit out in tracing, I'm pretty sure this has to be a bug in the import process that somebody should look in to fixing.

     

     

    [2011-05-18 13:54:02.9] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    1 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error | CrmException..ctor

    at CrmException..ctor(String message, Int32 errorCode)

    at EntityExpression.DeserializeFromFetchXml(String xmlInfo)

    at ViewUsageHelper.CheckFetch(String fetchXml, Boolean isSpecialView, EntityMetadata entityMD, Guid entityId, ExecutionContext context)

    at ViewUsageHelper.CheckViews(BusinessEntityCollection entities, ExecutionContext context)

    at UsageHelper.CheckSystemViews(Guid entityId, Guid attributeId, DynamicMetadataCache mdCache, ExecutionContext context)

    at UsageHelper.GetAttributeUsageInfo(Guid attributeId, Guid relationshipId, DynamicMetadataCache mdCache, ExecutionContext context)

    at AttributeService.GetUsageInfo(Guid attributeId, ExecutionContext context)

    at AttributeService.GetUsageInfo(Guid attributeId)

    at AttributeDelete.Execute(IUser user, Guid attributeId)

    at SystemCustomization.DeleteAttribute(Guid attributeId)

    at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)

    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)

    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

    at LogicalMethodInfo.Invoke(Object target, Object[] values)

    at WebServiceHandler.Invoke()

    at WebServiceHandler.CoreProcessRequest()

    at SyncSessionlessHandler.ProcessRequest(HttpContext context)

    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    at ApplicationStepManager.ResumeSteps(Exception error)

    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)

    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)

    at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)

    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)

    >Crm Exception: Message: Entity Name specified in FetchXml does not match the entity name in the EntityExpression, ErrorCode: -2147217112

    # CRM Tracing Version 2.0

    # LocalTime: 2011-05-18 13:54:04.2

    # Categories: 

    # CallStackOn: No

    # ComputerName: CSGREDCRM

    # CRMVersion: 4.0.7333.3414

    # DeploymentType: OnPremise

    # ScaleGroup: 

    # ServerRole: AppServer, AsyncService, DiscoveryService, WebService, ApiServer, HelpServer, DeploymentService

     

    [2011-05-18 13:54:04.2] Process: w3wp |Organization:9c071ac0-f5e5-48e2-910e-fbd8c045f212 |Thread:    1 |Category: Platform.Metadata |User: 00000000-0000-0000-0000-000000000000 |Level: Error | SqlHelper.ExecuteNonQuery

    >Exception when executing non-query: ALTER TABLE SystemUserExtensionBase DROP COLUMN IsIntegrationUser Exception: System.Data.SqlClient.SqlException: ALTER TABLE DROP COLUMN failed because column 'IsIntegrationUser' does not exist in table 'SystemUserExtensionBase'.

       at System.Data.SqlClient.SqlConnection.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.Metadata.SqlHelper.ExecuteNonQuery(MetadataHelper helper, IDbCommand sqlCommand)

    [2011-05-18 13:54:04.2] Process: w3wp |Organization:9c071ac0-f5e5-48e2-910e-fbd8c045f212 |Thread:    1 |Category: Platform.Metadata |User: 00000000-0000-0000-0000-000000000000 |Level: Error | AttributeService.Delete

    >AttributeService.Delete caught exception: System.Data.SqlClient.SqlException: ALTER TABLE DROP COLUMN failed because column 'IsIntegrationUser' does not exist in table 'SystemUserExtensionBase'.

       at System.Data.SqlClient.SqlConnection.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.Metadata.SqlHelper.ExecuteNonQuery(MetadataHelper helper, IDbCommand sqlCommand)

       at Microsoft.Crm.Metadata.AttributeDeleteAction.DatabaseOperation()

       at Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()

       at Microsoft.Crm.Metadata.AttributeService.Delete(Guid attributeId, ExecutionContext context)

    [2011-05-18 13:54:04.2] Process: w3wp |Organization:9c071ac0-f5e5-48e2-910e-fbd8c045f212 |Thread:    1 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ErrorInformation.LogError

    >MSCRM Error Report:

    --------------------------------------------------------------------------------------------------------

    Error: ALTER TABLE DROP COLUMN failed because column 'IsIntegrationUser' does not exist in table 'SystemUserExtensionBase'.

     

    Error Message: ALTER TABLE DROP COLUMN failed because column 'IsIntegrationUser' does not exist in table 'SystemUserExtensionBase'.

     

    Source File: Not available

     

    Line Number: Not available

     

    Request URL: http://csgredcrm:5555/CSG/AppWebServices/SystemCustomization.asmx

     

    Stack Trace Info: [SqlException: ALTER TABLE DROP COLUMN failed because column 'IsIntegrationUser' does not exist in table 'SystemUserExtensionBase'.]

       at System.Data.SqlClient.SqlConnection.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.Metadata.SqlHelper.ExecuteNonQuery(MetadataHelper helper, IDbCommand sqlCommand)

       at Microsoft.Crm.Metadata.AttributeDeleteAction.DatabaseOperation()

       at Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()

       at Microsoft.Crm.Metadata.AttributeService.Delete(Guid attributeId, ExecutionContext context)

       at Microsoft.Crm.Metadata.AttributeService.Delete(Guid attributeId)

       at Microsoft.Crm.Application.WebServices.SystemCustomization.AttributeDelete.Execute(IUser user, Guid attributeId)

       at Microsoft.Crm.Application.WebServices.SystemCustomization.SystemCustomization.DeleteAttribute(Guid attributeId)

     

    Wednesday, May 18, 2011 9:11 PM
  • I fixed it, thank you for your help david you sent me in the right direction.  I wrote a full post about what I did, but here is the final answer. 

     

    Post: 

    http://www.andrewparisio.com/2011/05/installing-microsoft-dynamics-crm-2011.html

     

    Final Solution:

     

    1. On the CRM 4.0 Server
      1. Update attribute set IsCustomField = 1 where name = 'IsIntegrationUser'  
      2. Modify the SystemUserExtensionBase table and add a column for IsIntegrationUser with type bit.
      3. Navigate to Settings -> Customisability -> users -> attributes -> and delete the IsIntegrationUser value
      4. Now go to the SystemUserBase table and delete the IsIntegrationUser column if it still exists.
      5. Backup the CRM Database from SQL Management Studio
    2. On the CRM 2011 Server
      1. Restore the 4.0 CRM Database to SQL
      2. Navigate to Organizations, and import the old CRM Database

     

    Wednesday, May 18, 2011 9:45 PM