Schema download in SQL Express 2008(client) from SQL Server Enterprise(Server) RRS feed

  • Question

  • Hi...
    I am buliding one application where we are using SQL Server Enterprise at the Server Side and SQL Server Express 2008 at client side.We are having around 150 tables in the Server side...and also we have more than 1000 clients

    Is there any way to download the table schema from the Server with all the initial data and refernces intact...
    The queries I have :--
    1. Does SQL Express as a client has the capability to download schema from the Server ? If yes then what are the  limitations..
    2. What is best practise in this case

    This is really important and urgent.Please prvide me with any sample or redirect me to some URL..

    Thanks in Advance
    Tuesday, September 1, 2009 6:22 AM


All replies

  • Archan,

    Please see the following link to learn more about retrieveing schema information from the server and applying it on the client:


    Section #2 (provisioning) will give you more clarity on how you would go about accomplishing this task.  Also, the samples that ship with the SDK are going to be useful as well and can be found here:

    C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.0\Runtime\ADO.NET\V3.0\Samples

    Unfortunately, the snapshot generation is not supported on SQL Express (Sql Compact only).  That being said, you could download data that has been bulk exported and bulk import it for initial sync to improve the overall sync time.


    Sean Kelley
    Program Manager




    Wednesday, September 2, 2009 6:51 PM
  • Hi Sean..

    Thank you for your response..

    Can you please share some code block for Schema download specifically for SQL Express 2008.
    Regarding the Path you specified I have v2.0 not v3.0...Am I using some different version of Sync Framework ?

    And also I am trying to create N-Tier architecture with SQL Express 2008 as client and SQL Enterprise 2008 as server.
    If you can give me some inputs in this regard also that will be great help for me...

    Thursday, September 3, 2009 9:39 AM
  • Archan,

    The SQL Express provider was not added until SyncFx v2 CTP2 hence the versioning difference mentioned above.  The code blocks related to downloading the schema to an Express client were found in the first link I mentioned above.  Specifically, I am referring to the section entitled  "Provisioning the Clients".  Code snippet is as follows:


    // This database already exists on the server.

    DbSyncScopeDescription clientSqlDesc = SqlSyncDescriptionBuilder.GetDescriptionForScope("filtered_customer", serverConn);

    SqlSyncScopeProvisioning clientSqlConfig = new SqlSyncScopeProvisioning(clientSqlDesc);



    // This database does not yet exist.


    DbSyncScopeDescription clientSqlCeDesc = SqlSyncDescriptionBuilder.GetDescriptionForScope("filtered_customer", serverConn);

    SqlCeSyncScopeProvisioning clientSqlCeConfig = new SqlCeSyncScopeProvisioning(clientSqlCeDesc);



    The n-tier sample that ships with the SDK (referenced above) demonstrates how you would go about syncing the CE on the client but you should be able to fairly easily swap this logic out with SqlSyncProvider instead.


    Sean Kelley
    Senior Program Manager
    Thursday, September 3, 2009 10:20 PM
  • The samples I have are : --
    1. FileSyncProviderManagedSample
    2. ManagedNTFSSample
    3. NTFSSample
    4. NTFSSampleWithMetadataStore

    They are mainly specific to File Sync not database Sync. Can you please give me some example of 2 Tier and N-tier Database Sync with SQL Express as client..

    Friday, September 4, 2009 6:30 AM
  • I posted the location of the n-tier sample above:

    C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.0\Runtime\ADO.NET\V3.0\Samples

    In order to get this sample you have to download the following bits:



    Sean Kelley
    Senior Program Manager
    Friday, September 4, 2009 4:33 PM