从非优化插入到内存优化表

发布于 2025-01-14 03:24:03 字数 464 浏览 1 评论 0原文

我有两个数据库。 主要有 DDL 触发器,因此我无法在那里创建内存优化表。所以我创建了辅助数据库并创建了内存优化的表。现在,在主数据库上的过程中,我需要将其他表中的复制数据插入到此优化中。

例如:

INSERT INTO InMemory.dbo.DestTable_InMem SELECT * FROM @T;

我有:

A user transaction that accesses memory optimized tables or natively compiled modules cannot access more than one user database or databases model and msdb, and it cannot write to master.

是否存在一些解决方法?

我无法将我的程序移至第二个数据库。

I have two database.
Primary have a DDL triggers so i can't create memory optimized tables there. So i created secondary database and create there table with memory optimized on. Now, in procedure on primary database i need insert copy data from other table to this optimized.

For example:

INSERT INTO InMemory.dbo.DestTable_InMem SELECT * FROM @T;

And i have:

A user transaction that accesses memory optimized tables or natively compiled modules cannot access more than one user database or databases model and msdb, and it cannot write to master.

Did exists some workarounds from it?

I cannot move my procedure to second database.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

后eg是否自 2025-01-21 03:24:03

除了使用本机过程在内存表中插入、更新或删除之外,没有其他方法。

请参阅:内存优化表查询处理指南

要从一个数据库移动到另一个数据库,源表必须存在于本地

There is no other way than using a native procedure to INSERT, UPDATE or DELETE in an in-memory table.

See: A Guide to Query Processing for Memory-Optimized Tables

To move from one DB to the other, the source table must exists locally

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文