Finding Replication Publications For A Table

If you want to drop or rename a table, you will need to make ensure the table is not an article of a
publication. If it is article for any publication, you need to find out what are those publications. If you
have several publications and if one table is an article for many publications, it is not an easy task to check
publications one by one.

The below query can be executed against the publisher database by providing the table name in the where
clause. This query outputs the Publication Name, Source Table Name and the Destination Table.

SELECT Publication, TableName,
A.dest_table DestinationTable FROM
syspublications P INNER JOIN
sysarticles A ON P.pubid = A.pubid
WHERE ='TableName'


No comments yet... Be the first to leave a reply!

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |