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
 Transact-SQL (2005)
 Permission Question

Author  Topic 

denis_the_thief
Aged Yak Warrior

596 Posts

Posted - 2010-03-26 : 13:28:17
I want to block a user from updating a table.

Yet, that user has access to a stored procedure which updates this table.

Is there a TSQL solution for this? (without revoking access to the Stored Procedure)

DBA in the making
Aged Yak Warrior

638 Posts

Posted - 2010-03-26 : 14:05:55
You can deny them access to the table, that won't prevent them from running the stored proc. If they have exec permissions on the stored proc, they don't need update permission on any tables that the stored proc will update.

DENY UPDATE ON [schema].[table] TO [user]
GO
GRANT EXECUTE ON [schema].[uspProc] TO [user]
GO

The user will still be able to call the [schema].[uspProc] procedure, even if it updates the [schema].[table] table.

There are 10 types of people in the world, those that understand binary, and those that don't.
Go to Top of Page
   

- Advertisement -