|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, February 13, 2013 7:58 AM
Points: 137,
Visits: 159
|
|
| In a sql server 2008 r2 database I just added 3 triggers to a specific table. Can you tell me if the user and/or application that uses the triggers need to have specific permission levels for the triggers to run. If these permissions are required, can you tell me what permissions are required for the user and/or application to run an access the triggers?
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Sunday, May 05, 2013 11:42 AM
Points: 374,
Visits: 326
|
|
Hi,
Example: a user has permission to insert, but denied on delete for tableA.
When user inserts a row into tableA > insert triggers fire. When user deletes a row from tableA > delete triggers don't fire.
So the triggers fire depend on type of action (insert/update/delete) and what permissions (insert/update/delete) were granted for the user on the table.
-------------------------------------------------------------------------------------- Hai Ton My DB4BREAKFAST blog: http://db4breakfast.blogspot.com
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, February 13, 2013 7:58 AM
Points: 137,
Visits: 159
|
|
When I was orginally using the code, I had full 'sa' permissions. Now when I using the other database, there are no special permissions that have been setup.
Thus can you tell me what permissions are required for a user to have update, insert, and delete permissions? What role is required like sysadmin?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:07 PM
Points: 37,687,
Visits: 29,946
|
|
Either db_datawriter role or UPDATE, INSERT and DELETE granted on the table.
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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, February 13, 2013 7:58 AM
Points: 137,
Visits: 159
|
|
THANKS!
|
|
|
|