June 4, 2012

sp_MSstartmerge_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_MSstartmerge_agent(nvarchar @publisher
, nvarchar @publisher_db
, nvarchar @publication
, nvarchar @subscriber
, nvarchar @subscriber_db)

MetaData:

 create procedure sys.sp_MSstartmerge_agent  
(
@publisher sysname,
@publisher_db sysname,
@publication sysname,
@subscriber sysname,
@subscriber_db sysname
)
as
begin
set nocount on

if (isnull(is_srvrolemember('sysadmin'),0) = 0)
begin
raiserror (21089, 16, -1)
return 1
end

-- database must be distribution db
if sys.fn_MSrepl_isdistdb(db_name()) <> 1
begin
raiserror (21482, 16, -1, 'sp_MSstartmerge_agent', 'distribution')
return 1
end

declare @retcode int
,@start tinyint
set @start = 0
exec @retcode = sys.sp_MSmergeagentjobcontrol
@publisher = @publisher,
@publisher_db = @publisher_db,
@publication = @publication,
@subscriber = @subscriber,
@subscriber_db = @subscriber_db,
@action = @start
return @retcode
end

No comments:

Post a Comment

Total Pageviews