'MEMORY_OPTIMIZED' 不是公认的 CREATE TYPE 选项
'MEMORY_OPTIMIZED' is not a recognized CREATE TYPE option
我正在 SQL Server 2016 上试验 memory-optimized user-defined table types(§D.2 和 §E)。
上下文:
- SQL Server Enterprise 13.0.4446.0(即 CU4,2017 年 8 月 8 日发布)
- 从 SQL Server 2008 R2 实例恢复的数据库
- 数据库的
COMPATIBILITY_LEVEL
设置为 130(SQL Server 2016)
- 为数据库创建了内存优化文件组
还有:
create type dbo.test_type as table(
id int not null,
primary key clustered (id asc)
with (ignore_dup_key = off, memory_optimized = on))
输出失败:
Msg 155, Level 15, State 1, Line 4 'memory_optimized' is not a
recognized CREATE TYPE option.
我错过了什么?
应该是这样的。
memory_optimized
是类型不是主键的 属性。
create type dbo.test_type as table(
id int not null,
primary key nonclustered (Id))
With (memory_optimized = on)
我正在 SQL Server 2016 上试验 memory-optimized user-defined table types(§D.2 和 §E)。
上下文:
- SQL Server Enterprise 13.0.4446.0(即 CU4,2017 年 8 月 8 日发布)
- 从 SQL Server 2008 R2 实例恢复的数据库
- 数据库的
COMPATIBILITY_LEVEL
设置为 130(SQL Server 2016) - 为数据库创建了内存优化文件组
还有:
create type dbo.test_type as table(
id int not null,
primary key clustered (id asc)
with (ignore_dup_key = off, memory_optimized = on))
输出失败:
Msg 155, Level 15, State 1, Line 4 'memory_optimized' is not a recognized CREATE TYPE option.
我错过了什么?
应该是这样的。
memory_optimized
是类型不是主键的 属性。
create type dbo.test_type as table(
id int not null,
primary key nonclustered (Id))
With (memory_optimized = on)