SQLTeam.com | Weblogs | Forums

Permission for Trigger

sql2008r2

#1

Hello, I have created a trigger that pushes a record to a table in another database. Works fine, however, I am worried about permissions. When a trigger fires what permissions does it use? Server? User (that made the change)?

Thank you.


#2

By default, the trigger will execute as "CALLER", that is, whatever id is running the code.

I often have to specify "EXECUTE AS OWNER" on triggers to make sure the trigger has sufficient permissions.


#3

Thank you!! I never think about EXECUTE AS. I should but do not.