May 16, 2012

sp_MShelpmergeschemaarticles (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_MShelpmergeschemaarticles(nvarchar @publication)

MetaData:

   
create procedure sys.sp_MShelpmergeschemaarticles
@publication sysname
as
begin
set nocount on

declare @pubid uniqueidentifier
declare @retcode int

if (@publication is null)
begin
raiserror(14003, 16, -1)
return (1)
end

if object_id('MSmerge_contents') is NULL
begin
raiserror(20054, 16, -1)
return (1)
end

--
-- Security Check.
--
exec @retcode = sys.sp_MSmerge_validate_publication_presence @publication, NULL, NULL, @pubid output
if @retcode <> 0 or @@error <> 0
return 1

select a.name, o.name, SCHEMA_NAME(o.schema_id), a.destination_object, a.destination_owner, a.artid, @pubid, a.pre_creation_command, a.status, a.type
from dbo.sysmergeschemaarticles a
inner join sys.objects o
on a.objid = o.object_id
where pubid = @pubid

return 0
end

No comments:

Post a Comment

Total Pageviews