Skip to content

Instantly share code, notes, and snippets.

@Greyeye
Created February 5, 2016 00:55
Show Gist options
  • Save Greyeye/2830d1d1982d856e9965 to your computer and use it in GitHub Desktop.
Save Greyeye/2830d1d1982d856e9965 to your computer and use it in GitHub Desktop.
find list of replication articles from distribution database (tested on mssql 2012/2014 standard)
SELECT
P.[publication] AS [Publication Name]
,A.[publisher_db] AS [Database Name]
,A.[article] AS [Article Name]
,A.[source_owner] AS [Schema]
,A.[source_object] AS [Table]
FROM
[distribution].[dbo].[MSarticles] AS A
INNER JOIN [distribution].[dbo].[MSpublications] AS P
ON (A.[publication_id] = P.[publication_id])
ORDER BY
P.[publication], A.[article];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment