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)
 Where are user grants stored?

Author  Topic 

Skorch
Constraint Violating Yak Guru

300 Posts

Posted - 2010-03-19 : 16:50:54
Stupid question I guess, but I'm trying to find a way to programmatically check whether a user has been granted access to a specific stored procedure. I can do this by finding it under the security tab of the database, and under Securables for the specific user. But I'm wondering if there is a select statement I could run in order to find the same info. Any ideas?

Some days you're the dog, and some days you're the fire hydrant.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-19 : 17:49:30
Permissions are stored in sys.database_permissions.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Skorch
Constraint Violating Yak Guru

300 Posts

Posted - 2010-03-19 : 18:15:59
Thank you! Sadly I don't have the permissions on the given server to access it, but it's good to know.

Some days you're the dog, and some days you're the fire hydrant.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-19 : 18:41:56
You're welcome.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -