tags:

views:

443

answers:

4

Hi,

I need to give sp help text permission to the developers so that they can check the store procedures. Can somebody please, let me know how can i do it.

Thanks, Christine

+1  A: 

The syntax is

Grant Execute on sp_helptext to user

and must be executed with master as the current database.

You can also do it through the GUI by right clicking on the user or the proc and going to properties. The exact steps depend on whether you are using enterprise manager or sql management studio.

Alternately add them to a role that has permissions on it already, public is the minimum required.

exec sp_addrolemember 'public', 'user'
cmsjr
A: 

I'm not a sql guru but I would imagine the developers would also need read/execute permission to the stored procedure they are getting the text for.

Jeff Martin
A: 

Thanks for the quick reply but i am getting this error . Can you please, let me know that what might be the reason for this error. I really appreciate your help. MSG15151 LEVEL 16 STATE 1 LINE 1 cannot find the user because it doesn't exist or you don't have the permission I have SA permission and that user does exist. Thanks, Christine

Then they don't exist in master. Use the last suggestion I made. Browse to the user, go to properties, go to User Mapping, make sure they have a check for the database(s) they need access to, make sure a role of at least public is selected below.
cmsjr
Let me know if you are using Enterprise Manager, the steps would be slightly different.
cmsjr
A: 

The format of the command needs to be

grant execute on sp_helptext to [DomainName\UserName] ;