none
Moving Sql server database to host ISP from local host. RRS feed

  • Question

  • I am learning about the sync framework and also sql server, . . . at the same time.  In particular, I have been trying to set up synchronization of a sql ce database with a sql express database.  Where I want to be is an n-tier configuration, and I'm not pretty close.
    I can get sync to work on a single application against a local sqlExpress database.
    I have also been able to get sync to work bidirectionally from a class library against a local sqlExpress database.
    I am finally able to get sync to work from a class library through a wcf service against a local sql express database.
    I am not trying to move the sql express database to an isp host.

    The changes to the local sql express setup appears to be just a transition from windows authentication to sql server authentication. 

    I used the SS Import/Export wizard to create the database on the ISP server and just changed the connection string in the wcf configuration.  In testing, I keep getting a TargetInvocationException on the Synchronize() method call.  The inner exception is "Unable to enumerate changes at the DbServerSyncProvider for table ". . . ".

    My question is:
    Is it enough to duplicate the sql express db on the ISP site and just change the connection string in the wcf service?
    or do I need to re-synchronize the local sql ce database against the ISP site?

    I attempted to resynchronize the local sql ce database against the isp host site, but when I specify the isp database in the Configure Data Synchronization dialog, the Cached tables list box starts to load, but eventually gives up leaving the Add, Remove and OK buttons grayed out, so my only option is to cancel, hence unable to complete synchronization.

    Is it necessary to re-synchronize? and if not, what can I do about the "Unable to enumerate changes " exception?

    Thanks for your patience!!


    Robotuner
    Tuesday, November 22, 2011 1:57 AM

Answers

  • Thanks, I'm going to assume that is the problem for now.  I found that the database on my isp was devoid of keys, so I need to rebuild the database correctly before I can move forward with this.

     


    Robotuner
    • Marked as answer by Robotuner Wednesday, November 23, 2011 7:57 PM
    Wednesday, November 23, 2011 7:57 PM

All replies

  • Are you using SQL Change Tracking or Custom Change Tracking?

    If you opted for SQL Change Tracking, make sure you have enabled SQL Change Tracking on the new database hosted in your ISP.

    Tuesday, November 22, 2011 2:29 AM
    Moderator
  • Change tracking wasn't turned on.  I had the ISP enable it for me on the database, but unfortunately when I tried again, I still got the same error message "Unable to enumerate change at the DbServerSyncProvider for table ". . . ".

    It is the very first table in the database.

    Thanks.

     


    Robotuner
    Tuesday, November 22, 2011 4:10 AM
  • sorry, i should have been more explicit.

    SQL Change Tracking should be enabled at the Database Level and at the Table Level.

    Can you confirm if they enabled Change Tracking on the tables you want to sync?

    Tuesday, November 22, 2011 4:26 AM
    Moderator
  • Thanks, I'm going to assume that is the problem for now.  I found that the database on my isp was devoid of keys, so I need to rebuild the database correctly before I can move forward with this.

     


    Robotuner
    • Marked as answer by Robotuner Wednesday, November 23, 2011 7:57 PM
    Wednesday, November 23, 2011 7:57 PM