473,748 Members | 2,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 19898
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****@sommarsk og.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...@sommars kog.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...@sommarsk og.se

Books Online for SQL Server 2005 athttp://www.microsoft.c om/technet/prodtechnol/sql/2005/downloads/books...
Books Online for SQL Server 2000 athttp://www.microsoft.c om/sql/prodinfo/previousversion s/books.mspx

Apr 5 '07 #3

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

Similar topics

1
1816
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 permissions for the stored procedures in the user database without making them dbo? When I take them out of the db_owner role, when they open a stored procedure they no longer see the permissions tab. I would like for them to see the permissions...
1
7351
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 running SP's so I wrote a very simple procedure just to make sure everything is working. Below is the db2set output for the SQLROUTINE_COMPILE_COMMAND, stored procedure text, log file, and result of a call. I'm getting an error that says function...
2
5458
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
3
1233
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. Thanks in Advance, Vips.
2
2032
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 debug stored procedures because the SQL server database is not setup correctly or the user does not have permission to execute
0
3623
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() BEGIN insert into user (firstname,lastname) values (@fn, @ln); END; //
1
2584
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 find the stored procedure '<proc_name>'", this is funny, when I execute the command in a sql query window "exec sp_GetAllArticles", it also returns cannot find stored procedure, but when I execute the "Use <DBName>" and then execute the statement, it...
5
4283
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 example, I wanted to modify a function that was being called by a trigger. The problem is that I don't want to change the function, for fear that it is being called by one of the other SP's or triggers in the database (there are hundreds of them) ...
0
8996
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9562
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9386
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.