May 15, 2012

sp_MSgetchangecount (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_MSgetchangecount(bigint @startgen)


create procedure sys.sp_MSgetchangecount(
@startgen bigint,
@changes int output,
@updates int output,
@deletes int output)
declare @retcode int
-- security check
exec @retcode = sys.sp_MSrepl_PAL_rolecheck
if @@error <> 0 or @retcode <> 0
return 1

select @deletes = count(*) from dbo.MSmerge_tombstone where generation = 0 or generation > @startgen
select @updates = count(*) from dbo.MSmerge_contents where generation = 0 or generation > @startgen
select @changes = @updates + @deletes
return (0)

No comments:

Post a Comment

Total Pageviews