[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

check through code if sp_addarticle is used in replication

is there a t-sql code you could use to check if sp_addarticle was used or implemented in the existing publication on a database on a server?
0
25112
Asked:
25112
  • 2
  • 2
1 Solution
 
TempDBACommented:
You can query on following tables in distributor

  distribution.dbo.MSArticles A WITH (NOLOCK)  
inner join  
 distribution.dbo.MSPublications P WITH (NOLOCK)  
on  
 P.Publication_id = A.Publication_Id  


Or you can query following tables on publication server\database

sysarticles
syspublications
0
 
25112Author Commented:
thanks TempDBA.. how can i use the above query to filter out objects.. i just need to see the articles where properties for objects are added as articles.. for example, SELECT permissions for a table for a user.. i want see if such permissions are assigned..
0
 
TempDBACommented:
This you can obtain by knowing the user and role he/she is assinged to, to perform on a database. I am not sure if there is any property saved for a article in the context you are looking for.
0
 
25112Author Commented:
thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now