dbTalk Databases Forums  

Users cannot view stored procedure text

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Users cannot view stored procedure text in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
traceable1
 
Posts: n/a

Default Users cannot view stored procedure text - 04-04-2007 , 10:13 AM







In SQL 2005 (we use Enterprise 64-bit SP2), the users cannot see the
text of the stored procedures, functions, etc.

This is a production database, so I cannot give them rights to modify
them, but they need to be able to see what the procs are doing.

I didn't have this problem in 2000 - how can I adjust the privileges
to allow them to view the contents of the Programmability objects?

thanks for any insight!!
Tracy


Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Users cannot view stored procedure text - 04-04-2007 , 05:23 PM






traceable1 (tracykc (AT) gmail (DOT) com) writes:
Quote:
In SQL 2005 (we use Enterprise 64-bit SP2), the users cannot see the
text of the stored procedures, functions, etc.

This is a production database, so I cannot give them rights to modify
them, but they need to be able to see what the procs are doing.

I didn't have this problem in 2000 - how can I adjust the privileges
to allow them to view the contents of the Programmability objects?
You need to grant them VIEW DEFINITION on the procedures. To make it
simpler you grant them this permission on the schema:

GRANT VIEW DEFINITION ON SCHENA::dbo TO someuser

In SQL 2005, you don't have permissions to see system objects in the same
way you had in SQL 2000.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #3  
Old   
traceable1
 
Posts: n/a

Default Re: Users cannot view stored procedure text - 04-05-2007 , 05:08 PM




Excellent! Gonig back to the Oracle way of doing things, eh? I will
try it - thank you so much!



On Apr 4, 5:23 pm, Erland Sommarskog <esq... (AT) sommarskog (DOT) se> wrote:
Quote:
traceable1 (trac... (AT) gmail (DOT) com) writes:
In SQL 2005 (we use Enterprise 64-bit SP2), the users cannot see the
text of the stored procedures, functions, etc.

This is a production database, so I cannot give them rights to modify
them, but they need to be able to see what the procs are doing.

I didn't have this problem in 2000 - how can I adjust the privileges
to allow them to view the contents of the Programmability objects?

You need to grant them VIEW DEFINITION on the procedures. To make it
simpler you grant them this permission on the schema:

GRANT VIEW DEFINITION ON SCHENA::dbo TO someuser

In SQL 2005, you don't have permissions to see system objects in the same
way you had in SQL 2000.

--
Erland Sommarskog, SQL Server MVP, esq... (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.