开发者

Role to Grant Update Access on All tables in a database

开发者 https://www.devze.com 2023-03-26 23:21 出处:网络
I want create a role in SQL server 2008, which will allows specific group of users to have update permissions on all the tables in a specific database.

I want create a role in SQL server 2008, which will allows specific group of users to have update permissions on all the tables in a specific database. I tried using tha management studio GUI, but i have so many tables in that and its 开发者_开发问答tough to select on by one and assign update access. Could some please tell me a way to write the script or a sample script that will make my life easier. Your help is much appreciated. Thank you in advance.


Use the db_datawriter role for "write on all tables"


If you want use your own rolename, you can grant it the equivalent permissions to db_datawriter and db_datareader:


    GRANT SELECT ON SCHEMA :: dbo TO MyRole 
    GRANT INSERT ON SCHEMA :: dbo TO MyRole 
    GRANT UPDATE ON SCHEMA :: dbo TO MyRole 
    GRANT DELETE ON SCHEMA :: dbo TO MyRole 
    GRANT EXECUTE ON SCHEMA :: dbo TO MyRole 
0

精彩评论

暂无评论...
验证码 换一张
取 消