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 2005 Forums
 SQL Server Administration (2005)
 How to grant permission to view stored procedures?

Author  Topic 

DBADave
Constraint Violating Yak Guru

366 Posts

Posted - 2007-05-21 : 15:47:06
On our production SQL 2005 servers I want to give developers readonly access to each user database and also give them the ability to see stored procedures. Readonly is handled through db_datareader, but how do I give them the ability to see stored procedures without granting permission to execute them?

Thanks, Dave

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-05-21 : 16:29:33
Why do they need to see production stored procedures? Why isn't there an environment that mirrors production that they can look at or why can't they work with the DBA to view them?

At any rate, I had to grant db_owner in our QA environment in order for them to see the sprocs. This is new to 2005 as that permission was not needed in 2000.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-21 : 16:36:53
Try grant 'view definition' on the sp to user.
Go to Top of Page

DBADave
Constraint Violating Yak Guru

366 Posts

Posted - 2007-05-21 : 16:38:46
We have production and development servers, but no QA as of yet for this 2005 server. At the moment I'm the only DBA so I unfortunately don't have time to script production objects for them.

I think it's a bad move on Microsoft's part to not provide a way for people to view database objects. There should be a readonly for objects as there is for data. It should be treated similar to viewing SQL jobs that you do not own.

Just my thoughts.

Thanks
Go to Top of Page

DBADave
Constraint Violating Yak Guru

366 Posts

Posted - 2007-05-21 : 16:42:42
Thanks. I'll give it a try.
Go to Top of Page
   

- Advertisement -