locked
CRM 2011: sync issue RRS feed

  • Question

  • Hi

    I am facing error while synchronization with folder redirection

    Exception occurred during SQL CE insert:Microsoft.Crm.CrmException: SQL CE Database file is being used by a different process ---> System.Data.SqlServerCe.SqlCeException: There is a file sharing violation. A different process might be using the file. [ \\servername\users$\username\WINDOWS\AppData\Microsoft\MSCRM\Client\OutlookSyncCache.sdf ]

    Solution already tried:

    1. UNC for redirected folder path is done already.

    2. All the steps in following link done already. http://support.microsoft.com/kb/2616319

    Issue still remains. Please help!


    • Edited by CRMDevlpr Friday, March 22, 2013 10:09 AM
    Friday, March 22, 2013 10:06 AM

Answers

  • Hi Scott

    Thanks for replying and sorry for updating this so late.

    Finally this was solved. I used Process explorer to check what is happening in background.

    Found out that citrix was still referring to old sqlce version 3.5.

    • Marked as answer by CRMDevlpr Thursday, April 4, 2013 8:48 AM
    Thursday, April 4, 2013 8:48 AM

All replies

  • Hi,

    I know its obvious, but have you checked all the steps are correctly followed, and rebooted?


    Scott Durow
    Read my blog: www.develop1.net/public     Follow Me on Twitter
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Sunday, March 24, 2013 8:34 PM
    Answerer
  • Hi,

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

    To run Microsoft Dynamics CRM 2011 when the Application Data folder is located on a remote share, follow these steps:
      • 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)    
        Notes
        • This step requires elevated permissions.
        • In SQL Server CE 4.0, 64-bit clients do not have to install the 32-bit version.
      • Add the following XML code under the configuration element in the CrmClient{14B13B7A-CA08-40bd-AC60-8C45367E807C}.config file that is located in the Program Files\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>
        Notes
        • This step requires elevated permissions.
        • Make sure that you add this code before the </configuration> tag.
      • Additionally, there is a second configuration file that the configuration wizard calls.  The file is named Microsoft.Crm.Application.Outlook.ConfigWizard.exe.config, and the file is located in the C:\Program Files\Microsoft Dynamics CRM\Client\ConfigWizard folder:
        <configuration>
          <startup>
            <supportedRuntime version="v4.0.30319" />
          </startup>
          <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
              <probing privatePath="..\bin"/>
              <dependentAssembly>
                <assemblyIdentity name="System.Data.SqlServerCe"
                publicKeyToken="89845dcd8080cc91"
                culture="neutral" />
                <bindingRedirect oldVersion="3.5.1.0"
                newVersion="4.0.0.0"/>
              </dependentAssembly>
            </assemblyBinding>
          </runtime>
          <system.net>
            <defaultProxy useDefaultCredentials="true" />
          </system.net>
        </configuration>
      • Delete all SDF files in the <var>%localappdata%</var> and <var>%appdata% </var>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 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://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
            (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx)    
    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



    • <var>%LocalAppData%\Microsoft\MSCRM\Client</var>
      • 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.
    <var>%AppData%\Microsoft\MSCRM\Client</var>
    • EmailCache.sdf

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

      Note
      This file contains internal state for sync.

    http://support.microsoft.com/kb/2616319

    Hope helps!


    This might be helpful, if so mark this as "Answer" or "Vote as helpful"

    • Proposed as answer by Ade Budiman Monday, April 1, 2013 6:06 AM
    • Unproposed as answer by CRMDevlpr Thursday, April 4, 2013 8:48 AM
    Monday, April 1, 2013 6:05 AM
  • @CRMDevlpr - Did you get anywhere with this - did you double check the steps and do the re-boot?

    @Ade - It isn't helpful if you just copy and paste a knowledge base article verbatim into the forums - especially when the OP mentioned that they had already tried that particular KB article.


    Scott Durow
    Read my blog: www.develop1.net/public     Follow Me on Twitter
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Monday, April 1, 2013 5:43 PM
    Answerer
  • Hi Scott

    Thanks for replying and sorry for updating this so late.

    Finally this was solved. I used Process explorer to check what is happening in background.

    Found out that citrix was still referring to old sqlce version 3.5.

    • Marked as answer by CRMDevlpr Thursday, April 4, 2013 8:48 AM
    Thursday, April 4, 2013 8:48 AM