แก้ไข

แชร์ผ่าน


Migrating Triggers

Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance

This topic discusses DDL triggers and memory-optimized tables.

DML triggers are supported on memory-optimized tables, but only with the FOR | AFTER trigger event. For an example see Implementing UPDATE with FROM or Subqueries.

LOGON triggers are triggers defined to fire on LOGON events. LOGON triggers do not affect memory-optimized tables.

DDL Triggers

DDL triggers are triggers defined to fire when a CREATE, ALTER, DROP, GRANT, DENY, REVOKE, or UPDATE STATISTICS statement is executed on the database or server on which it is defined.

You cannot create memory-optimized tables if the database or server has one or more DDL trigger defined on CREATE_TABLE or any event group that includes it. You cannot drop a memory-optimized table if the database or server has one or more DDL trigger defined on DROP_TABLE or any event group that includes it.

You cannot create natively compiled stored procedures if there are one or more DDL triggers on CREATE_PROCEDURE, DROP_PROCEDURE, or any event group that includes those events.

See Also

Migrating to In-Memory OLTP