How to set up Microsoft Dynamics CRM 4.0 to support SQL Server 2005 or SQL Server 2008 database mirroring

Article translations Article translations
Article ID: 952278 - View products that this article applies to.
Expand all | Collapse all

INTRODUCTION

Microsoft Dynamics CRM 4.0 supports Microsoft SQL Server 2005 or Microsoft SQL Server 2008 database mirroring. For Microsoft Dynamics CRM to successfully fail over to the mirrored server, some additional configuration is required after you set up Microsoft Dynamics CRM 4.0. This article describes the steps that are required to support database mirroring.

Note This article does not describe how to actually set up database mirroring. For more information about database mirroring, refer to the SQL Server 2005 or SQL Server 2008 documentation.

MORE INFORMATION

To configure failover for the mirrored server, follow these steps:
  1. Create the SQL Server login names for the three CRM security groups on the mirrored server. To do this, follow these steps:
    1. On the principal computer that is running SQL Server, click Start, point to All Programs, point to Microsoft SQL Server 2005 or Microsoft SQL Server 2008, and then click SQL Server Management Studio.
    2. Expand Databases, expand the your organization_MSCRM database, expand Security, and then click Users.
    3. Note the names that are listed under Users. This includes the domain name and the GUIDs at the end of the following groups:
      • PrivReportingGroup
      • ReportingGroup
      • SQLAccessGroup
    4. On the mirrored server that is running SQL Server, click Start, point to All Programs, point to Microsoft SQL Server 2005 or Microsoft SQL Server 2008, and then click SQL Server Management Studio.
    5. Expand Security, right-click Logins, and then click New Login.
    6. In the Login name box, type the name of one of the groups that you noted in step 1c, and then click OK.
    7. Repeat steps 1c through 1f to create SQL Server login names for all three groups from step 1c.
  2. Update the configdb registry subkey. To do this, follow these steps:
    1. On the computer that is running Microsoft CRM Server, click Start, click Run, type regedit in the Open box, and then click OK.
    2. Locate the following registry subkey:
      HKEY_LOCAL_Machine\SOFTWARE\Microsoft\MSCRM
    3. Right-click configdb, and then click Modify.
    4. In the text string in the Value data box, add the following failover information:
      Failover Partner=Name of Mirrored SQL server
      For example, after you add the failover information, the text string in the Value data box should resemble the following:
      Data Source=SQLServer1\SQL1;Failover Partner=SQLServer2\SQL2;Initial Catalog=MSCRM_CONFIG;Integrated Security=SSPI
      Notes
      • Replace SQLServer1\SQL1 with the name of your SQL instance.
      • Replace SQLServer2\SQL2 with the name of your mirrored SQL instance.
    5. Click OK to close the Edit String dialog box.
    6. On the File menu, click Exit to exit Registry Editor.
  3. Update the MSCRM_Config database. To do this, follow these steps.

    Note Make sure that you make a backup of the CRM databases before you run the update statements.
    1. Run the following update statement against the MSCRM_Config database:
      Update Organization set ConnectionString = 'Provider=SQLOLEDB;Data Source="SQLServer1\SQL1";Failover Partner=SQLServer2\SQL2;Initial Catalog=organization_MSCRM;Integrated Security=SSPI' where DatabaseName=organization_MSCRM
      Notes
      • Replace SQLServer1\SQL1 with the name of your SQL instance.
      • Replace SQLServer2\SQL2 with the name of your mirrored SQL instance.
      • Replace organization_MSCRM with the name of your organization database.
    2. Run the following update statement against the MSCRM_Config database:
      Update Organization set MirroredSQLServerName = SQLServer2\SQL2 where DatabaseName = organization_MSCRM
      Notes
      • Replace SQLServer2\SQL2 with the name of your mirrored SQL instance.
      • Replace organization_MSCRM with the name of your organization database.
  4. Repeat step 3 for each organization database that you want to have mirrored.
  5. After you make these changes, reset Internet Information Services (IIS) on the computer that is running Microsoft Dynamics CRM 4.0 Server. To do this, click Start, click Run, type iisreset in the Open box, and then click OK.

REFERENCES

For information about database mirroring in SQL Server 2005, visit the following Microsoft TechNet Web site:
http://technet.microsoft.com/en-us/library/cc917680.aspx
For information about how to configure a database mirroring session for SQL Server 2008 visit the following MSDN Web site:
http://msdn2.microsoft.com/en-us/library/ms188712.aspx

For information about how to configure a database mirroring session for SQL Server 2005 visit the following MSDN Web site:
http://msdn.microsoft.com/en-us/library/ms188712(SQL.90).aspx

Properties

Article ID: 952278 - Last Review: September 11, 2011 - Revision: 3.0
APPLIES TO
  • Microsoft Dynamics CRM 4.0
Keywords: 
kbmbsinstallation kbmbsadministration kbmbsmigrate kbhowto kbexpertiseinter KB952278

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com