GordyII
GordyII

Reputation: 7257

Granting Select Rights to a Stored Procedure in SQL Server 2000

I want to give a user access to a stored procedure, but not to all the objects in the database the stored procedure needs to use.

What is the best way to give rights to the stored procedure to enable it to work, but only grant execute access to the user to run it.

I am using sql server 2000 sp4.

Upvotes: 2

Views: 547

Answers (2)

Jeff Hall
Jeff Hall

Reputation: 1754

From MSDN

Users can be granted permission to execute a stored procedure even if they do not have permission to execute the procedure's statements directly

Upvotes: 3

ChrisLively
ChrisLively

Reputation: 88074

try

exec grant exec ON 'myprocname' TO 'myusername'

Upvotes: 2

Related Questions