Re: Determining permissions through Stored Procedures



Dave (Dave@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
Is it possible in SQL 2005 to determine what rights a user has to a
given DB (down to the table level) using a Stored Procedure, or
Function? I would like to know if a user has "Insert" rights to a table
before I give them an "Add New" button on my form.

Check out the function Has_perms_by_name in Books Online.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.


Quantcast