I use SQL Server 2008 R2 and have a table that I want no one to update, in other words I want to disable updates on this table. For this purpose I know two methods, first is to use instead of update
trigger to prevent update and second is to use permissions.
我使用SQL Server 2008 R2,并且有一个表我不希望任何人更新,换句话说,我想禁用这个表的更新。为此,我知道有两种方法,一种是使用而不是更新触发器来防止更新,另一种是使用权限。
I want to figure out best practices for this purpose.
我想找出这个目的的最佳实践。
EDIT 1: I want to deny update for all user.
编辑1:我想拒绝所有用户的更新。
1 个解决方案
#1
4
IMHO, using permissions to disable updates to a table is probably the best way to go.
IMHO,使用权限禁用对表的更新可能是最好的方法。
EDIT: Check Giving and removing permissions in SQL Server
编辑:检查SQL Server中的授予和删除权限
#1
4
IMHO, using permissions to disable updates to a table is probably the best way to go.
IMHO,使用权限禁用对表的更新可能是最好的方法。
EDIT: Check Giving and removing permissions in SQL Server
编辑:检查SQL Server中的授予和删除权限