2016-05-12 6 views
0

PERSISTED NOT NULLの計算列を持つクラスタ化インデックスにFILLFACTORを設定できないのはなぜですか?SQL Serverのクラスタ化インデックスにFILLFACTORを指定できません(ANSI_PADDINGエラー)

クエリFILLFACTOR設定します

ALTER INDEX [PK_MyIndex] ON [MyTable] REBUILD PARTITION=ALL WITH (FILLFACTOR = 90) 

エラー:

ALTER INDEX failed because the following SET options have incorrect settings: 'ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations. 

それはこの作業を取得することは可能ですか?

答えて

2

次の記事をお読みください: https://msdn.microsoft.com/en-AU/library/ms187403.aspx

SET ANSI_PADDING must be ON when you are creating or changing indexes on computed columns or indexed views. For more information about required SET option settings with indexed views and indexes on computed columns, see "Considerations When You Use the SET Statements" in SET Statements (Transact-SQL).

は、次のステートメントを試してみてください。

SET ANSI_PADDING ON 
ALTER INDEX [PK_MyIndex] ON [MyTable] REBUILD PARTITION=ALL WITH (FILLFACTOR = 90) 
+0

ありがとうございました!私はテーブルのようにANSI_PADDINGを設定しなければならないと私は思いました。 –

+0

あなたは大歓迎です! – Alex

関連する問題