April 25, 2012

sp_getqueuedarticlesynctraninfo (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData


sys.sp_getqueuedarticlesynctraninfo(nvarchar @publication
, int @artid)


 create procedure sys.sp_getqueuedarticlesynctraninfo   
@publication sysname -- publication - cannot be null
,@artid int -- article id - cannot be null
set nocount on
declare @retcode int
,@owner sysname
,@synctraninsproc sysname
,@synctranupdproc sysname
,@synctrandelproc sysname
,@cftprocname sysname
,@articlename sysname
,@tablename sysname
-- security check - should be dbo or sysadmin
exec @retcode = sp_MSreplcheck_publish
if @@error != 0 or @retcode != 0
return 1
if (object_id(N'dbo.sysarticleupdates') is null
or object_id(N'dbo.syspublications') is null)
return 1
-- get the information needed for resultset
select schema_name(objectproperty(a.sync_ins_proc, 'SchemaId'))
from dbo.syspublications p
join dbo.sysarticles as art on p.pubid = art.pubid
join dbo.sysarticleupdates as a on art.artid = a.artid
where art.artid = @artid
and p.name = @publication
-- all done
return 0

No comments:

Post a Comment

Total Pageviews