Re: Stored Procs and db_owner
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Mon, 31 Oct 2005 22:59:05 +0000 (UTC)
db55 (chfran@xxxxxxxxx) 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, esquel@xxxxxxxxxxxxx
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
.
- References:
- Stored Procs and db_owner
- From: db55
- Stored Procs and db_owner
- Prev by Date: Re: Unique Constraint on Multiple columns
- Next by Date: Re: Rendering directory structures
- Previous by thread: Stored Procs and db_owner
- Next by thread: Re: Possible to keep MS Access interface and migrate the MS Access to MS SQL Server?
- Index(es):
Relevant Pages
|