Update permission to a group

  • Hi

    Kindly suggest how can i give update and insert permission to a group (not delete) on all the tables in my db ,i dont want to give that permissions to individual table by cliking on check boxes bcz it is more than 600 tables,

    so plz suggest the easier way to give these permissions on all tables ..

    Thanks

  • First and foremost for easier administration on future needs I would create a role to give the permission to then assign the folks or groups to that role. That way you can remove and add much easier and have better control over the fact. You also can adjust which tables are included or not thru the role much easier after the intial handling. As for assigning update and insert to all 600+ tables to the role try this.

     

    sp_msforeachtable 'GRANT INSERT, UPDATE ON ? TO rolename'

     

    It may add dtproperties which you can easily remove but it will not effect other system tables just user tables.

  • Antares has the best suggestion. Follow his advice.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply