June 6, 2012

sp_MSvalidate_subscription (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_MSvalidate_subscription(nvarchar @subscriber
, nvarchar @subscriber_db
, int @artid)

MetaData:

 create procedure sys.sp_MSvalidate_subscription (  
@subscriber sysname,
@subscriber_db sysname,
@artid int
)
as
begin
if not exists (select *
from syssubscriptions as sub
where sub.srvname = UPPER(@subscriber)
and (sub.srvname is not null and len(sub.srvname)> 0)
and sub.artid = @artid
and sub.dest_db = @subscriber_db)
begin
-- The subscription has been dropped from the publisher. Please run sp_subscription_cleanup to cleanup the triggers.
exec sys.sp_MSreplraiserror 21161
return -1
end
end

No comments:

Post a Comment

Total Pageviews