something about trigger

To create a DML trigger requires ALTER permission on the table or view on which the trigger is being created.

 

To create a DDL trigger with server scope (ON ALL SERVER) or a logon trigger requires CONTROL SERVER permission on

the server. To create a DDL trigger with database scope (ON DATABASE) requires ALTER ANY DATABASE DDL TRIGGER
permission in the current database.


A trigger will execute under the security context which invoke the trigger.

For example
Say I create a trigger on table1 for insert operation, userA execute insert row to table directorly.
The trigger would execute under userA's context.

If userA insert row through a procedure, the trigger would execute under the procedure's context instead of the
user's context.

If the operation in trigger fail, the whole transaction would roll back
posted on 2008-09-07 23:15  stswordman  阅读(343)  评论(0编辑  收藏  举报