Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sql server permissions on triggers Expand / Collapse
Author
Message
Posted Monday, February 04, 2013 8:32 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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?
Post #1415560
Posted Monday, February 04, 2013 11:11 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld 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
Post #1415578
Posted Tuesday, February 05, 2013 6:10 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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?
Post #1415781
Posted Tuesday, February 05, 2013 6:14 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-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

Post #1415785
Posted Tuesday, February 05, 2013 6:50 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, February 13, 2013 7:58 AM
Points: 137, Visits: 159
THANKS!
Post #1416201
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse