May 25, 2012

sp_MSrepl_raiserror (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_MSrepl_raiserror(nvarchar @agent
, nvarchar @agent_name
, int @status
, nvarchar @message
, nvarchar @subscriber
, nvarchar @publication
, nvarchar @article)

MetaData:

 create procedure sys.sp_MSrepl_raiserror  
(
@agent sysname,
@agent_name nvarchar(100),
@status int,
@message nvarchar(255),
@subscriber sysname = NULL,
@publication sysname = NULL,
@article sysname = NULL
)
as
begin
if @status = 2 -- Succeeded
raiserror (14150, 10, -1, @agent, @agent_name, @message)
else if @status = 5 -- Retry Failure
raiserror (14152, 10, -1, @agent, @agent_name, @message)
else if @status = 6 -- Failure
begin
raiserror (14151, 18, -1, @agent, @agent_name, @message)
end
else if @status = 7
begin
raiserror (20574, 10, -1, @subscriber, @article, @publication)
end
else if @status = 8
begin
raiserror (20575, 10, -1, @subscriber, @article, @publication)
end
else if @status = 9
begin
raiserror (14158, 10, -1, @agent, @agent_name, @message)
end
end

No comments:

Post a Comment

Total Pageviews