从非优化插入到内存优化表
我有两个数据库。 主要有 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除了使用本机过程在内存表中插入、更新或删除之外,没有其他方法。
请参阅:内存优化表查询处理指南
要从一个数据库移动到另一个数据库,源表必须存在于本地
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