Technical Article

Script to get a list of publications an article is in

,

Description : This simple script gives you a list of publications a table is in . It is handy when you have a table in multiple publications and serveral articles in each publications. It saves you from the tedious manual lookup.

 

Works on : SQL 2K5 and above

 

Usage : Run the script on publisher db

SELECT 
 sps.name

FROM
syspublications sps WITH(NOLOCK)

JOIN sysarticles sas WITH(NOLOCK)
ON sps.pubid = sas.pubid

WHERE 
sas.name = 'tableName';

Rate

3 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

3 (1)

You rated this post out of 5. Change rating