473,399 Members | 2,146 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,399 software developers and data experts.

Stored Procs and db_owner

I have some users that I need to run stored procedures, but they can't
seem to run them unless they are in the db_owner role of the database.

How do I give them access to run the stored procs without giving them
the complete rights of the db_owner role?

Thanks in advance.

Oct 31 '05 #1
1 9722
db55 (ch****@gmail.com) writes:
I have some users that I need to run stored procedures, but they can't
seem to run them unless they are in the db_owner role of the database.

How do I give them access to run the stored procs without giving them
the complete rights of the db_owner role?


GRANT EXECUTE ON proc TO user

Or rather than granting permissions directly to users, it's probably
better than adding them roles, and then grant access to the role instead.

But note that just because you grant them access to run the procedures,
that does not mean that they can run the procedures successfully. They
will get SELECT, INSERT, DELETE and UPDATE permissions to tables referenced
by the stored procedures, if the tables and procedures have the same
owner. However, this so-called ownership chaining does not apply to
other statements such as CREATE/DROP TABLE (temp tables are OK) or
TRUNCATE TABLE.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp

Oct 31 '05 #2

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

Similar topics

6
by: Dave | last post by:
1) I know that we can define an external proc to be Fenced or NotFenced on "CREATE PROCEDURE" command. I don't see the FENCED / NOT FENCED option on "Create Procedure" for SQL stored procs. Is...
1
by: Paul R | last post by:
Hi, I have a Winforms application that access some SQLServer2000 stored procedures. I have now written some new Webforms pages to use some of the same stored procs. The Webforms use the SAME...
1
by: AKJTR | last post by:
i'm trying to save on calls back to the db by combining stored procs in one dataadapter. I know they work alone but when i combine the i get an error " Could not find stored procedure...
1
by: kentk | last post by:
Is there a difference in how SQL Server 7 and SQL 2000 processes SQL passed from a program by an ADO command object. Reason I ask is I rewrote a couple applications a couple years ago were the SQL...
2
by: Jared | last post by:
Hi, I have noticed with MySQL Administrator when I backup stored procs they never restore properley.
15
by: Burt | last post by:
I'm a stored proc guy, but a lot of people at my company use inline sql in their apps, sometimes putting the sql in a text file, sometimes hardcoding it. They don't see much benefit from procs, and...
4
by: Andy B | last post by:
Where would probably be the best place for queries to the database? in the db as stroed procs or in the dataSet.
8
by: Frank Calahan | last post by:
I've been looking at LINQ and it seems very nice to be able to make queries in code, but I use stored procs for efficiency. If LINQ to SQL only works with SQL Server and stored procs are more...
5
by: Bogdan | last post by:
Hi, I have a stored procedure that uses JOINs to return columns from multiple tables. I also have another stored proc that that takes a series of params and updates multiple tables. I used the...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...
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.