May 14, 2012

sp_MSget_latest_peerlsn (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

Definition:

sys.sp_MSget_latest_peerlsn(nvarchar @originator_publication
, nvarchar @originator
, nvarchar @originator_db)

MetaData:

 create procedure sys.sp_MSget_latest_peerlsn   
(
@originator_publication sysname,
@originator sysname,
@originator_db sysname,
@xact_seqno binary(10) output
)
as
begin
declare @retcode int

--
-- Security check
--
exec @retcode = sp_MSreplcheck_subscribe
if @@error != 0 or @retcode != 0
return 1

select @xact_seqno = originator_lsn from MSpeer_lsns with (NOLOCK)
where originator = UPPER(@originator) and
originator_db = @originator_db and
originator_publication = @originator_publication

if @@error <> 0
return(1)

return 0
end

No comments:

Post a Comment

Total Pageviews