Hi CasperJ,
Follow below an explanation of the synchronization proccess, we need to identify where it is failing, if it is on the BCP files generation or on the BCP files download from the client side.
I would suggest to collect a fiddler trace to check the download of the bcp.
(http://www.microsoft.com/en-gb/download/details.aspx?id=2737)
After
PrepareSync and downloading server customizations to the offline client, the
last step in the offline synchronization process is to move the data to the
offline client’s local data store. The Move Data step uses the following logic:
1. Server receives from offline client a web request to download a BCP
data file
2. Internal handler calls the GenerateSyncData() API and inserts header
information into the appropriate BCP file
3. HTTP handler streams the BCP data file to the offline client
4. Offline client uses BULK INSERT command to insert relevant
information into the appropriate tables in the client’s local database
BCP data files contain
information (in native SQL format) that is transferred to the offline client
and inserted into tables in the client database. To generate BCP files, entity
tables are joined with the SyncEntry table (which was populated correctly
during the Prepare Sync step) to retrieve the data that needs to be transferred
to the offline client. Note that only records marked as SyncState = 1 are
retrieved from Entity tables; for records marked as SyncState = 2, the server
only returns IDs. After the information contained in a BCP data file is
transferred to the offline client database, the file is deleted from server.
Note: BCP data files are read-accessible only to the owner of the
associated subscription. They are stored on the CRM Web server in the install
folder Server\OfflineData and use the naming convention <SubscriptionId>.bin (where SubscriptionId is the GUID assigned to
the user subscription). On the client computer, BCP data files are stored in
the folder AppData\Microsoft\MSCRM\BCP.
The HTTP handler is
responsible for transporting BCP data files over the network. The CRM Web server implements a Web service
that the offline client can use to download BCP data files from the server.
The
offline client generates web requests to the server regarding downloading BCP
data files. For example an offline client’s web request might use the following
syntax:
http://server/MSCRMServices/OfflineSync.ashx?SubscriptionId={7D4F38B5-BC58-46CD-B3AB-721DEE532F86}&EntityName=Account&Action=2&BatchSize=0
When the server
receives the web request from the offline client, an internal handler generates
the BCP data file (as described earlier) and then returns the file to the
offline client in the WebResponse. Before sending the BCP data file, however,
the internal handler inserts a header in the following format:
// BCP file header
// ----------------------------------------------
// | hr | file_size | metadata_version |
// ----------------------------------------------
// hr
- 4 bytes. Indicates result code of request. S_OK - successful.
// file_size
- 8 bytes. File size.
// metadata_version - 4 bytes. Metadata version
Thank
you for using Microsoft Dynamics CRM Communities,
Dynamics CRM Support Blog
Allan
Silva
Support
Engineer
Microsoft
Dynamics CRM