DML triggers in memory optimized table in SQL Server 2016

487 Views Asked by At

I have two tables: table 1 is disk based storage and table 2 is in memory storage. I create a DML trigger on table 2 and in that trigger, I insert a record into table 1. Will it be possible?

1

There are 1 best solutions below

0
On

You can't, it's not possible in the same in-memory transaction using mvcc isolation access a disk-based table through the trigger.

For workaround this you could saving to a stage table memory-based inside the trigger and insert or update to table 1 from stage table using update-join between a memory-based-disk and table-based-disk although it cames with some admin to manage and control but works.

DDL Tiggers still doesn't work even SQL 2017.