June 15, 2012

xp_revokelogin (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.xp_revokelogin(nvarchar @loginame)

MetaData:

 create procedure sys.xp_revokelogin  
@loginame sysname
AS
set nocount on

-- IF NAME NOT 'DOMAIN\USER', ADD DEFAULT DOMAIN --
if (charindex('\', @loginame) = 0)
begin
select @loginame = default_domain() + '\' + @loginame
end

Declare @ret int -- return value of sp call
execute @ret = sys.sp_revokelogin @loginame
return (@ret)

No comments:

Post a Comment

Total Pageviews