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


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 ]. 


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


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:

    In SQL Server CE 4.0, 64-bit clients do not have to install the 32-bit version.
    NoteThis 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:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <assemblyIdentity name="System.Data.SqlServerCe"
    culture="neutral" />
    <bindingRedirect oldVersion=""

    NoteThis 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.

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


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:

  4. Find the Outlook.exeprocess, and then double-click it.
  5. Select the .NET Assemblies tab, and then expand AppDomain: SharedDomainif 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:

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

List of databases in CRM

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

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

      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

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

      This file contains internal state for sync.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: