|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 6:21 AM
Points: 2,642,
Visits: 1,639
|
|
| 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 ?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:26 PM
Points: 37,669,
Visits: 29,922
|
|
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 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 6:21 AM
Points: 2,642,
Visits: 1,639
|
|
| 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 ?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:26 PM
Points: 37,669,
Visits: 29,922
|
|
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 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 8:35 AM
Points: 4,418,
Visits: 7,173
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 6:21 AM
Points: 2,642,
Visits: 1,639
|
|
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 ???
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 6:21 AM
Points: 2,642,
Visits: 1,639
|
|
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.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:26 PM
Points: 37,669,
Visits: 29,922
|
|
sqlnaive (8/20/2012)
Nothing sort of this, right ??? 
Did you try it?
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 6:21 AM
Points: 2,642,
Visits: 1,639
|
|
| No Gail, Didn't tried it yet. But definitely will do.
|
|
|
|