728x90

Error description


Following the JDBC Driver Programmer's Guide to enable sqlhosts file lookup using SQLH_TYPE and SQLH_FILE entries in the
application connection URL works as anticipated when a port number is specified for the defined server in sqlhosts.
However, if a service name is used instead of a port number in the sqlhosts server definition, the following error isgenerated by the application at runtime:
SQL Code: -79999

SQL State:IX000

Message:Message text will be provided in later releases

java.lang.NumberFormatException: For input string: "sqlexec"


This request is to also include the service name to this functionality.


Problem summary


****************************************************************
USERS AFFECTED:
JDBC driver before 3.50.JC1
****************************************************************
PROBLEM DESCRIPTION:
JDBC was not able to handle service name in the connection
string. It was must to provide the port number in the connection
URL or SQLHOSTS file.
****************************************************************
RECOMMENDATION:
Upgrade to JDBC 3.50.JC1 or above.
****************************************************************


Problem conclusion


The problem has been fixed in 3.50.Jc1. Now JDBC users can pass service name in a connection URL as well as in SQLHOSTS.

728x90
728x90

Problem(Abstract)

Problem installing a 32-bit IBM Informix Client SDK product on a 64-bit Windows machine.

Symptom

When installing a 32-bit IBM Informix Client SDK product on a 64-bit Windows machine, you may see a message stating that you cannot install becuase you are using a 64 bit machine.

Cause

The problem is due to the Windows redirection path not being included in your systems PATH environment variable setting.

Environment

Windows 64-bit machine

Resolving the problem




  1. Open a Windows command window ('cmd')
  2. run: "set PATH=C:\WINDOWS\SysWOW64\;%PATH%"
  3. Run the setup.exe for IBM Informix Client SDK

To confirm that the Informix 32-bit ODBC driver has been installed run:

"C:\windows\syswow64\odbcad32.exe" and look under the Drivers tab.


http://www.ibm.com/support/docview.wss?uid=swg21567466&myns=swgimgmt&mynp=OCSSVT2J&mync=E

728x90
728x90

1. 레지스트리 항목 확인
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\세션이름]


2. FontCharSet 항목 수정

0 -> 81 (16진수)

728x90
728x90

Problem(Abstract)

JDBC needs a specific environment set if the DB_LOCALE is set to ko_kr.cp_949 for Korean Cp949.

Symptom

Using JDBC, we may get errors like -79784 (" Locale not supported.") or -908 ("Attempt to connect to database server NAME failed.") when trying to connect to a database using the following locale: ko_kr.cp_949

For example, the following connection:
jdbc:informix-sqli://myhost:ids_port/mydatabase:informixserver=myidsserver;user=mylogin;password=mypasswd;DB_LOCALE=ko_kr.cp_949;CLIENT_LOCALE=ko_kr.cp_949

might return error -79784 or -908 if used with JDK earlier than 1.6 and/or JDBC earlier than 3.50.JC8


Resolving the problem

When using JDBC, in order to be able to connect properly to a database using locale ko_kr.cp_949 you have to use JDK1.6 or later and JDBC 3.50.JC8 or later.


http://www-01.ibm.com/support/docview.wss?uid=swg21449804

728x90
728x90

Problem(Abstract)

You install IBM Informix Client Software Development Kit (CSDK) 3.70.FC4 on a machine running a Windows operating system. The installation does not include OpenAdmin Tool (OAT). You note that OAT is included when you install the 32-bit Windows CSDK 3.70.TC4.

Cause

OAT is first bundled with CSDK in 3.70.xC4 fixpaks. This does not include the 64-bit CSDK 3.70.FC4 on Windows.

Resolving the problem

You can install the 32-bit OAT on a Windows 64-bit machine.


설치시 명령프롬프트를 관리자 권한으로 실행해야 하며, PATH를 다음과 같이 지정하여 설치한다.

SET PATH=%windir%\syswow64;%PATH%


http://www-01.ibm.com/support/docview.wss?uid=swg21579591

http://www.ibm.com/support/docview.wss?uid=swg21567466&myns=swgimgmt&mynp=OCSSVT2J&mync=E

728x90
728x90

CREATE FUNCTION reverse(inputstring VARCHAR(100))

RETURNS VARCHAR(100)

SPECIFIC reverse

BEGIN ATOMIC

DECLARE strlength INTEGER;

DECLARE returnstring VARCHAR(100);

SET strlength =  LENGTH(inputstring);

SET returnstring = '';

WHILE strlength > 0

        DO

                SET returnstring = returnstring || SUBSTR(inputstring,strlength,1);

                SET strlength = strlength - 1;

END WHILE;


RETURN returnstring;

END@


728x90
728x90

You can use the double colon operator (::) to cast GeoTimeRange values to a specific precision. This allows you to specify a less precise input specification than the GL_DATETIME setting. It does not, however, override the GL_DATETIME setting, nor does it extend text input.

In the following example, GL_DATETIME is set to YEAR TO DAY, and the DATETIME cast allows you to specify a GeoTimeRange value with a precision less than the minimum default of YEAR TO SECOND:

-- GL_DATETIME="%Y-%m-%d"
INSERT INTO trtab VALUES (GeoTimeRange('1997-01-02'::datetime year to day));
SELECT * FROM trtab;
tr  (1997-01-02,1997-01-02) 

In the following example, the cast allows you to specify less than the GL_DATETIME precision:

-- GL_DATETIME="%Y-%m-%d %H:%M:%S"
INSERT INTO trtab VALUES (GeoTimeRange('1997-01-02'::datetime year to day));
SELECT * FROM trtab;
tr  (1997-01-02 00:00:00,1997-01-02 00:00:00) 

The data, however, is zero-extended on input and output to YEAR TO SECOND.

Tip:
Instead of casting, you could insert data with hours, minutes, and seconds set to 0 (or any value). The hours, minutes, and seconds would be truncated to conform to the GL_DATETIME setting of YEAR TO DAY.

In the following example, the INSERT statement returns an error message because the cast is to YEAR TO DAY, while YEAR TO SECOND data is inserted:

-- GL_DATETIME="%Y-%m-%d %H:%M:%S"
INSERT INTO trtab VALUES (GeoTimeRange('1997-01-02 03:04:05'::datetime year to day));
SELECT * FROM trtab;
 1264: Extra characters at the end of a datetime or interval.


http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.geod.doc/geod55.htm

728x90
728x90

SNAPSHOT_STATEMENT 테이블 함수

구문 도표 읽기시각적 구문 도표 생략>>-SNAPSHOT_STATEMENT--(--dbname--,--dbpartitionnum--)---------><

스키마는 SYSPROC입니다.

SNAPSHOT_STATEMENT 함수는 응용프로그램 스냅샷에서 명령문에 대한 정보를 리턴합니다.

dbname
4유형 VARCHAR(255)의 입력 인수는 함수 호출시 현재 연결된 4데이터베이스와 동일한 인스턴스에 있는 유효한 데이터베이스 이름을 지정합니다. 4LIST DATABASE DIRECTORY 명령어가 리턴한 대로 4"간접" 또는 "홈" 디렉토리 항목 유형을 갖는 데이터베이스 이름을 지정하십시오. 4데이터베이스 인스턴스 아래 있는 모든 데이터베이스에서 스냅샷을 가져오려면 널(NULL) 값을 지정하십시오.
dbpartitionnum
INTEGER의 입력 인수는 유효한 파티션 번호를 지정합니다. 현재 파티션에는 -1을, 다른 모든 파티션에는 -2를 지정하십시오. 널(NULL) 값이 지정된 경우, -1이 내재적으로 설정됩니다.

4두 매개변수가 모두 NULL로 설정된 경우 4대응되는 스냅샷 API 요청 유형에 해당하는 SNAPSHOT_FILEW 스토어드 프로시저가 4파일을 이전에 작성하지 않은 경우에만 스냅샷을 가져올 수 있습니다.

함수는 아래에 표시된 대로 테이블을 리턴합니다.

표 16. SNAPSHOT_STATEMENT 테이블 함수에서 리턴된 테이블의 컬럼 이름 및 데이터 유형
컬럼 이름데이터 유형
SNAPSHOT_TIMESTAMPTIMESTAMP
AGENT_IDBIGINT
ROWS_READBIGINT
ROWS_WRITTENBIGINT
NUM_AGENTSBIGINT
AGENTS_TOPBIGINT
STMT_TYPEBIGINT
STMT_OPERATIONBIGINT
SECTION_NUMBERBIGINT
QUERY_COST_ESTIMATEBIGINT
QUERY_CARD_ESTIMATEBIGINT
DEGREE_PARALLELISMBIGINT
STMT_SORTSBIGINT
TOTAL_SORT_TIMEBIGINT
SORT_OVERFLOWSBIGINT
INT_ROWS_DELETEDBIGINT
INT_ROWS_UPDATEDBIGINT
INT_ROWS_INSERTEDBIGINT
FETCH_COUNTBIGINT
STMT_STARTTIMESTAMP
STMT_STOPTIMESTAMP
STMT_USR_CPU_TIME_SBIGINT
STMT_USR_CPU_TIME_MSBIGINT
STMT_SYS_CPU_TIME_SBIGINT
STMT_SYS_CPU_TIME_MSBIGINT
STMT_ELAPSED_TIME_SBIGINT
STMT_ELAPSED_TIME_MSBIGINT
BLOCKING_CURSORSMALLINT
STMT_PARTITION_NUMBERSMALLINT
CURSOR_NAMEVARCHAR(128)
CREATORVARCHAR(128)
PACKAGE_NAMEVARCHAR(128)
STMT_TEXTCLOB(16M)1
1 STMT_TEXT는 장래 확장 전용으로 허용되는 CLOB(16M)으로 정의됩니다. 실제 명령문 텍스트 출력은 64K에서 절단됩니다.


모니터링 방법:

1. Database Manager 변수 DFT_MON_STMT가 on으로 설정되어 있는지 확인한다.

2. SNAPSHOT_STATEMENT 함수로 SQL을 확인한다.

db2 "select substr(stmt_text,1,50) from table(snapshot_statement('sample',-1)) as statement"

728x90
728x90

Question

What do you need to know to set up multi-byte or different locale databases in IBM Informix Servers?

Cause

You currently have a typical en_us (US English) database, which is a normal, default style database with no extra intervention needed for the setup. You want to expand your company database into another country and use a multi-byte character set, or a different locale for the database. What is needed for the setup?

Answer

There are several issues to consider when setting up a database with a locale which is non-US. Here is an overview of the considerations, which are discussed below:

  1. An understanding of code-sets and their impact on a database.
  2. An understanding of default vs nondefault locale code-sets.
  3. Unicode vs language code-set usage

Code-sets and their impact

An ASCII code-set is based on 128 printable characters that occupy 7 bits of a single byte representation. Some characters encoded in other languages can not be represented by a single byte value. one example of a multibyte code-set is the Japanese code set known as Kanji. The technical name is SJIS (ja_jp.sjis). It is a multibyte code-set, with characters that are encoded in 2 or 3 bytes. Some code-sets can have up to 4 bytes to represent a printable character. There are several issues to consider in using any code-set:


Default vs nondefault Code-sets

A default code-set is relative to the language base in which is is used. Some languages have the same letter characters as English, but they also have character variations. The character variations cause the result that some code-sets are nondefault.. Some considerations for default and nondefault code-sets:


Code-set installation and setupIBM Informix GLS User's Guide, available here:http://publib.boulder.ibm.com/infocenter/idshelp/v111/index.jsp?topic=/com.ibm.glsug.doc/glsug02.htm
See also:
Esql/c Programmers Guide, available here:
http://publib.boulder.ibm.com/infocenter/idshelp/v117/index.jsp?topic=/com.ibm.esqlc.doc/esqlc.htm


http://www-01.ibm.com/support/docview.wss?uid=swg21449292&myns=swgimgmt&mynp=OCSSGU8G&mync=E

728x90
728x90

TABLE1에는 다음 네 개의 컬럼이 있다고 가정합니다.

  • C1 VARCHAR(30)
  • C2 INT GENERATED BY DEFAULT AS IDENTITY
  • C3 DECIMAL(7,2)
  • C4 CHAR(1)

TABLE2는 TABLE1과 같습니다. 다만, C2는 GENERATED ALWAYS 식별 컬럼입니다.

DATAFILE1에서 데이터 레코드(DEL 형식):

   "Liszt"
   "Hummel",,187.43, H
   "Grieg",100, 66.34, G
   "Satie",101, 818.23, I 

DATAFILE2에서 데이터 레코드(DEL 형식):

   "Liszt", 74.49, A
   "Hummel", 0.01, H
   "Grieg", 66.34, G
   "Satie", 818.23, I 
주:
  1. 다음과 같은 명령은 1과 2행에 대해 식별 값을 생성합니다. 이유는 식별 값이 DATAFILE1에서 이들 행에 제공되지 않았기 때문입니다. 하지만 3과 4행에는 사용자가 제공한 식별 값 100과 101이 각각 지정됩니다.
       db2 load from datafile1.del of del replace into table1 
  2. DATAFILE1을 TABLE1로 로드하여 식별 값이 모든 행에 대해 생성되게 하려면, 다음 명령 중 하나를 발행하십시오.
       db2 load from datafile1.del of del method P(1, 3, 4)
          replace into table1 (c1, c3, c4)
       db2load from datafile1.del of del modified by identityignore
          replace into table1 
  3. DATAFILE2를 TABLE1로 로드하여 식별 값이 각각의 행에 대해 생성되게 하려면, 다음 명령 중 하나를 발행하십시오.
       db2 load from datafile2.del of del replace into table1 (c1, c3, c4)
       db2 load from datafile2.del of del modified by identitymissing
          replace into table1 
  4. DATAFILE1을 TABLE2로 로드하여 100과 101의 식별 값이 3과 4행으로 할당되게 하려면, 다음 명령 중 하나를 입력하십시오.
       db2 load from datafile1.del of del modified by identityoverride
          replace into table2 
    이 경우, 1과 2행은 거부됩니다. 그 이유는 유틸리티가 사용자 제공 값을 위해 시스템이 생성한 식별 값을 대체하도록 지시했기 때문입니다. 만약 사용자 제공 값이 제시되지 않으면 식별 컬럼이 NULL이 아니기 때문에 행은 거부되어야 합니다.
  5. 식별 관련 파일 유형 수정자를 사용하지 않고 DATAFILE1이 TABLE2로 로드되면, 3과 4행은 자체의 NULL이 아닌 값을 제공하고 식별 컬럼이 GENERATED ALWAYS이기 때문에, 1과 2행은 로드되지만 3과 4행은 거부됩니다.

728x90

+ Recent posts