SQL 服务器 - 迁移到内存中时出现内存配额错误 table

SQL Server - Memory quota error during migration to in-memory table

我们目前正在 SQL Server 2019 标准版上迁移到内存中 table。基于 table 的磁盘是 55GB 数据 + 54Gb 索引(71M 记录)。内存为 900 GB。但是在数据迁移过程中(INSERT语句)我们得到一个错误信息:

Msg 41823, Level 16, State 109, Line 150 Could not perform the operation because the database has reached its quota for in-memory tables. This error may be transient. Please retry the operation.

内存文件是“无限制的”,所以看起来很奇怪,因为 SQL Server 2019 不应该对内存 tables 有任何大小限制。

为什么您认为单个 mem-opt table 中的内存数据大小在标准版上是无限的?

来自 Memory Limits in SQL Server 2016 SP1 (all of which still applies according to 2019 docs):

Each user database on the instance can have an additional 32GB allocated to memory-optimized tables, over and above the buffer pool limit.

因此,我想您可以做您想做的事,但是您必须将其分布在多个数据库中。您将无法在单个 mem-opt table 中存储超过 32GB,甚至在单个数据库中的多个 mem-opt tables 中。

来自 the 2019 docs 的屏幕截图被裁剪且可能缩放不当: