Sample Header Ad - 728x90

how can I list all views and functions that are replicated?

0 votes
1 answer
77 views
I have a script to show me the replication articles of a publication:
declare @publication_name sysname = 'my_pub'
declare @database_name sysname = 'my_db'
 use [my_db]


select  ServerName = @@servername
       ,publication_name=p.name
       ,p.repl_freq
	   ,p.status
	   ,p.sync_method
	   --,snapshot_job_name=j.name
	   ,p.independent_agent
	   ,p.immediate_sync
	   ,p.allow_anonymous
	   ,p.replicate_ddl
	   ,article_name=OBJECT_SCHEMA_NAME(a.objid) + '.' + OBJECT_NAME(a.objid)
	   ,a.pre_creation_cmd 
	   ,pre_creation_cmd_desc  = CASE a.pre_creation_cmd 
	     WHEN 0 THEN 'none	    - Doesn''t use a command.'
         WHEN 1 THEN 'drop	    - Drops the destination table.'
         WHEN 2 THEN 'delete	- Deletes the destination table.'
         WHEN 3 THEN 'truncate	- Truncates the destination table.'
		 ELSE 'Not known - Radhe Radhe'
		END


			FROM dbo.syspublications P 
			INNER JOIN dbo.sysarticles A 
					ON P.pubid = A.pubid

           left outer  JOIN msdb.dbo.sysjobs j
			        ON j.job_id = p.snapshot_jobid

 where p.name = @publication_name
However, in this particular publication I am working on at the moment, I have also functions and these objects are not shown in my query above? How can I see these, as I know they are there?
Asked by Marcello Miorelli (17274 rep)
Nov 5, 2024, 07:33 PM