Skip to content
Advertisement

How to Fix Error Msg 41337, Level 16, State 100 in Create Memory Optimize table in SQL Server

I want to use a memory optimize table and I got below error – how can I fix it? Any idea will be helpful.

Msg 41337, Level 16, State 100, Line 1
Cannot create memory optimized tables. To create memory optimized tables, the database must have a MEMORY_OPTIMIZED_FILEGROUP that is online and has at least one container.

Code:

Advertisement

Answer

you must create a file Group first :

Create FileGroup :

imoltp is a sampledatabase

Add DatabaseFile To Your File Group :

Create Memory Optimize Table:

take a look at this for get more Info : https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/creating-a-memory-optimized-table-and-a-natively-compiled-stored-procedure?view=sql-server-ver15 for more detail

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement