SQL Server – MEMORY_OPTIMIZED_DATA filegroup – Auto Close?

Background

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.

Database Properties

AUTO CLOSE

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.

Code

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

Output

Nice error message.

Textual

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.


Image

 

Summary

Yea, restore worked.

But, outwitted myself, trying to set it to AUTO-CLOSE.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s