Tuesday, March 27, 2012

Enumerate Subscriptions in a Merge Replicated CE Database?

How can I list all of the Subscriptions in a CE Database that was created with the .Net System.Data.SqlServerCe.SqlCeReplication.AddSubscription method?

After I create the CE database in an sdf file, I can connect to it with SQL Servr Mgmt Studio, then see the list of Subscriptions in the Object TreeView, under "Replication"

But I can't find that Subscription list in any properties or methods of System.Data.SqlServerCe.SqlCeReplication or System.Data.SqlServerCe.SqlCeConnection

Should I be looking in RMO features like Microsoft.SqlServer.Replication?

We want to confirm that a local CE database was last synced from the expected SQL Server database by checking the Publisher property of each subscription in the CE database.

Thanks

There are a number of system tables available with all the required information, see http://blogs.msdn.com/sqlservercompact/archive/2007/02/19/howto-detect-the-database-is-merge-replicated.aspx|||

Thanks.

Relational database systems keep their data in relational tables - even SQL Server CE!

Select*from __sysMergeSubscriptions

;Select*from __sysMergeArticles

No comments:

Post a Comment