January 6, 2010 at 3:27 am
I am trying to find a way to list all the users/groups that have permissions to a particular table in a database. A query would be ideal.
Thanx in Advance !
January 6, 2010 at 3:40 am
Hope this link helps
January 6, 2010 at 3:48 am
This should work:
select * from sys.database_principals
January 6, 2010 at 4:26 am
Let me put it this way.. I have a table abc and I need to know the groups/users who can access the table abc...
January 6, 2010 at 4:28 am
Did you try using sp_helprotect?
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 6, 2010 at 4:40 am
Yes.. Tried that but it returns the following message...
Msg 15330, Level 11, State 1, Procedure sp_helprotect, Line 291
There are no matching rows on which to report.
Correct me if I am wrong... I guess that is because there are no explicit permissions for any users on the table..
January 6, 2010 at 6:06 am
Sanz (1/6/2010)
Yes.. Tried that but it returns the following message...
Msg 15330, Level 11, State 1, Procedure sp_helprotect, Line 291
There are no matching rows on which to report.
Correct me if I am wrong... I guess that is because there are no explicit permissions for any users on the table..
As you wrote, it means that no one has explicit permissions to work on this table. Of course administrators and members of roles such as db_datareaders or db_owners can use this table.
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply