Friday, 3 January 2014

Renaming a standalone instance of Dynamics CRM 2011

As part of our development environment setup we recently needed to rename a stand alone instance of a CRM server and wanted to avoid re-installing. It's not the kind of thing you do very often so I figured I'd document it here for future reference.

NB. My instance was hosted on SQL Server 2012 but the steps should be the same in earlier versions.

This is unsupported: do not attempt this in any environment you can not afford to trash.

The steps are as follows:

1. Rename the server and Reboot

If you are cloning your server you will need to remove it from the domain and rename it whilst it has no network connection to the domain controller. This will ensure the original server you are cloning from remains attached to the domain and working. You will also need to allocate this server a new IP address if it currently has a static one. You can then add this new server back onto the domain.

2. Fix SQL Server and Restart Services

a. In SQL Server Management Studio run the following SQL:
sp_dropserver <old_name>;
sp_addserver <new_name>, local;
b. Restart SQL Server Services.
c. Run SELECT @@SERVERNAME to confirm the rename has succeeded.
See for further details on 
renaming instances of SQL Server.

3. Fix Reporting Services

a. Open up Reporting Services configuration Manager
b. Ensure the server name in the connection dialogue points to your new server name.
c. Ensure Web Service URL is correct (it should be but there's no harm checking).
d. Click Database > Change Database > Choose an existing report server...
e. Enter your new server name into the connection dialogue
f. Choose ReportServer database and complete wizard.

See for further details.

4. Update MS CRM Registry Entries

a. Run Regedit (Start > Run > Regedit)
b. Navigate to the MSCRM registry hive (HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSCRM)
c. Update the configdb and ServerUrl settings with your new server name.

5. Update MS CRM Configuration Database Settings

Open up SQL Server management studio and run the following script:

UPDATE [Server] 
SET [Name] = '<NewServerName>';
UPDATE ConfigSettings 
SET [HelpServerUrl] = REPLACE([HelpServerUrl]'<OldServerName>','<NewServerName>');
UPDATE Organization 
SET [ConnectionString] = REPLACE([ConnectionString],'<OldServerName>','<NewServerName>'),
[SqlServerName] = '<NewServerName>', 
[SrsUrl] = REPLACE([SrsUrl],'<OldServerName>', LOWER('<NewServerName>'));

6. Update CRM Security Group Membership in Active Directory 

If you renamed your server whilst it was connected to the Domain Controller this step is not necessary (you might want to check though just to be sure).
a. Log onto your Domain Controller as a Domain Admin
b. Open up Active Directory Users and Computers and navigate to the Security Groups created by the original CRM installation process for your server. Eg. PriveReportingGroup, PrivUserGroup, SQLAccessGroup.
c. Open each group and add your new server as a member to each.
NB. You will need to select "Computers" as an Object Type.

7. Update Deployment Manager Web Address Properties

Open up CRM Deployment manager on your CRM server. Right click the root node "Microsoft Dynamics CRM" and choose properties. Click the Web Address tab and update the urls with the new server name.

8. Reboot your CRM Server

Navigate to CRM in your browser to confirm it's up and running. Choose and run a report to confirm SSRS is working too.

No comments:

Post a Comment