May 16, 2012

sp_MShelp_article (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_MShelp_article(nvarchar @publisher
, nvarchar @publisher_db
, nvarchar @publication
, nvarchar @article)

MetaData:

 CREATE PROCEDURE sys.sp_MShelp_article   
(
@publisher sysname,
@publisher_db sysname,
@publication sysname,
@article sysname = '%'
)
as
begin
set nocount on
--
-- security check
-- only db_owner can execute this
--
if (is_member ('db_owner') != 1)
begin
raiserror(14260, 16, -1)
return (1)
end

select article, article_id, source_object, description, source_owner from MSarticles a where
a.publisher_id = (select srvid from master.dbo.sysservers where UPPER(srvname) = UPPER(@publisher)) and
a.publisher_db = @publisher_db and
a.publication_id = (select publication_id from dbo.MSpublications where
publisher_id = a.publisher_id and
publisher_db = a.publisher_db and
publication = @publication) and
a.article like @article
end

No comments:

Post a Comment

Total Pageviews