Question

I've created server scope ddl trigger to audit user activities on the server.
Now if someone tries to create in-memory table the statement fails with the following error:

Error SQL72014: .Net SqlClient Data Provider: Msg 12332, Level 16, State 107,
Line 1 Database and server triggers on DDL statements DROP and CREATE are not
supported with memory optimized tables.

Can I create ddl trigger that will ignore actions on in-memory tables?

Was it helpful?

Solution

No, databases with In-Memory OLTP enabled do not support DDL triggers.

Both database-level and server-level DDL triggers are not supported with In-Memory OLTP tables and natively compiled modules.

You cannot create DDL triggers in a database where In-Memory OLTP is enabled since the code path required to run the trigger would interfere with the In-Memory functionality. The workaround is to put all your In-Memory OLTP tables in a single database without a DDL trigger, and the rest of your tables into a separate database without memory-optimized tables, and enable the DDL Trigger there.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top