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 1078 게시물 읽기
No. 1078
CLI0002W 오류 해결법 부탁드립니다.
작성자
장치영
작성일
2006-08-10 23:51
조회수
8,545

안녕하세요.

DB2를 처음 사용하는데 

C#에서 DB2를 연결하여 자료를 검색시

다음의 오류가 발생합니다.

truncated SQLSTATE=01004  CLI0002W Data TRUNCATED.

SQLSTATE=01004


SELECT RTRIM(LTRIM(CARNO)) FROM T03YVANH


시 오류가 발생합니다.

해당 CARNO는 한글 타입입니다.

문제를 해결할수 있는 방법이 무엇인지요..


DB2 CONNECT는 7.2입니다

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

CLI0002W와 관련된 것들을 보니까 대게 아래 2가지를 하라고 하네요. 

1. db2의 Fix를 올리세요. 가능하시면 최종 Fix까지 적용하세요.
2. db2cli.ini에 DISABLEUNICODE=1 를 적용하세요.

CLI0002W DATA TRUNCATED WHEN EXECUTING A CALL TO A STORED PROCEDURE

 Fixes are available
DB2 Universal Database Version 7 FixPak 11
DB2 Universal Database Version 7 FixPak 12
DB2 Universal Database Version 7 FixPak 13

 


APAR status
Closed as program error.

Error description
Customer seeing CLI0002W Data Truncated error message when execu
ting a call to a stored procedure using XA.
Local fix
Use DISABLEUNICODE=1 in the db2cli.ini file.




  What is the DISABLEUNICODE keyword used for?
   
    A: The DISABLEUNICODE keyword is used to disable underlying Unicode support. The keyword can be set to 1 (to enable) or 0 (to disable). When this keyword is enabled, Unicode data is converted to the application's local code page first before sending it over to the server and can, therefore, cause data loss for data that cannot be represented using the local code page. With Unicode support enabled, DB2 CLI on the client will attempt to connect to the database using the best codepage possible to prevent data loss and this can slightly increase connection times. If Unicode support is enabled, there will be data "expansion" in the case of ASCII data (when multiple bytes are used to store the ASCII data). This may not be desirable in all situations.

도님이 2006-08-11 09:48에 작성한 댓글입니다.
이 댓글은 2006-08-11 09:55에 마지막으로 수정되었습니다. Edit

Use DISABLEUNICODE=1 in the db2cli.ini file.

을 sample을 구할수 있나요..

장치영님이 2006-08-14 16:38에 작성한 댓글입니다. Edit

Window는 IBM 폴더 아래에 있고 unix는 sqllib/cfg아래에 있습니다.


1. 수동으로 db2cli.ini 변경 

- 해당 값을 common 이라는 section안에 넣어준다. common secion이 없는 경우에는 만들어주면 된다.

; Comment lines start with a semi-colon.

[tstcli1x]

uid=userid

pwd=password

autocommit=0

TableType="'TABLE','VIEW','SYSTEM TABLE'"

[tstcli2x]

; Assuming dbalias2 is a database in DB2 for MVS.

SchemaList="'OWNER1','OWNER2',CURRENT SQLID"

[MyVeryLongDBALIASName]

dbalias=dbalias3

SysSchema=MYSCHEMA

[common]

DISABLEUNICODE=1





2. update cli cfg를 이용하여 변경 

- section명으로 common을 주면 common section이 없는 경우 생성이 된다. 

db2 update cli cfg for section common using DISABLEUNICODE 1

 

확인 방법

db2 get cli cfg 

지정 값을 삭제하려는 경우 직접 파일을 수정하거나 null값으로 cli cfg값을 update한다. 

db2 update cli cfg for section common using DISABLEUNICODE NULL



 

도님이 2006-08-16 09:25에 작성한 댓글입니다.
이 댓글은 2006-08-17 10:26에 마지막으로 수정되었습니다. Edit
[Top]
No.
제목
작성자
작성일
조회
1081aix5.3에 db2설치후 instance생성.. [1]
이종민
2006-08-22
7252
1080데이터베이스별로 VIEW를 생성시 사용된 SELECT 쿼리를 어디서 얻나요?? [1]
박영진
2006-08-18
7601
1079update join view 사용관련 [1]
새벽이
2006-08-17
7929
1078CLI0002W 오류 해결법 부탁드립니다. [3]
장치영
2006-08-10
8545
1077[질문] EXCEPT ALL 랑 EXCEPT 차이를 모르겠습니다. [2]
이준식
2006-08-10
7933
1073DB2의 한글 크기 3바이트 [3]
윤세관
2006-08-08
14458
1072[질문] 이거 좀 이상하지 않나요? [3]
이준식
2006-08-04
7237
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.022초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다