Re: Help pls: Not allow users access to tables, stored procedures
- From: "David Browne" <davidbaxterbrowne no potted meat@xxxxxxxxxxx>
- Date: Thu, 15 Jun 2006 11:33:31 -0500
"Ben" <ben_1_ AT hotmail DOT com> wrote in message news:94929023-4128-4237-ADE6-A4BFC1D01003@xxxxxxxxxxxxxxxx
It looks like I may have been wrong with a previous statement. Not all
tables are owned by dbo. Some are owned by another user. Wouldnt a dbo have
privilege on another user's tables?
If not, it there a way to force this to work WITHOUT giving select
permissions on the tables not owned by dbo?
Dbo has privileges, but the stored procedure is not run as dbo. It is run as the caller, only with certan permission checks skipped. Ownership chains only help you when the owner of the procedure is the same as the owner of the table.
In SQL 2005 you can use the EXECUTE AS option to cause the stored procedure to be invoked using the privileges of the procedure owner instead of the privileges of the caller. Erland explains all:
Giving Permissions through Stored Procedures
http://www.sommarskog.se/grantperm.html
David
.
- References:
- Re: Help pls: Not allow users access to tables, stored procedures only
- From: David Browne
- Re: Help pls: Not allow users access to tables, stored procedures
- From: Dan Guzman
- Re: Help pls: Not allow users access to tables, stored procedures
- From: Ben
- Re: Help pls: Not allow users access to tables, stored procedures
- From: Dan Guzman
- Re: Help pls: Not allow users access to tables, stored procedures
- From: Ben
- Re: Help pls: Not allow users access to tables, stored procedures only
- Prev by Date: Re: List User's Permissions down to table.column action
- Next by Date: Re: sql server 2005 row level security
- Previous by thread: Re: Help pls: Not allow users access to tables, stored procedures
- Next by thread: copy permissions from one user to another?
- Index(es):
Relevant Pages
|