Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 User Restriction

Author  Topic 

muralidaran_r
Starting Member

13 Posts

Posted - 2008-07-16 : 03:01:13
One Web Application is using SQL server via user 'abc'. I want to restrict this user.
My requirement is :
abc should not select, insert, update, delete on any table using any sql query.
abc should run specific Stored Procedure and insert or delete or update or select.
I have procedures for all this operations.

What steps I have to follow to create a login, role, user?
what rights i have to give to database, table?

please guide in detail.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-16 : 08:11:47
Give execute,alter,control permission for specific stored procedure.
Go to Top of Page

Shaun McGuile
Starting Member

3 Posts

Posted - 2008-07-16 : 09:35:21
Make sure the public role has no table permissions otherwise these will override any you remove from user 'abc'.

If you don't and public has permissions then every user has those permissions.

Fix the problem, not the blame!
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-16 : 23:11:34
In this case, user doesn't need alter nor control permission on sp. And ensure those sps and underlying tables are in same schema.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-16 : 23:16:05
quote:
Originally posted by rmiao

In this case, user doesn't need alter nor control permission on sp. And ensure those sps and underlying tables are in same schema.



Then how user will update and insert Stored procedure.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-16 : 23:20:09
I believe OP means user can only do insert or delete or update or select through sps. By the way, how to insert sp?
Go to Top of Page

muralidaran_r
Starting Member

13 Posts

Posted - 2008-10-23 : 07:41:29
SPs will be created by admin user
Go to Top of Page
   

- Advertisement -