Enabling a Database for In-Memory OLTP

Any database that will contain memory-optimized tables must have a MEMORY_OPTIMIZED_DATA filegroup defined which is used for storing the checkpoint files needed by SQL Server to recover the memory-optimized tables. The syntax for creating the filegroup is similar to creating a regular filestream filegroup, but must also specify the CONTAINS MEMORY_OPTIMIZED_DATA option. (For more information on creating and defining filegroups, see Chapter 20, “Creating and Managing Databases”)

To create a new database with a MEMORY_OPTIMIZED_DATA filegroup, you would execute a command similar to the following:

CREATE DATABASE InMemory ON  PRIMARY ( NAME = N'InMemory_Data',               FILENAME ...

Get Microsoft SQL Server 2014 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.