我的工作是我的暂存过程的一部分,它包括索引表格后期人口。
其中一个索引是过滤索引:
CREATE NONCLUSTERED INDEX [IDX_IP_ActivePAss] ON [dbo].[IPStg]
(
[SIP] ASC,
[EIP] ASC
)
WHERE ([Status] IN ("Active", "Private"))
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
SORT_IN_TEMPDB = OFF,
DROP_EXISTING = OFF,
ONLINE = OFF,
ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
作业失败,出现以下错误:
CREATE INDEX失败,因为以下SET选项不正确 设置:' QUOTED_IDENTIFIER'。验证SET选项是否正确 用于计算列和/或索引视图和/或索引 过滤的索引和/或查询通知和/或XML数据类型 方法和/或空间索引操作。 [SQLSTATE 42000](错误 1934年)。步骤失败了。
请告知。
答案 0 :(得分:1)
我希望看到单引号不会翻倍。我认为这是一个错字。
CREATE NONCLUSTERED INDEX [IDX_IP_ActivePAss] ON [dbo].[IPStg] (
[SIP] ASC,
[EIP] ASC
) WHERE ( [Status] IN ('Active', 'Private' )
) WITH ( PAD_INDEX = OFF,
STATISTICS_NORECOMPUTE = OFF,
SORT_IN_TEMPDB = OFF,
DROP_EXISTING = OFF,
ONLINE = OFF,
ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY] GO