2

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?

5

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.

  • Thanks Max, there is no such option in our environment, we'll probably try to catch those events using extended events. – Michael Cherevko Jan 14 '16 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.