May 25, 2012

sp_MSreplcheck_subscribe_withddladmin (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_MSreplcheck_subscribe_withddladmin()

MetaData:

 create procedure sys.sp_MSreplcheck_subscribe_withddladmin  
as
begin
--
-- Only the System Administratr (SA) or the Database Owner (dbo)
-- can subscribe from the subscribing database.
--
-- Do the sysadmin check first as it is 4 times more efficient
-- than is_member call and reduces performance overhead in case
-- the user has sysadmin privileges
--
if is_srvrolemember('sysadmin') = 1 or is_member ('db_owner') = 1
or is_member ('db_ddladmin') = 1
begin
return (0)
end
else
begin
raiserror (21551, 14, -1)
return (1)
end
end

No comments:

Post a Comment

Total Pageviews