none
ado.net provider and scope RRS feed

  • Question

  • My understanding is that there will be multiple "scopes" per database catalog.  Each scope consists of a set of ordered tables.  No 2 scopes can contain the same tables.  That is, scope1 can contain table1,table2,table3;scope2 can contain table4,table5, scope3 can contain table6, and, no other scope can contain any of those tables.  That is, no other scope can contain tables: 1,2,3,4,5,6.   Is this assumption correct?

    My next assumption is that for a sync to take place between data soruces, they must have the same scope name on both destination and source and that the orderlist of table names must be identical on both source and destination.  Is this assumption correct?

    Finally, how can I enumerate all the scopes on any given catalog and get the list of tables associated with each scope?

    My thinking is that I want to have a list of connection strings, find all the scopes on each connection string's catalog and figure out which scopes can replicate with each other.

    Thanks.


    Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider
    • Edited by Peter Kellner Sunday, June 13, 2010 3:39 AM mis-spelled title
    Thursday, June 10, 2010 1:25 PM

Answers

  • hi peter,

    let me try to answer some of your queries:

    1. you can have "overlapping scopes" (a table can belong to more than one scope) a scope is a combination of tables and filters. for example you can define a scope that contains product and inventory and another scope that contains product and sales. another example is you can define a scope for sales that has a filter for North America and another scope on the same table with a filter or Europe.

    2. each peer participating in the sync should have the same scope definition (tables, filters). in fact, in the API samples you will notice that the 2nd party in the sync is usually provisioned based on an existing scope definition in a particular database.

    3. the current version doesnt expose an API to enumerate existing scopes, change them or even delete them. if you want to get a list, you can query the scope_info table and for you to get the definition for each scope, you can query the scope_config table which contains an XML column containing the scope definition.

    hth,

    june

    Thursday, June 10, 2010 1:38 PM
    Moderator