Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Does a user belong to a roll

Author  Topic 

elzaiem
Starting Member

10 Posts

Posted - 2008-07-08 : 23:43:08
Is there a method in T-sql language to detect whether a certain user belongs to a roll (e.g. is the current Sytem_user belongs to Accounts Roll).
Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-09 : 00:09:20
Have a look at sys.database_principals and sys.database_role_members system catalog views
Go to Top of Page

elzaiem
Starting Member

10 Posts

Posted - 2008-07-10 : 00:24:48
I mean is there a specified boolean function that returns true( he is a member) or not (he is not)?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-12 : 00:10:53
Take look at is_member function.
Go to Top of Page
   

- Advertisement -