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
 General SQL Server Forums
 Script Library
 Add permissions

Author  Topic 

ann
Posting Yak Master

220 Posts

Posted - 2006-10-21 : 09:41:35
I have a bunch of sp's I need to push out to the server. I need to grant permissions to each so that the calling application will be able to execute them. I currently open each one, and manually add the user permission. Is there a script that i can run that will do this (there are over 100 sp's)
Thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-10-21 : 09:46:21
First of all this fourm 'Script Library' is for posting workable script. Please try to post in appropriate forum.

In Query Analyzer run the following and copy the result set and paste into another window and execute

select 'GRANT EXECUTE ON ''' + name + ''' TO PUBLIC'
from sysobjects
where xtype = 'P'




KH

Go to Top of Page

ann
Posting Yak Master

220 Posts

Posted - 2006-10-21 : 09:47:55
I'm sorry - I didn't see the other topic - not 'nuff coffee yet and still half asleep

Thanks for your reply :)
Go to Top of Page

benjo
Starting Member

8 Posts

Posted - 2006-10-26 : 04:06:41
i agree ann.
Go to Top of Page
   

- Advertisement -