May 15, 2012

sp_MSgetonerow (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_MSgetonerow(int @tablenick
, uniqueidentifier @rowguid
, uniqueidentifier @pubid)


create procedure sys.sp_MSgetonerow
(@tablenick int,
@rowguid uniqueidentifier,
@pubid uniqueidentifier = NULL)
declare @retcode smallint
declare @procname sysname

-- Check to see if current publication has permission
exec @retcode = sys.sp_MSrepl_PAL_rolecheck @pubid = @pubid, @tablenick = @tablenick
if (@retcode <> 0) or (@@error <> 0)
return 1

select @procname = 'dbo.' + select_proc from dbo.sysmergearticles where nickname = @tablenick and pubid=@pubid

exec @retcode = @procname @maxschemaguidforarticle = NULL, @type =1, @rowguid=@rowguid
IF @@ERROR<>0 or @retcode<>0 RETURN (1)
return (0)

No comments:

Post a Comment

Total Pageviews