Reputation: 5833
How would I iterate through the tables of a database, and determine which publication and article those tables are associated with?
Upvotes: 0
Views: 3834
Reputation: 5833
I did a bit of profiling, and I found this, which I then looked at to find the parameters: [sys].[sp_MShelp_replication_table] ( @table_name sysname = NULL, @table_owner sysname = NULL )
Upvotes: 2
Reputation: 48024
You will have a database that is normally called DISTRIBUTION
that houses your tables. Note: This name can be changed at the time replication is configured.
The following tables will give you information about the replication:
MSPublications
MSArticles
You can join these tables to the Information_Schema.Tables
in your database and figure out which tables are a part of what publication.
Upvotes: 1