Re: sql2k5 security
- From: weilu@xxxxxxxxxxxxxxxxxxxx (Wei Lu [MSFT])
- Date: Mon, 26 Jun 2006 10:01:49 GMT
Hi Param,
As I have mentioned, you could give a user only Execute permissions on a
stored procedure and the stored procedure could perform operations fine.
Here is my steps:
1. Create a table (tbl_Test ) in the database.
2. Create a Schema named mySchema in the database.
3. Create a database role named db_web.
4. Create a user named webUser and add it to the db_web role. The default
schema of this user is setting to mySchema.
5. Create a stored procedure named myShcema.doSelect.
The content of this proc is:
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
select * from dbo.tbl_test
END
6. Grant the execute permission of myshcema to db_web role.
7. Login the server with user webUser.
8. Try to execute the stored procedure, it runs successfully and return the
right result.
9. If try to select the result from the tbl_test directly, it will get the
following error:
SELECT permission denied on object 'tbl_Test', database 'Test', schema
'dbo'.
I think this is the behavior you wanted. Please try these steps on your
side and let me know the result. If you have anything unclear, please feel
free to let me know.
Also, you could post the scripts you use here for my troubleshotting. Thank
you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Re: sql2k5 security
- From: param
- Re: sql2k5 security
- References:
- sql2k5 security
- From: param
- Re: sql2k5 security
- From: David Browne
- Re: sql2k5 security
- From: param
- Re: sql2k5 security
- From: Wei Lu
- Re: sql2k5 security
- From: param
- Re: sql2k5 security
- From: Wei Lu
- Re: sql2k5 security
- From: Wei Lu [MSFT]
- Re: sql2k5 security
- From: param
- sql2k5 security
- Prev by Date: Re: SQL 2005 - Searching Encrypted SSN
- Next by Date: Re: SQL 2005 - Searching Encrypted SSN
- Previous by thread: Re: sql2k5 security
- Next by thread: Re: sql2k5 security
- Index(es):
Relevant Pages
|