Microsoft KB Archive/872585

= How to re-create replication and enable publishing for Microsoft Business Solutions CRM Sales for Outlook =

Article ID: 872585

Article Last Modified on 1/3/2006

-

APPLIES TO

 Microsoft Business Solutions CRM Sales for Outlook, when used with:  Microsoft CRM 1.2

 Microsoft Business Solutions CRM 1.0 

-



SUMMARY
This article describes how to re-create replication and to enable publishing on the Microsoft SQL server, where the Microsoft Business Solutions CRM databases reside. You may receive one of the following error messages during the Microsoft CRM Sales for Outlook client (Outlook client) synchronization process:
 * An error has occurred. For more information please contact your system administrator.
 * An unknown error has occurred. Retry the action. If the problem persists, contact your system administrator.
 * Invalid Subscription.



Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

You will have to disable publishing and then manually re-create replication. If Microsoft CRM Sales for Outlook is installed, you will have to complete additional steps on the Outlook client computers.

Disable publishing and remove the replication components.  Log on to the Microsoft SQL server as a SQL Server Administrator user. Click Start, point to Programs, point to Microsoft SQL Server, and then click Enterprise Manager.</li> In Enterprise Manager, expand Microsoft SQL Servers, expand SQL Server Group, expand the instance where Microsoft CRM was installed, right-click the Replication folder, and then click Disable Publishing. To disable publishing, follow the instructions in the Disable Publishing and Distribution Wizard for  wizard.</li> After you have disabled publishing, run the following SQL script against the _MSCRM database to remove old replication system objects, where   is the licensed company name. Follow these steps to run the script: <ol style="list-style-type: lower-alpha;"> On the Microsoft SQL server, click Start, point to Programs, point to Microsoft SQL Server, and then click Query Analyzer.</li> In the Connect to SQL Server dialog box, click to select your Microsoft SQL Server in the SQL Server drop-down list, and then click OK.</li> On the toolbar, click to select the  _MSCRM database from the Database drop-down list.</li> Click the following link for the SQL script, and then copy and paste the script into Query Analyzer: http://mbs.microsoft.com/downloads/public/KnowledgeBase/KB872585.txt</li> Click Query and then click Execute.</li></ol> </li></ol>

Enable publishing for Microsoft CRM 1.2.
 * 1) Log on to the Microsoft CRM server as Microsoft CRM System Administrator user. Click Start, point to Programs, point to Microsoft CRM, and then click Deployment Manager.
 * 2) In Deployment Manager, click Server Manager. In the right window of Server Manager, right-click , and then select Configure SQL Server.
 * 3) Select the Microsoft SQL server from the SQL Server drop-down list, click Next, and then click Finish.

Note: If you cannot successfully enable publishing by using Deployment Manager, follow the steps in the 'Enable publishing for Microsoft 1.0' section.

Enable publishing for Microsoft CRM 1.0. <ol> Log on to the Microsoft SQL server as a SQL Server Administrator user. Click Start, point to Programs, point to Microsoft SQL Server, and then click Query Analyzer.</li> In the Connect to SQL Server dialog box, click to select your Microsoft SQL Server in the SQL Server drop-down list, and then click OK.</li> On the toolbar, click to select the  _MSCRM database from the Database drop-down list.</li>  Type the following command in the Query box. Click Query and then click Execute: EXEC p_CRMReplicationSetup ‘SQL Server name’, ‘SQL Server name’, ‘Microsoft CRM MSCRM database name’, ‘Microsoft CRM Metabase database name’, 'Replication SQL Server directory', 'SQL login group name', ‘Microsoft CRM MSCRMDistribution database name’ Note: If you copy the script from this article, the single quotation mark used in Microsoft Word will not match the single quotation mark symbol used in Microsoft SQL. Make sure all single quotations marks are deleted and re-added in SQL Query Analyzer. All entries enclosed in quotation marks will be red when you view them in SQL Query Analyzer.   is the database that has a name in the format  _MSCRM.</li>  is the database that has a name in the format  _METABASE.</li>  is the path of the REPLDATA directory on the SQL Server. For example: .</li>  is the name in the Logins node under Security. It is in the format  \SQLRepl { }.

To find the SQL login group name, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>On the Microsoft SQL server, click Start, point to Programs, point to Microsoft SQL Server, and then click Enterprise Manager.</li> <li>In Enterprise Manager, expand Microsoft SQL Servers, expand SQL Server Group, expand the instance where Microsoft CRM was installed, and then expand the Security folder. Click Logins.</li> <li>In the right window pane, right-click the  \SQLRepl { }, and then click Properties.

</li> <li>In the Properties dialog box, click the Database Access tab.</li> <li>The SQL login group name is the name in the User column for one of the populated rows. Use any one of the names that this column lists.</li> <li>Right-click the name, click Copy, and then paste the name from the User column in the  parameter in the EXEC command line.</li></ol> </li></ul>

<ul> <li> is the database that has a name in the format  _MSCRMDistribution. If you do not see this database in SQL, specify the database name as  _MSCRMDistribution.</li></ul> </li></ol>

For example, for an organization that has the name, that has users in the domain named  , and is installed to a SQL Server that is named  , use a command that is similar to the following command: EXEC p_CRMReplicationSetup 'MySQLSvr', 'MySQLSvr', ‘My_Organization_MSCRM', ‘My_Organization_METABASE', 'C:\Program Files\Microsoft SQL Server\MSSQL\REPLDATA', ‘MyDomain\SQLRepl {E5334FB9-440A-4BD8-A19A-0FA54E6B248C}', ‘My_Organization_MSCRMDistribution'

Verify that the replication components were created. <ol> <li>Log on to the Microsoft SQL server as a SQL Server Administrator user. Click Start, point to Programs, point to Microsoft SQL Server, and then click Enterprise Manager.</li> <li>In Enterprise Manager, expand Microsoft SQL Servers, expand SQL Server Group, expand the instance where Microsoft CRM was installed, and then expand Replication Monitor.</li> <li>Expand Publishers, and then expand your, where you will find two publishers. One with a prefix of CRMMetaPub and the other with a prefix of CRMPub.</li> <li>Click CRMMetaPub. In the right window, right-click Snapshot and then click Start Agent.</li> <li>In the same location, click CRMPub. In the right window, right-click Snapshot and then click Start Agent.

Note The snapshot publications may take from five to ten minutes to finish. After the CRMMetaPub snapshot is completed, you receive the following message:

A snapshot of 79 article(s) was generated.

After the CRMPub snapshot is completed, you receive the following message:

A snapshot of 93 article(s) was generated.

.</li> <li>After the snapshots are generated successfully, verify that the schedule for the snapshot jobs was deleted. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Right-click the CRMMetaPub snapshot, and then click Agent Properties.</li> <li>In the Agent dialog box, click the Schedule tab.</li> <li>If any jobs are listed, click each one, click Delete, and then click OK.</li> <li>Complete steps a to c for the CRMPub snapshot agent.</li></ol> </li></ol>

If this is a new installation of the Sales for Outlook client, you will now be able to successfully go offline. If this is an existing installation of the Outlook client, you will have to complete additional steps on the Outlook client computers.

Delete any Outlook client replication attempts.

Note Make sure that the Outlook client is online. If the actions that are described in this section are performed when the Outlook client is offline, you will have to re-install the Outlook client. <ol> <li>Log on to the Microsoft SQL server as a SQL Server Administrator user. Click Start, point to Programs, point to Microsoft SQL Server, and then click Enterprise Manager.</li> <li>In Enterprise Manager, expand Microsoft SQL Servers. Right-click SQL Server Group, and then click New SQL Server Registration.</li> <li>Register the Outlook client MSDE instance with the Register SQL Server Wizard wizard. For example, if the Outlook client computer name is, the MSDE instance is named  \CRM.

If you cannot successfully connect to the Outlook client remotely with Enterprise Manager, follow steps 3a to 3f to enable this connection. If you can successfully connect, continue to step 4. <ol style="list-style-type: lower-alpha;"> <li>In Microsoft Windows Explorer on the Outlook client computer, locate .</li> <li>Right-click the SVRNETCN.exe file, and then click Open.</li> <li>Click the General tab, and then select the Outlook client MSDE instance from the Instance(s) on this server: drop-down list. For example:  \CRM.</li> <li>Click TCP/IP in the Disabled protocols section, and then click Enable.</li> <li>Click OK.</li> <li>Restart the Outlook client computer.</li> <li>The SQL Server Service Manager will now successfully connect to the Outlook client MSDE instance.</li></ol> </li> <li>After you register the Outlook client MSDE instance, locate the Subscriptions folder under the Replication folder.</li> <li>In the Subscriptions folder, delete both Outlook client subscription names. These subscriptions may not exist, depending on where the error occurred when you went offline.</li></ol>

Delete three registry keys.

Note Make sure that the Outlook client is online. If the actions that are described in this section are performed when the Outlook client is offline, you will have to re-install the Outlook client.

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
 * 1) On the Outlook client computer, click Start, click Run, type Regedit and then click OK.
 * 2) In Registry Editor, click My Computer, and then right-click Export. Export the whole registry entry for the Outlook client computer.
 * 3) In Registry Editor locate the following subkey:.
 * 4) Right-click the UserReplicationID registry subkey in the right window pane, and then click Delete.
 * 5) In the same location, right-click the SQLServerName registry subkey in the right window pane, and then click Delete.
 * 6) In the same location, right-click the LastSyncDate registry subkey in the right window pane, and then click Delete.
 * 7) Restart Microsoft Outlook.
 * 8) Verify that you can successfully synchronize the Outlook client.

Keywords: kberrmsg kbmbsmigrate KB872585

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.