June 11, 2012

sp_subscriptionsummary (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_subscriptionsummary(nvarchar @publication
, nvarchar @subscriber
, nvarchar @subscriber_db
, nvarchar @publisher)

MetaData:

   
CREATE PROCEDURE sys.sp_subscriptionsummary
(
@publication sysname,
@subscriber sysname,
@subscriber_db sysname,
@publisher sysname = NULL
)
AS
BEGIN
DECLARE @cmd nvarchar(4000),
@retcode int,
@publisher_type sysname

SET @retcode = 0

EXEC @retcode = sys.sp_MSrepl_getpublisherinfo @publisher = @publisher,
@rpcheader = @cmd OUTPUT,
@publisher_type = @publisher_type OUTPUT
IF @retcode <> 0
BEGIN
RETURN (@retcode)
END

SET @publisher = UPPER(@publisher) COLLATE DATABASE_DEFAULT
SET @cmd = @cmd + N'sys.sp_MSrepl_subscriptionsummary'

EXEC @retcode = @cmd
@publication = @publication,
@subscriber = @subscriber,
@subscriber_db = @subscriber_db,
@publisher = @publisher,
@publisher_type = @publisher_type

END

No comments:

Post a Comment

Total Pageviews