August 20, 2012 at 5:18 am
Is there a way to create a role having insert/update/delete permissions on each table in a database in such a way that every time a new table is created, it's under the scope of that role for the mentioned operations ?
August 20, 2012 at 5:19 am
That would be the db_datawriter built in role. Works as you want, insert, update, delete rights on all tables.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 20, 2012 at 5:23 am
Yeah. Sorry but I forgot to mention that due to certain restrictions we cannot use built in roles. Is there kind of parallel mechanism to implement db_datawriter ?
August 20, 2012 at 5:45 am
Why on earth not use the built ins?
You could create a role that grants the permissions on the schema, then any tables added to the schema get the permissions
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 20, 2012 at 5:47 am
That's a strange restriction. Are you at liberty to explain? One way round it is to grant INSERT, UPDATE and DELETE on the schema(s) that contain your tables.
http://msdn.microsoft.com/en-us/library/ms187940.aspx
John
August 20, 2012 at 6:02 am
Thats what I was thinking. However then my mind started thinking ridicously for the following command:
grant insert, update, delete on all tables to <rolename>
Nothing sort of this, right ??? 🙂
August 20, 2012 at 6:09 am
The following thing works for me for granting execute permissions on all the procedures to a role:
grant EXEC to <rolename>
The same way i was thinking and thats how my mind started dreaming.:-)
August 20, 2012 at 6:58 am
sqlnaive (8/20/2012)
Nothing sort of this, right ??? 🙂
Did you try it?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 5, 2012 at 3:54 am
No Gail, Didn't tried it yet. But definitely will do.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply