database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
ㆍDB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
DB2 Q&A 953 게시물 읽기
No. 953
[IBM][CLI Driver][DB2/NT] SQL0101N 명령문이 너무 길거나 너무 복잡합니다. SQLSTATE=54001
작성자
미리내(jaguar72)
작성일
2006-03-28 17:31
조회수
6,649

안녕하세요...

 

DB 쿼리를 실행하는 데, 쿼리 문장이 좀 길어요.

그래서

[IBM][CLI Driver][DB2/NT] SQL0101N 명령문이 너무 길거나 너무 복잡합니다. SQLSTATE=54001

이라는 에러 메시지가 나네요...

동적쿼리를 구성했기 때문에 많이 늘어날수 도 있거던요...

 

어떤 DB2환경설정을 변경해야 실행 될 수 있을 까요....

저는 SQL문 힙(4KB) (STMTHEAP) 사이즈를 10000까지 늘려줬거던요...

그래도 안되네요...

아시는 분 답변 부탁드립니다.

이 글에 대한 댓글이 총 2건 있습니다.

 

Longest SQL statement (in bytes)   2097152

 

라고 메뉴얼에 나오는데요..... 고정되어 있는듯 하내요

서성완(redmoon94)님이 2006-03-28 17:41에 작성한 댓글입니다.

User Response:
Either:

  • Break the statement up into shorter or less complex SQL statements.
  • Increase the size of the statement heap (stmtheap) in the database configuration file.
  • Reduce the number of check or referential constraints involved in the statement or reduce the number of indexes on foreign keys.
  • Reduce the number of triggers involved in the statement.
  • Federated system users: determine which data source is failing the statement (see the problem determination guide for procedures to follow to identify the failing data source) and determine the cause of the rejection. If the rejection is coming from the federated server, increase the size of the statement heap (stmtheap) in the database configuration file.

sqlcode: -101
sqlstate: 54001


To Check the current DB2 Statement Heap Size :

For unix systems:

1) su - <dbadminuser>
2) db2 connect to <dbname>
3) db2 get db config for <dbname>
4) check the SQL statement heap size (STMTHEAP) and update it to 5 times it's current setting using the procedure below.

For windows systems:

1) open a db2 command window
2) db2 connect to <dbname>
3) db2 get db config for <dbname>
4) check the SQL statement heap size (STMTHEAP) and update it to 5 times it's current setting using the procedure below.



To Increase DB2 Statement Heap:

For unix systems:

1. Kill the slapd process
2. su - <dbadminuser>
3. source the <dbname> profile: . sqllib/db2profile
4. Issue the "db2 update db cfg for <dbname> using STMTHEAP <value>" command where dbname is ldapdb2 or whatever db is used for IDS and value is the current statement heap size (STMTHEAP) multiplied by 5.
5. db2stop
6. exit back to root, and restart slapd (which will restart the <dbname> database)



For windows systems:
1. Kill the slapd process
2. open a db2 command window
3. db2 connect to dbname
4. Issue the "db2 update db cfg for <dbname> using STMTHEAP <value>" command where dbname is ldapdb2 or whatever db is used for IDS and value is the current statement heap size (STMTHEAP) multiplied by 5.
5. db2stop
6. exit back to root, and restart slapd (which will restart the <dbname> database)

도님이 2006-03-28 18:01에 작성한 댓글입니다. Edit
[Top]
No.
제목
작성자
작성일
조회
956[질문] char()함수에서 날짜를 문자열로 바꿀려고 하는데요 [3]
이준식
2006-03-31
6637
955큰 테이블의 reorg시 질문~ [3]
osast
2006-03-30
4834
954분석에서..declare 문 사용하기 [1]
하늘
2006-03-30
5319
953[IBM][CLI Driver][DB2/NT] SQL0101N 명령문이 너무 길거나 너무 복잡합니다. SQLSTATE=54001 [2]
미리내
2006-03-28
6649
952[질문] DB2의 DATE 데이타 타입의 크기가 4바이트 맞나요? [2]
이준식
2006-03-27
5145
951[질문] 만들어진 sequence와 특정 테이블 기본키는 무엇인지.. [2]
이준식
2006-03-24
5699
950DB2 CodePage 관련 질문 [1]
개발자
2006-03-23
6295
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.018초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다