설치 및 업그레이드 > 설치 및 구성 안내서 > 데이터베이스 설치 > SQL 서버 설치 > 색인 바이트 제한
  
색인 바이트 제한
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)