"Security Functions (Transact-SQL)," Microsoft SQL Server 2005 Books Online
http://msdn2.microsoft.com/en-us/library/ms186236.aspx