June 11, 2012

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

MetaData:

 create procedure sys.sp_startpushsubscription_agent  
(
@publication sysname,
@subscriber sysname,
@subscriber_db sysname,
@publisher sysname = null
)
as
begin
set nocount on
declare @cmd nvarchar(4000)
declare @retcode int
declare @pubtype sysname
declare @start tinyint

set @retcode = 0
set @start = 0
exec @retcode = sys.sp_MSrepl_getpublisherinfo @publisher = @publisher,
@publisher_type = @pubtype OUTPUT,
@rpcheader = @cmd OUTPUT
if @retcode <> 0
return (@retcode)

-- Add sp
set @cmd = @cmd + N'sys.sp_MSrepl_subscriptionagentjobcontrol'

exec @retcode = @cmd
@publication = @publication,
@subscriber = @subscriber,
@subscriber_db = @subscriber_db,
@publisher = @publisher,
@publisher_type = @pubtype,
@action = @start
return @retcode


end

No comments:

Post a Comment

Total Pageviews