Article ID: 2616319 - Last Review: October 17, 2011 - Revision: 4.0

Error occurs when you run the "Synchronize with CRM" function in the Microsoft Dynamics CRM 2011 client for Outlook

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Expand all | Collapse all

SYMPTOMS

Assume that you use the Microsoft Dynamics CRM 2011 client for Microsoft Office Outlook and that folder redirection is enabled on the client. When you try to track an item or run the Synchronize with CRM function in this situation, you receive an error message that resembles the following:
[2011-09-07 11:11:08.517] Process:OUTLOOK |Organization:00000000-0000-0000-0000-000000000000 |Thread: 24 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error | CrmException..ctor
at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException)
at CrmException..ctor(String message, Exception innerException)
at CrmSqlCeConnection.<Open>b__2(SqlCeException ex)
at ExceptionFilter.TryFilter(Action body, Predicate`1 filter, Action`1 catchClause)
at IdMappingTable.MarkAllItemsNotVisited()
>Crm Exception: Message: SQL CE Database file is being used by a different process, ErrorCode: -2147220970, InnerException: There is a file sharing violation. A different process might be using the file. [ \\<server>\C$\<user>\Microsoft\MSCRM\Client\OutlookSyncCache.sdf ].

CAUSE

This problem occurs because of a limitation in Microsoft SQL Server 2000 Windows CE Edition 3.5 (SQL Server CE 3.5).

RESOLUTION

To run Microsoft Dynamics CRM 2011 when the Application Data folder is on a remote share, follow these steps:
  1. Install SQL Server CE 4.0. To do this, visit the following Microsoft website:
    http://www.microsoft.com/download/en/details.aspx?id=17876 (http://www.microsoft.com/download/en/details.aspx?id=17876)
    In SQL Server CE 4.0, 64-bit clients do not have to install the 32-bit version.
    Note This step requires elevated permissions.
  2. Add the following XML code under the configuration element in the CrmClient{14B13B7A-CA08-40bd-AC60-8C45367E807C}.config file in the PFiles\MSCRM\Client folder:
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
    <assemblyIdentity name="System.Data.SqlServerCe"
    publicKeyToken="89845dcd8080cc91"
    culture="neutral" />
    <bindingRedirect oldVersion="3.5.1.0"
    newVersion="4.0.0.0"/>
    </dependentAssembly>
    </assemblyBinding>
    </runtime>
    Note This step requires elevated permissions.
  3. Delete all SDF files in the %localappdata% and %appdata% folders. For more information, see the "List of databases in CRM" section.

    Note
    SDF files that were created in SQL Server CE 3.5 are incompatible with SQL Server CE 4.0.

Warning

After you upgrade from SQL Server CE 3.5 to SQL Server CE 4.0, you may experience a decrease in performance the first time that you run Microsoft Dynamics CRM. This behavior occurs because Microsoft Dynamics CRM must re-create all caches. Some caches are affected by the size of the Inbox.

Verification steps

To verify that you have applied the resolution correctly, follow these steps:
  1. Start Outlook after you perform all the steps from earlier in the "Resolution" section.
  2. Make sure that the Microsoft Dynamics CRM plug-in starts correctly.
  3. Start the Process Explorer tool.
    To download Process Explorer, visit the following Microsoft website:
    http://live.sysinternals.com/procexp.exe (http://live.sysinternals.com/procexp.exe)
  4. Find the Outlook.exe process, and then double-click it.
  5. Select the .NET Assemblies tab, and then expand AppDomain: SharedDomain if it is not expanded already.
  6. Find System.Data.SqlServerCe in the list. Make sure that the path contains the following version of SQL Server CE:
    C:\windows\assembly\GAC_MSIL\System.Data.SqlServerCe\4.0.

    Note
    If the path contains SQL Server CE 3.5.1.0, assembly redirection will not work.

List of databases in CRM

  • %LocalAppData%\Microsoft\MSCRM\Client
    • CrmCache.sdf

      Note
      This file contains non-metadata platform caches.
    • {Guid}[true|false].sdf

      Note
      This file contains MAPI store internal storage.

    Note There may be multiple files of this kind, for offline and online use.
  • %AppData%\Microsoft\MSCRM\Client
    • EmailCache.sdf

      Note
      This file contains mappings between CRM and MAPI items.
    • OutlookSyncCache.sdf

      Note
      This file contains internal state for sync.

MORE INFORMATION

In order to use folder redirection in Microsoft Dynamics CRM, you must use Universal Naming Convention (UNC) paths.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684  (http://support.microsoft.com/kb/824684/LN/ ) Description of the standard terminology that is used to describe Microsoft software updates
For more information about Microsoft Business Solutions CRM software hotfix and update package terminology, click the following article number to view the article in the Microsoft Knowledge Base:
887283  (http://support.microsoft.com/kb/887283/ ) Microsoft Business Solutions CRM software hotfix and update package naming standards

APPLIES TO
  • Microsoft Dynamics CRM 2011
  • Microsoft CRM client for Microsoft Office Outlook
Keywords: 
kbmbsmigrate kbsurveynew kbqfe kbfix kbexpertiseinter kberrmsg KB2616319