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 2000 Forums
 SQL Server Development (2000)
 Simple way to apply execute permission

Author  Topic 

SamC
White Water Yakist

3467 Posts

Posted - 2002-08-28 : 17:06:13
Other than adding individual grants

GRANT EXECUTE ON dbo.MyFunction TO UserBob

Is there a way to grant execute public permission to all functions and procedures to a user / or public?

SamC

izaltsman
A custom title

1139 Posts

Posted - 2002-08-28 : 17:27:15
Not unless you already have a role that has all those execute permissions... However, you can always generate a script that will grant these permissions for you. Something along these lines:


declare @username varchar (100)

SET @username = 'UserBob'

SELECT 'GRANT EXECUTE ' + name + ' TO ' +@username
from sysobjects where xtype = 'p'



.
So all you will need to do is simply copy the output from the result window to your query window...


Edited by - izaltsman on 08/28/2002 17:28:39
Go to Top of Page
   

- Advertisement -