use master
go
-- Alter database to be "in-memory"
ALTER DATABASE [itai]
SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT = ON;
ALTER DATABASE [itai]
ADD FILEGROUP itai_mod CONTAINS MEMORY_OPTIMIZED_DATA;
ALTER DATABASE [itai]
ADD FILE (name='itai_IM', filename='D:\rdsdbdata\DATA\itai_IM')
TO FILEGROUP [itai_mod];
------------------------------------------------------------------------
use itai
go
-- Create an "in-memory" table
CREATE TABLE dbo.InMemoryExample
(
OrderID INTEGER NOT NULL IDENTITY
PRIMARY KEY NONCLUSTERED,
ItemNumber INTEGER NOT NULL,
OrderDate DATETIME NOT NULL
)
WITH
(MEMORY_OPTIMIZED = ON,
DURABILITY = SCHEMA_AND_DATA);
GO