View Single Post

   
  #2 (permalink)  
Old 02-29-2008, 04:41 AM
Erland Sommarskog
 
Posts: n/a
Default Re: Still Trying to Figure Out Identification of SQL Server Stored Proc. Permissions via VB

[posted and mailed, posted and mailed]

Brad H McCollum (bmccoll1@midsouth.rr.com) writes:
> I have yet to find specific code that tells me how to check
> permissions on a storedc procedure for the user that's logged-in, what
> the resulting codes (i.e. 12291, etc.) mean as far as identification
> of their permissions, etc.


If the expresion:

permissions(object_id('dbo.yourprocedure')) & 0x20

returns a non-zero value, the user has permission to execute the procedure,
else not.

You can read more about the Permissions() function Books Online.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Reply With Quote