locked
Error Importing Existing Organisation RRS feed

  • Question

  • Hi,

     

    I'm attempting to move an operational CRM 4.0 database to a new server.

    After successfully restoring the database I click Import from Deployment Manager which fails. I have included an excerpt from the log.

     

    I have searched SystemUserBase.ActiveDirectoryGuid for the GUID e8413490-9571-dd11-9be1-00155d005b13 but have not been able to find a value. 

    At this stage I'm not sure what else to check.

     


    14:54:09|  Error| Import Organization (Name=MyCompnay, Id=e8413490-9571-dd11-9be1-00155d005b13) failed with Exception:
    System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'UQ_SystemUserBaseActiveDirectoryGuid'. Cannot insert duplicate key in object 'dbo.SystemUserBase'.
    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)
    14:54:09|Warning| Attempting to cancel a long running process: ProgressWizard. This might leave the data in an invalid state and the application might not function correctly.
    14:55:38|  Error| Import Organization (Name=MyCompnay, Id=e8413490-9571-dd11-9be1-00155d005b13) failed.
    The changes made during Import Organization could not be rolled back. Please manually delete the Organization database from the 'ServerName' SQL Server if it was not successfully deleted.

    System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
       at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
       at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
       at System.Data.SqlClient.TdsParserStateObject.ReadByte()
       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.InternalExecuteReader(IDbCommand command)
       at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoRetrieveMultiple(BusinessEntityCollection entities, EntityExpression entityExp, ExecutionContext context)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.RetrieveMultiple(EntityExpression entityExpression, ExecutionContext context)
       at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.RemoveExistingUsersFromConfigDatabase(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)

     

    Thanks

    Sunday, August 24, 2008 5:48 AM

Answers

  • Do you get to the part where you choose to auto map the users?  It looks like the problem you are having is that there is a conflict with one of the users, such as it is mapping a user to a CRM User record, and that Active Directory user already has a different user record in the database.

     

    I would recommend that you call Microsoft support, and they can give you the steps for fixing this in a supported manner.

    Sunday, August 24, 2008 10:59 AM
    Moderator

All replies

  • Do you get to the part where you choose to auto map the users?  It looks like the problem you are having is that there is a conflict with one of the users, such as it is mapping a user to a CRM User record, and that Active Directory user already has a different user record in the database.

     

    I would recommend that you call Microsoft support, and they can give you the steps for fixing this in a supported manner.

    Sunday, August 24, 2008 10:59 AM
    Moderator
  •  

    Thanks Joel,

     

    Yes I got to the point where I auto map users.

    We had some user accounts which were deleted from Active Directory and recreated. Their original accounts in CRM had to be deactiveated and new one created. I suspect that is the issue.

     

    Would appending a Z to the names of useing a SQL script to update SystemUserBase  be supported by MS?

    Monday, August 25, 2008 2:32 AM
  • Hi,

     After successful database restore when i am doing import organization i am getting the following error:

    Pls guide me


    Cheers : Jeriesh
    Tuesday, November 15, 2011 3:31 PM
  • Hi,

    It looks like you have a different stack trace. Please post the full error from the log file and we'll take a look. Also, since it is different, it is recommended to start a new thread.

    Thanks,

    Matios

    Tuesday, November 15, 2011 10:27 PM
  • Hi Matiso,

         I have the posted the the same error in the following link "http://social.microsoft.com/Forums/en-US/crmdeployment/thread/be4b2424-63ee-4166-b8a9-2363e42f5a11/" kindly guide me.....

     

    Thanks in advance

    Jeriesh


    Cheers : Jeriesh
    Wednesday, November 16, 2011 4:18 AM