There is just so much that is not apparent until we trip over it.
Here I am trying to see if I am able to restore MSFT’s sample database, WideWorldImporters, on a SQL Server Express instance.
Btw, the targeted edition is v2017.
Restore worked flawlessly.
As I am only going to occasionally use the sampler database on the targeted instance, I wanted to mark it AUTO CLOSE.
My hope is that it will be silent and not use resources while not in use.
Here is the code for setting a database to AUTO CLOSE.
USE [master] GO ALTER DATABASE [WideWorldImportersFull] SET AUTO_CLOSE ON WITH NO_WAIT GO
Nice error message.
Msg 10794, Level 16, State 125, Line 4 The operation 'AUTO_CLOSE' is not supported with databases that have a MEMORY_OPTIMIZED_DATA filegroup. Msg 5069, Level 16, State 1, Line 4 ALTER DATABASE statement failed.
Yea, restore worked.
But, outwitted myself, trying to set it to AUTO-CLOSE.