May 15, 2012

sp_MSgetarticlereinitvalue (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_MSgetarticlereinitvalue(nvarchar @subscriber
, nvarchar @subscriberdb
, nvarchar @publication
, int @artid)

MetaData:

 create procedure sys.sp_MSgetarticlereinitvalue   
(
@subscriber sysname,
@subscriberdb sysname,
@publication sysname,
@artid int,
@reinit int output
)
as
begin
set NOCOUNT ON
declare @retcode int

--
-- return NULL if no parameters supplied
--
if ((@subscriber IS NULL) or (@subscriberdb IS NULL) or (@publication is null) or (@artid IS NULL))
begin
select @reinit = NULL
return 1
end
--
-- PAL security check
--
exec @retcode = sys.sp_MSreplcheck_pull @publication = @publication
if @@error <> 0 or @retcode <> 0
begin
return (1)
end
--
-- get the value of reinit flag
--
select @reinit = queued_reinit
from syssubscriptions
where srvname = UPPER(@subscriber)
and (srvname is not null and len(srvname)> 0)
and artid = @artid
and dest_db = @subscriberdb
--
-- All done
--
return 0
end

No comments:

Post a Comment

Total Pageviews