Re: Stored Procs and db_owner



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

.



Relevant Pages

  • Re: Help understanding Stored proc Level Secuirty?
    ... Jasper Smith (SQL Server MVP) ... I set permissions to my Stored Procedures, ... Access to stored procs fail ...
    (microsoft.public.sqlserver.security)
  • Re: Users cannot view stored procedure text
    ... text of the stored procedures, functions, etc. ... You need to grant them VIEW DEFINITION on the procedures. ... Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books ... ...
    (comp.databases.ms-sqlserver)
  • Re: SQL Statement in C#
    ... Much of the discussion in the link you gave is based on how SQL Server pre-compiles/caches. ... Is this discussion about whether or not to use stored procedures mainly applicable to SQL Server, ... feasible with stored procs unless those procs end up generating dynamic ... are "the only true way" and the other side saying they are not. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Users cannot view stored procedure text
    ... text of the stored procedures, functions, etc. ... You need to grant them VIEW DEFINITION on the procedures. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Packages
    ... There actually is one way of grouping stored procedures, ... > I'm only just starting to use SQL Server 2000 after using Oracle for a> number of years. ... Can you tell me if Server 2000 has the concept of packages,> where I can package all associated stored procs togther. ...
    (microsoft.public.sqlserver.server)