インストールおよびアップグレード > Installation and Configuration Guide > データベースのインストール > SQL Server のインストール > インデックスバイトの制限
  
インデックスバイトの制限
SQL Server のインデックスキーの最大長は 900 バイトです。インデックスが 900 バイトの制限を超えた場合、例外が発生します。例外の発生を防止するには、インデックスによって使用されるデータ値が 900 バイト未満であることを確認します。
インデックスサイズが 900 バイトを超えた場合に発生する例外の例を以下に示します。
たとえば、次のようになります。
Insert ステートメントが実行され、インデックスサイズが 900 バイトを超えました。
wt.pom.DatastoreException: A SQL error has occurred for the statement
"INSERT INTO WTUser(classnameA2A2,updateCountA2,blob$entrySetadHocAcl,
disabled,
classnamekeydomainRef,idA3domainRef,entrySetadHocAcl,eventSet,inherited
Domain,name,repairNeeded,markForDeleteA2,updateStampA2,createStampA2,modify
StampA2,idA2A2) VALUES (’wt.org.WTUSER’,1,?,?,?,?,?,?,?,?,?,?,?,?,?)".
Database system message follows: Nested exception is: java.sql.SQLException:
[ptc][SQLServer JDBC Driver][SQLServer]Operation failed. The index entry of
length 2000 bytes for the index ’WTUser$COMPOSITE’ exceeds the maximum
length of 900 bytes.
たとえば、次のようになります。
Update ステートメントが実行され、インデックスサイズが 900 バイトを超えました。
wt.pom.DatastoreException: A SQL error has occurred for the statement
"UPDATE WTUser SET blob$entrySetadHocAcl=?,disabled=?,classnamekey
domainRef=?,idA3domainRef=?,entrySetadHocAcl=?,eventSet=?,inherited
Domain=?,name=?,repairNeeded=?,markForDeleteA2=?,
updateStampA2=?,modifyStampA2=?,updateCountA2=updateCountA2+1 WHERE
((idA2A2 = ?) AND (updateCountA2 = ? ))" Database system message follows:
Nested Exception is: java.sql.SQLException: [ptc][SQLServer JDBC Driver]
[SQLServer]Operation failed. The index entry length of 2000 bytes for the
index ’WTUser$COMPOSITE’ exceeds the maximum length of 900 bytes.
また、create_ddl_wt.bat ファイルを実行する際に警告が発生することがあります。これらの警告は無視できます。
たとえば、次のようになります。
create_ddl_wt.bat ファイルを実行しています。
Warning: message=[ptc][SQLServer JDBC Driver][SQLServer]Warning! The
maximum key length is 900 bytes. The index 'WTUser$COMPOSITE' has
maximum length of 4000 bytes. For some combination of large values,
the insert/update operation will fail. command=CREATE INDEX WTUser$
COMPOSITE ON WTUser(name)