May 16, 2012

sp_MShelpdestowner (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_MShelpdestowner(nvarchar @spname)

MetaData:

 create procedure sys.sp_MShelpdestowner(  
@spname sysname
)
AS

-- Security check
if (1 <> is_member('db_owner') and
not exists (select * from dbo.sysmergepublications
where 1 = {fn ISPALUSER(pubid)}))
begin
RAISERROR (15247, 11, -1)
return (1)
end

if exists (select * from sys.parameters where name = '@destowner' and object_id = object_id(@spname))
select 1
else
select 0

No comments:

Post a Comment

Total Pageviews