June 4, 2012

sp_MSstopsnapshot_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_MSstopsnapshot_agent(nvarchar @publisher
, nvarchar @publisher_db
, nvarchar @publication)

MetaData:

 create procedure sys.sp_MSstopsnapshot_agent  
(
@publisher sysname,
@publisher_db sysname,
@publication 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_MSstopsnapshot_agent', 'distribution')
return 1
end

declare @retcode int
,@stop tinyint
set @stop = 1
exec @retcode = sys.sp_MSsnapshotagentjobcontrol
@publisher = @publisher,
@publisher_db = @publisher_db,
@publication = @publication,
@action = @stop
return @retcode
end

No comments:

Post a Comment

Total Pageviews