Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Migration from CRM 4.0 to 2011

Posted on by Microsoft Employee

While doing migration from CRM 4.0 to CRM 2011 we are seeing below errors. Can someome please help?

Violation of PRIMARY KEY constraint 'PK__#CRMUser__59D4927787DAA449'. Cannot insert duplicate key in object 'dbo.#CRMUserColumns'. The duplicate key value is (ActivityPointerBase, DeletionStateCode).


Violation of PRIMARY KEY constraint 'PK__#CRMDefa__59D492777F3602E5'. Cannot insert duplicate key in object 'dbo.#CRMDefaultValues'. The duplicate key value is (ActivityPointerBase, DeletionStateCode).

But in trace I see this error. 

Crm Exception: Message: LookupAccountNameW failed with error, ErrorCode: -2147214038
[2018-06-01 08:46:34.916] Process: mmc |Organization:00000000-0000-0000-0000-000000000000 |Thread: 10(UserMappingProgressPage-Worker-thread) |Category: ADUtility |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: | SecurityUtils.GetSidFromAccount ilOffset = 0x0
>Error while retrieving SID from account domain\username . Exception: Microsoft.Crm.CrmSecurityException: LookupAccountNameW failed with error
at Microsoft.Crm.SecurityUtils.GetSidFromAccount(String accountName)

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Migration from CRM 4.0 to 2011

    We are ignoring the user mapping errors. For the Violation of PRIMARY KEY constraint error we are trying to remove all custom Db objects (sp,index etc) which are created by us and not crm. These objects seems conflicting with CRM Dynamics objects while migrating it. This is seems complex task but I dont see any other way.  

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Migration from CRM 4.0 to 2011

    Hi Akad, could you resolved this?, I have the same error :(...

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Migration from CRM 4.0 to 2011

    The error code -2147214038 (80041d2a) is 'The object does not exist in active directory.', which makes sense if the users no longer exist in AD. A workaround is to create dummy AD accounts for the disabled users, and map these users to the dummy accounts during the import

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Migration from CRM 4.0 to 2011

    Thanks David for reply.

    ### AD User issue - There is no issue while connecting to the domain controlled. It seems problem with the Disabled users. There are few users which are not in company so we have disabled them in CRM. But while doing import organization it is still validating  against active directory.  We tried with custom user mapping file by putting only active users there but still the same issue.  Any thoughts why it is happening?

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Migration from CRM 4.0 to 2011

    These look like 2 different errors, which are probably not related.

    The LookupAccountNameW message indicates a problem communicating with a domain controlled to check either a username or service account name. This is probably when mapping users, and may or may not be a problem. I'd check that the CRM Server is using a valid, working domain controller (check the LogonServer by running the SET command in the command prompt), and see if there are any error messages in the event log on the domain controller

    The 'Violation of PRIMARY KEY constraint' indicates a data issue. One possibility is that you have duplicate copies of deleted records in the activitypointerbase table. This shouldn't happen, and is most likely due to unsupported direct SQL modification. Or it may be a relic of previous CRM versions. Do you know what CRM version the organisation(s) started with ? If it was CRM 1.x this may cause this problem

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans