473,396 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Users cannot view stored procedure text


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

Apr 4 '07 #1
2 19882
traceable1 (tr*****@gmail.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, es****@sommarskog.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
Apr 4 '07 #2

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...@sommarskog.sewrote:
traceable1 (trac...@gmail.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...@sommarskog.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

Apr 5 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: timc | last post by:
We are running SQL Server 2000 Developer Edition. I don't want to make the developers the sysadmin or even the dbo in the user databases. Is there a way to give them access to only view the...
1
by: Private Pyle | last post by:
DB2 version 8, fixpack 5. Aix 5.1.0.0 Using C for AIX compiler. I'm having a problem where I can create stored procedures but I'm getting -444 when I call them. It's a new environment for...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
3
by: Vips | last post by:
Hi All, Can someone please tell me if there is a way to query the Database (for example SQL Server 2000) and get the text of the stored procedure that is already existing in the database. ...
2
by: scott | last post by:
Hi, I followed everything this article suggests: http://support.microsoft.com/default.aspx?scid=kb;EN-US;836734 Yet I still get the following message when stepping into a SP: "Cannot...
0
by: james.peer | last post by:
I'm fairly new to this so hopefully it is a dumb mistake... I need to create a simple stored procedure along the lines of: delimiter // CREATE DEFINER='root'@'localhost' PROCEDURE Insertuser()...
1
by: den 2005 | last post by:
Hi everybody, I created several stored procedure in a local sql server 2005 express database, now when I call/execute them in the asp.net 2.0 web page, it returns an error message of "Cannot...
5
by: marcsirois | last post by:
I am maintaining an application where most of the business rules are in Triggers, Stored Procedures and User Defined Functions. When a bug arises, it can get very tedious to debug. Today for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.