Cannot create memory Optimized Table

Source: Internet
Author: User
Tags filegroup

Added a memory table FileGroup for dbtest, but error occurred while creating memory Optimized table

Cannot create memory optimized tables in a database The does not has an online and non-empty Memory_optimized_data Fileg Roup.

 Use [Master]GOALTER DATABASE [DBTest] ADDFILEGROUP[Memorytablegroup] CONTAINSMemory_optimized_data;GO Use [DBTest]GO--Drop table if it already exists.IF object_id('dbo. Memorytable_test','U') is  not NULL    DROP TABLEdbo. Memorytable_testGOCREATE TABLEdbo. Memorytable_test (IDint  not NULL, namevarchar( One) not NULL, Ageint  not NULL,    constraintpk__memorytable_testPrimary Key nonclusteredHash (ID) with(Bucket_count=1024x768))  with(memory_optimized=  on, durability=schema_and_data)GO

To view Memorytablegroup, whose number of FileStream files is 0, you need to add file for the filegroup.

Add a file,memory table for Memorytablegroup to create the success.

ALTER DATABASE [DBTest] ADD FILE (Name='dbtest_file1', filename='d:\ Mssqlserverdata\mssql12. Mssqlserver\mssql\data\dbtest_file1'to[Memorytablegroup  ]GO

Reference doc:

The Memory Optimized Filegroup

Cannot create memory optimized tables in a database on SQL Server 2014

Cannot create memory Optimized Table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.