info@techdevops.com | 437-991-3573 | Data Engineering Services
TechDevOps.com
Resources Tools
Experts in Microsoft SQL Server on Windows, Linux, Containers | Clusters, Always On, FCI | Migrations, Cloud, Performance



T-SQL - Get All Publications & Articles
by BF (Principal Consultant; Architecture; Engineering)
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