Answered by:
CRM Import Problems

Question
-
We're trying to import an organization from a live environment into a new dev environment. Both are running Dynamics CRM 4.0 with rollup 7. I know the rollup is old, but that's what they are using. When trying to import, we get the following error. Does somebody know how to get around this? Thanks
02:17:53| Error| Import Organization (Name=CRMCS, Id=00beab1f-aea2-e011-b94a-0050568c0131) failed with Exception:
System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'UQ_SystemUserBaseActiveDirectoryGuid'. Cannot insert duplicate key in object 'dbo.SystemUserBase'. The duplicate key value is (9e4a8dcb-e052-463c-b1cd-b100a28396bc).
The statement has been terminated.
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.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.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.Tools.Admin.DBImportHelper.UpdateSystemUserReferences(IDbCommand command, Guid oldSystemUserId, Guid newSystemUserId, Guid newAdObjectGuid, DomainAccount newAdDomainAccount)
at Microsoft.Crm.Tools.Admin.DBImportHelper.UpdateSystemUserAndReferences(IDbCommand command, User user, Guid organizationId)
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, String privilegedUserGroupName, String sqlAccessGroupName, String userGroupName, String reportingGroupName, String privilegedReportingGroupName, ICollection`1 users, MultipleTenancy multipleTenancy)
Thursday, June 30, 2011 3:22 PM
Answers
-
They're migrating some users from a local AD to a global AD. So if the user gets moved to the global AD and not disabled in CRM, both the old and the new are getting mapped to the same person?
Yes, you might need to disable old user account (if it will be disabled in local AD) and create new user account as per Global AD (you have to reassign records) prior to import and also make sure to map every user during organization import wizard.Try mapping all user accounts manually during import wizard and i hope this will resolve your issue.
Jehanzeb Javeed
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
- Proposed as answer by Jehanzeb.Javeed Thursday, June 30, 2011 7:50 PM
- Marked as answer by Donna EdwardsMVP Saturday, July 9, 2011 10:37 PM
Thursday, June 30, 2011 7:47 PM
All replies
-
Hi,
Make sure to check if you ever have deleted any user account from Active Directory and recreated, then their original accounts in CRM must need to be deactiveated and new one created, take backup and import into Development environment.
Are you using same Active Directory with devlopment environment?
Jehanzeb Javeed
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
- Edited by Jehanzeb.Javeed Thursday, June 30, 2011 4:21 PM Quesiton Added
Thursday, June 30, 2011 3:56 PM -
The same account exists in both systems it seems. You might have to map the users differently when importing the org.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!Thursday, June 30, 2011 4:02 PMModerator -
They're migrating some users from a local AD to a global AD. So if the user gets moved to the global AD and not disabled in CRM, both the old and the new are getting mapped to the same person?Thursday, June 30, 2011 7:36 PM
-
If existing mappings are kept, does the import make sure not to map to the same ids or could it still do that?
Thursday, June 30, 2011 7:37 PM -
They're migrating some users from a local AD to a global AD. So if the user gets moved to the global AD and not disabled in CRM, both the old and the new are getting mapped to the same person?
Yes, you might need to disable old user account (if it will be disabled in local AD) and create new user account as per Global AD (you have to reassign records) prior to import and also make sure to map every user during organization import wizard.Try mapping all user accounts manually during import wizard and i hope this will resolve your issue.
Jehanzeb Javeed
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
- Proposed as answer by Jehanzeb.Javeed Thursday, June 30, 2011 7:50 PM
- Marked as answer by Donna EdwardsMVP Saturday, July 9, 2011 10:37 PM
Thursday, June 30, 2011 7:47 PM