SQL 2016 – I have 2 tables, Foo & Bar – Bar references Foo. I'd like to turn Foo into an in-memory optimized table, however as Bar references this, I can't do it.
I also can't make Bar in-memory due to its dependence on Foo.
Seems like I need to do this to both tables at the same time – is this possible without recreating both tables from scratch?
Best Answer
Correct. If you try to recreate the FK after migrating one table you will get:
Migrating to in-memory tables always requires recreating the tables from scratch. SSMS will rename your old tables, create the new in-memory tables, load them from your old tables, and drop your old tables.