Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

T-SQL Query for Replication Articles

Does anyone know of a query I could run that would tell me what articles, if any, in a target database, are associated with a transactional replication publication?

like image 562
Randy Minder Avatar asked Jan 03 '11 12:01

Randy Minder


1 Answers

For those needing a quick snippet...

SELECT 
  msp.publication AS PublicationName,
  msa.publisher_db AS DatabaseName,
  msa.article AS ArticleName,
  msa.source_owner AS SchemaName,
  msa.source_object AS TableName
FROM distribution.dbo.MSarticles msa
JOIN distribution.dbo.MSpublications msp ON msa.publication_id = msp.publication_id
ORDER BY 
  msp.publication, 
  msa.article
like image 173
davmos Avatar answered Oct 06 '22 22:10

davmos