Solved

Import the same organization in CRM 2011

Posted on 2011-09-10
3
999 Views
Last Modified: 2012-05-12
Hi,
I have a CRM 2011 Enterprise and I want  import the same organization  (with other name) in to the same server, this procedure work in CRM 4.0, but in CRM 2011 I have an error.
I already read in a post that the problem is the organizationid, but I can´t know how can change it. The post talk about change organizationid before import it.
Any idea?

Thanks!
0
Comment
Question by:esteban_gnra
  • 2
3 Comments
 
LVL 2

Expert Comment

by:dequaja
ID: 36954476
Solution from: http://social.microsoft.com/Forums/en-US/crmdeployment/thread/b8dfb946-bb02-4fb9-a92f-22ffb8b7071c/



SELECT 'ALTER TABLE '+QUOTENAME(name)+' NOCHECK CONSTRAINT ALL'
FROM sysobjects WHERE xtype='U' and uid=1

declare @newid uniqueidentifier

select @newid = newid()

 SELECT  
        'Update ' + c.TABLE_SCHEMA + '.' + c.TABLE_NAME + ' set ' + c.COLUMN_NAME +' =''' + +cast(@newid as varchar(40))+''''
    FROM INFORMATION_SCHEMA.Columns c
        INNER JOIN INFORMATION_SCHEMA.Tables t
        ON c.TABLE_NAME = t.TABLE_NAME
        AND t.TABLE_TYPE = 'BASE TABLE'
    WHERE DATA_TYPE = 'uniqueidentifier'  and column_name='organizationid'
   
SELECT 'ALTER TABLE '+QUOTENAME(name)+' CHECK CONSTRAINT ALL'
FROM sysobjects WHERE xtype='U' and uid=1



These 3 scripts return set of sql scripts which must be executed to change te organizationid.

After this change you can import the organization to CRM.

0
 

Accepted Solution

by:
esteban_gnra earned 0 total points
ID: 37005916
thanks, I install a new server temporaly to import
0
 

Author Closing Comment

by:esteban_gnra
ID: 37035249
ok
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now