You have already imported and upgraded this organization

Since importing CRM 4 customisations xml is not possible with Dynamics CRM 2011 Beta 1, using the import organisation wizard is the only option. During development, I’ve found that there is no way of importing and upgrading a CRM 4.0 organisation more multiple times. Once you import and upgrade a CRM 4 organisation, the OrganisationId is retained in the database (rather than a new one being assigned as for when you import a CRM 2011 organisation database), so importing and upgrading the same organisation results in the error "You have already imported and upgraded this organization". Even if you delete the previous import, the import still fails.

To get around this I used the following steps:

Warning: I'm doing this a development environment, and this is something that you would never do in production. Also, always make a backup first.

1. Disable and Delete the previously imported organisation using Deployment Manager

2. Run the following script against the MSCRM_Config database. Replace 'YourOrgName' with the name of the organisation you used when importing the first time.

-- Remove a previously imported and upgrade organisation
DECLARE @orgName nvarchar(255) ='YourOrgName' 
DECLARE @organisationid uniqueidentifier
SELECT @organisationid=ID from Organization WHERE UniqueName=@orgName
DELETE FROM SystemUserOrganizations where OrganizationId=@organisationid
DELETE FROM OrganizationProperties where ID=@organisationid
DELETE FROM OrganizationFeatureMap where OrganizationId=@organisationid
DELETE FROM OrganizationMaintenanceJobs where OrganizationId=@organisationid
DELETE FROM Organization where ID=@organisationid


 

 3. Re-import the organisation using Deployment Manager

 

Comments are closed