locked
List all scope(s) ? RRS feed

  • Question

  • Is Scope available as a collection that you can iterate thru to list all scopes on the server?
    Sunday, February 28, 2010 12:08 AM

Answers

  • AFAIK, there's none in the API. You can however write a query to get all the scopes from the scope_info table and retrieve each scope's configuration details like the name of the triggers, stored proc, etc., from the config_data column of the scope_config table. The config_data xml column can be deserialized to a SqlSyncProviderScopeConfiguration and you can access each table's configuration from its AdapterConfigurations collection.

    • Marked as answer by Yunwen Bai Sunday, February 28, 2010 5:18 PM
    Sunday, February 28, 2010 6:35 AM

All replies

  • AFAIK, there's none in the API. You can however write a query to get all the scopes from the scope_info table and retrieve each scope's configuration details like the name of the triggers, stored proc, etc., from the config_data column of the scope_config table. The config_data xml column can be deserialized to a SqlSyncProviderScopeConfiguration and you can access each table's configuration from its AdapterConfigurations collection.

    • Marked as answer by Yunwen Bai Sunday, February 28, 2010 5:18 PM
    Sunday, February 28, 2010 6:35 AM
  • Was hoping for something other than that poor-mans solution, but that will do.

    Thanks for the info!
    Sunday, February 28, 2010 5:33 PM
  • unfortunately, that's what's available out-of-the box right now. As you've probably found out already too, there's is no out-of-the box functionality too to change an existing scope's definition or delete/clean-up a scope definition.

    Sunday, February 28, 2010 5:39 PM
  • Hello david.leibowitz,

    Unfortunately, we currently don't have the API for retrieving scopes.

    Simiilarly to what JuneT mentioned, you can write ADO.Net query to "select scope_name from scope_info" table.

    Just out of curiosity, what is the purpose of such query? if there is a specific purpose for customer usage, we would like to consider adding

    them in the future release.

    Thanks,

    Patrick
    Friday, March 5, 2010 1:42 AM
  • Hi Patrick -
    It's for an ISV solution we're working on. Ping me offline and I'd be happy to share the details. (Check my profile for domain name)..then it's david@


    David

    Monday, March 15, 2010 7:00 PM