GRANT specific role ALTER access to specific table

2020-06-14 06:44发布

I have tried many ways to do this with no success, but what I want to do is the following:

GRANT ALTER ON [dbo].[theTable] TO [role]

Bonus if you can also provide me some permission state before & after eg.

SELECT * 
FROM fn_my_permissions('dbo.theTable', 'TABLE'); 

Many thanks in advance :)

2条回答
ら.Afraid
2楼-- · 2020-06-14 07:29
GRANT ALTER ON [dbo].[theTable] TO [role] 
GO
查看更多
小情绪 Triste *
3楼-- · 2020-06-14 07:31

GRANT ALTER ON object TO principal is the correct form of the statement in your case.

To view the permissions granted to you on the object, use the fn_my_permissions function like this:

SELECT *
FROM sys.fn_my_permissions('object', 'OBJECT')
;
查看更多
登录 后发表回答