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

相关文章:

  • 2022-01-29
  • 2022-12-23
  • 2021-09-15
  • 2022-02-05
  • 2021-09-24
  • 2022-12-23
  • 2021-10-02
  • 2022-12-23
猜你喜欢
  • 2021-07-15
  • 2021-08-16
  • 2021-08-24
  • 2021-11-25
  • 2021-05-28
  • 2021-11-15
  • 2022-12-23
相关资源
相似解决方案