0

Is there a way to select articles in SQL Server that are not checked (referring to local publication properties, articles tab). I can only select all checked, simply by this code

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 [Object]
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]
Moccassin
  • 169
  • 1
  • 4
  • 15
  • 1
    You wish to return only the tables to a schema not already involved in Replication. You need to add sys.tables at least and also filter by tables that contain Primary Keys. – clifton_h Jul 21 '17 at 04:45
  • @clifton_h thanks for that. Relativey new in system objects scripting. Can you show me sample script. Thank you so much for the help – Moccassin Jul 21 '17 at 05:04

0 Answers0