info@techdevops.com
TechDevOps.com
Explore Tools
Experts in Microsoft SQL Server Operations, Performance, Replication, Cloud & Migrations



T-SQL - Get All Publications & Articles
by BF (Senior MSSQL Operations - Enterprise, Cloud, Strategy)
2018-11-18








--Execute on Distribution Database:

--Get All Publications and Articles:

Select
@@SERVERNAME as 'Server', DB_Name() as 'Distribution Database', p.Publisher_DB, p.Publication,
CASE publication_type
WHEN '0' Then 'Transactional'
WHEN '1' THEN 'Snapshot'
WHEN '2' THEN 'Merge'
End As 'Publication Type',
a.Article,
p.Immediate_Sync
from DBO.MSPUBLICATIONS p (NOLOCK)
Left Outer Join
DBO.MSARTICLES a (NOLOCK) on p.publication_id = a.publication_id
order by
p.publication asc, a.article asc