728x90

Problem(Abstract)


-244 Could not do a physical-order read to fetch next row.
-197 ISAM error: Partition recently appended to; can't open for
write or logging.

Symptom

-244 Could not do a physical-order read to fetch next row.
-197 ISAM error: Partition recently appended to; can't open for
write or logging.



Cause

A High Performance Loader express mode load was run on this table.


Resolving the problem

You must perform a level-0 backup before you can write to the target database. See the Related Information section below for more information regarding express mode load.



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

728x90
728x90

OS: CentOS 6.6

DBMS: IBM DB2 9.1.0.5


위의 환경에서 데이터베이스를 생성하고 JDBC 클라이언트 및 로컬에서 특정 사용자로 접속시도하면 오류가 발생했습니다.

지원되지 않는 패스워드 알고리즘으로 패스워드를 생성한 것이 원인이었습니다.


db2 커맨드로 접속시 발생한 오류

$ db2 connect to dbname user ??? using ???

SQL30082N  Security processing failed with reason "15" ("PROCESSING FAILURE").

SQLSTATE=08001


자바(jdbc)를 통한 연결 오류

com.ibm.db2.jcc.am.SqlInvalidAuthorizationSpecException: [jcc][t4][2010][11246][4.16.53] Connection authorization failure occurred.  Reason: Local security service non-retryable error. ERRORCODE=-4214, SQLSTATE=28000


아래와 같이 authconfig를 사용하여 현재 설정된 패스워드 알고리즘 방식을 확인합니다.

CentOS 6.6에서는 기본이 sha512 알고리즘을 사용하는 모양입니다.


# authconfig --test | grep password

 shadow passwords are enabled

 password hashing algorithm is sha512 


아래와 같이 authconfig를 사용하여 현재 설정된 패스워드 알고리즘 방식을 확인합니다.

CentOS 6.6에서는 기본으로 sha512 알고리즘을 사용하는 모양입니다. DB2 9.1에서는 Crypt, MD5. SHA1 알고리즘만 지원한다고 합니다.

따라서 아래와 같이 설정하고 DB2 사용자 패스워드 재설정한 후에는 접속이 잘 이루어졌습니다.


# authconfig --passalgo=md5 --update


아래는 해당 내용에 대한 IBM문서입니다. 참고하시기 바랍니다.


SQL30082 RC=24 or RC=15 returned when connecting to database on Server when pwd_algorithm is Crypt, MD5, SHA1, SHA256, SHA512, Blowfish

Problem(Abstract)

A local or remote connection to a database using:

db2 connect to sample user <userid> using <password>

returns

SQL30082N Security processing failed with reason "24" ("USERNAME AND/OR 
PASSWORD INVALID"). SQLSTATE=08001 

The error in db2diag.log is 
2011-01-01-17.21.43.367890-300 I1011620A272 LEVEL: Warning 
PID : 123456 TID : 1 
FUNCTION: DB2 Common, Security, Users and Groups, secLogMessage, probe:
20 
DATA #1 : String, 66 bytes 
Password validation for user db2inst1 failed with rc = -2146500507 

OR 

SQL30082N Security processing failed with Reason Code 15
"Security processing at the server failed " 

2011-10-19-14.05.06.682505-300 I2778202A437 LEVEL: Warning 
PID : 10813678 TID : 6958 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : CMDB 
APPHDL : 0-117 
EDUID : 6958 EDUNAME: db2agent (CMDB) 0 
FUNCTION: DB2 UDB, bsu security, sqlexLogPluginMessage, probe:20 
DATA #1 : String with size, 67 bytes 
Password validation for user testuser failed with rc = -2029059891

Symptom

No connections can be made to the database when userid and password are provided. These connections fail with SQL30082N with Reason "24" or "15" returned.


Cause

DB2 Version 9.1 and Version 9.5 up to Fixpack 3 support the following encryption algorithms.

Crypt 
MD5 
SHA1

From DB2 Version 9.5 Fixpak 4 and versions beyond, the following algorithms are supported:

Crypt 
MD5 
SHA1 
SHA256 
SHA512 
Blowfish

For example, on AIX this is coded in the /etc/security/login.cfg file.

The error is received if you use the unsupported encryption algorithm and may show up in the db2diag log like this: 

2011-10-19-14.05.06.682321-300 I2777674A527 LEVEL: Severe
PID : 9633910 TID : 258 PROC : db2ckpwd 0
INSTANCE: db2inst1 NODE : 000
EDUID : 258 EDUNAME: db2sysc 0
FUNCTION: DB2 UDB, oper system services, sqloGetUserAttribByName, probe:50
MESSAGE : Unsupported password encryption algorithm in use! Configure the 
Operating System to use a supported algorithm.
DATA #1 : Hexdump, 4 bytes
0x07000000003F7F00 : 870F 00CD .... 

To check what encryption algorithm is being used the login.cfg file will contain something like:

usw:
shells = /bin/sh,/bin/bsh,/bin/csh,/bin/ksh,/bin/tsh,/bin/ksh93,/usr/bin
/sh,/usr/bin/bsh,/usr/bin/csh,/usr/bin/ksh,/usr/bin/tsh,/usr/bin/ksh93,/usr/sbin
/sliplogin,/usr/sbin/uucp/uucico,/usr/sbin/snappd,/bin/false
maxlogins = 32767
logintimeout = 60
pwd_algorithm = sha256
auth_type = STD_AUTH

OR the passwd.txt file will show something like this: 

root:
password = {sha256}06$SBysqAi4UQQ1nxC3$L55aKwmscvwxnKskkVrMk0HddbJyNkoE
v6HNXoLO.kH


Environment

ALL

Resolving the problem

Please use one of the supported encryption algorithms based on the version of DB2 that is being used.



http://m.blog.naver.com/june0313/50163164703

https://www-304.ibm.com/support/docview.wss?uid=swg21470246

https://www-304.ibm.com/support/docview.wss?uid=swg21416382

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


728x90
728x90

onbar physical restore (onbar -r -p) 또는 onbar logical restore중 out of virtual shared memory 오류가 발생하는 경우가 있습니다.

여러 원인이 있겠습니다만 저의 경우는 Virtual segment 크기를 큰 값으로 재설정한 후 재시작했었습니다.

그러나 다시 생각해보면 oninit 프로세스를 재시작(oninit -r)해서 된것이지 Virtual segment 크기가 때문이 아닐 수도 있겠네요.


SunOS 5.10, 인포믹스 11.50, Netvault 백업 솔루션 환경이었고

커널파라미터까지는 확인하지 못했는데, 커널 파라미터 값이 문제가 될가능성이 높습니다.


ENOSPC error while allocating shared memory

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


Running oninit but error shmget: [EEXIST][17]: key 52604801: shared memory already exists

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

728x90
728x90

Question

This document explains what a tblspace-tblspace (also referred as tablespace-tablespace and partition-partition) is and how it relates to other tables in an instance.

Answer

What is TBLspace TBLspace?

You are running IBM® Informix® Dynamic Server (IDS) database server and create a regular Dbspace. This Dbspace contains an internal table called TBLspace TBLspace. You cannot access the table using SQL commands.

What it does?

The TBLspace TBLspace table tracks all the partitions (tables or indexes) that you create in a Dbspace, including itself. You can track every table, detached index, or table fragment in the TBLspace TBLspace table through a partition page. The first partition page contains information about the TBLspace TBLspace table itself and the following partition pages track other tables. The partition page contains important information about a table and you can see part the data using theoncheck -pt command (oncheck  -pt database:table):


    oncheck   -pt database : table 

      database
        name of the database 
      table
        name of the table 

When you create a TBLspace TBLspace table, it has an initial extent of 50 pages on version 7.x and 250 pages on 9.x. In addition, when the first extent gets full, a new extent is allocated in one of the chunks of the Dbspace. This may cause a problem because if you create a new extent of the TBLspace TBLspace table on a chunk that needs to be dropped the server will report an error saying that the chunk is not empty. This will happen even if there is no user data in it. 
Even though the TBLspace TBLspace is not accessible through SQL you can still see the extents that are allocated in the chunks of the Dbspace using theoncheck -pe command. 

    Example: 

    The following is a partial output of an  oncheck -pe run on an IDS 7.x system. It is the first extent (50 pages) of the TBLspace TBLspace in chunk 2:

      DBspace Usage Report: dbs1        Ownner: informix  Created: 10/11/2003 

      Chunk: 2 /informix/dbs1_chunk1 Size Used  Free 
                                      5000   53  4947 

      Disk usage for Chunk 2      Start  Length 

      ------------------------------------------- 
       OTHER RESERVED Pages         0      2 
       CHUNK FREE LIST PAGE         2      1 
        TBLSPACE TBLSPACE             3      50 
       FREE                        53     4947 

      Chunk: 3 /informix/dbs1_chunk2 Size Used Free 
                                      5000   3  4997 
      Disk usage for Chunk 3        Start   Length 
      -------------------------------------------- 
         OTHER RESERVED Pages         0      2 
         CHUNK FREE LIST PAGE         2      1 
         FREE  


728x90
728x90

Since IDS Version 10.00 dbspaces can be created with other than the default 2k/4k pagesize.


This feature has multiple benefits:

less disk I/O with larger pagesizes (8k ... 16k)

more rows per data/index page (max. 255 Rows / data page)

higher upper limit of rows per table (max. 16777216 pages / table fragment)

higher upper limit of table/index extents

reduce "-136 ISAM error: no more extents." Errors



Example (stores_demo database):

 


IDS 7.31, 9.40, 10.00, 11.50 / 2k dbspace pagesize:

database_name   stores_demo


tabname         customer

dbspace_name    root_dbs

extents_act     140

max_extents     232

 




IDS 10.00, 11.50 / 16k dbspace pagesize:

database_name   stores_demo

tabname         customer

dbspace_name    dat_dbs16k_001

extents_act     351

max_extents     2023

 

 


You can use the following select to show the upper limit of table/index extent sizes:


 

SELECT --+ORDERED,INDEX(a,systabs_pnix),INDEX(b,sysptnhdridx),INDEX(c,syspaghdridx),INDEX(d,sysdbstab_dbsnum)

       a.dbsname AS database_name,

       a.tabname,

       d.name AS dbspace_name,

       b.nextns AS extents_act,

       TRUNC(c.pg_frcnt / 8) + b.nextns AS max_extents

 FROM sysmaster:sysdbstab d,

      sysmaster:syspaghdr c,

      sysmaster:systabnames a,

      sysmaster:sysptnhdr b

  WHERE c.pg_partnum = sysmaster:partaddr(d.dbsnum, 1)

    AND sysmaster:bitval(c.pg_flags, 2) = 1

    AND c.pg_nslots = 5

    AND a.partnum = sysmaster:partaddr(d.dbsnum, c.pg_pagenum)

    AND a.partnum = b.partnum;



https://www.ibm.com/developerworks/community/blogs/informix_admins_blog/entry/ids_pagesize_and_maximum_number_of_extents5?lang=en

http://www-304.ibm.com/support/knowledgecenter/api/content/nl/ko/SSGU8G_11.50.0/com.ibm.perf.doc/ids_prf_311.htm

http://www-304.ibm.com/support/knowledgecenter/api/content/nl/ko/SSGU8G_11.50.0/com.ibm.perf.doc/ids_prf_316.htm

728x90
728x90

Problem(Abstract)

You observe messages in your online.log file referencing alarmprogram.sh and with return code 126 or 127. What do they mean?

Symptom

Messages printed to your Informix Server online.log file reference alarmprogram.sh and a return code of 126 or 127. Examples:

06:45:09 Process exited with return code 126: /bin/sh /bin/sh -c /IDS/1170uc7/etc/alarmprogram.sh 2 23 "Logical Log 12 Complete, timestamp: 0xd3d56." "Logical Log 12 Complete, timestamp: 0xd3d56." "" 23001

20:01:55 Process exited with return code 127: /bin/sh /bin/sh -c /usr/informix/etc/alarmprogram.sh 2 18 "Log Backup completed: 9." "Logical Log 9 - Backup Completed" "" 18001

Cause

The return codes are bourne and korn shell return codes. Their meanings:

  • 126....not an executable 
  • 127....command not found

The Informix Server attempts to execute the script pointed to by the ALARMPROGRAM configuration program, using the korn shell, when events occur that are important to the server. If the call fails the server writes a message to the server log file describing the call. The events themselves may be failures or successes. Return code 126 is printed when the server cannot execute the script referenced by ALARMPROGRAM. Return code 127 is printed when the server cannot find the script.


Resolving the problem

Confirm that the alarm script designated by ALARMPROGRAM is correctly referenced by the configured path and confirm that it is executable. By default, alarmprogram.sh uses the korn shell (ksh). If the return code is 126, confirm that the korn shell is installed and located in /bin (/bin/ksh).


Note: If the korn shell is not installed, and the default shell is bash, you may want to change "#! /bin/ksh" at the top of alarmprogram.sh to "#! /bin/bash" as an alternative to installing the korn shell.


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


728x90
728x90

SQL0727N 오류는 여러가지 원인으로 발생하는데 그중 하나의 예를 소개합니다.


1. 현상 : 테이블에 데이터 입력하는 프로시저 호출 불가

2. 원인 : 해당 테이블(또는 뷰에서 바라보는 테이블)의 트리거 inoperative 상태


테이블의 트리거가 inoperative 상태로 빠지면, 해당 테이블에 대해서 DML(INSERT, DELETE, UPDATE) 이 작동하지 않게됩니다.

아래와 같이 syscat.systrigger 테이블의 VALID 컬럼이 Y가 아닌 상태의 트리거가 있는지 확인합니다.


$ db2 "select substr(trigname,1,20) trigname,valid from syscat.triggers where valid <> 'Y'"


TRIGNAME             VALID

-------------------- -----

NEW_HIRED            N


이 상황에서 INSERT (DELETE, UPDATE) 를 실행하면 아래와 같이 오류가 발생합니다.

$ db2 "update employee set lastname='JEONG' where empno=200340"
DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.  During SQL processing it returned:
SQL0727N  An error occurred during implicit system action type "3".
Information returned for the error includes SQLCODE "-204", SQLSTATE "42704"
and message tokens "DB2I105.COMPANY_STAT".  LINE NUMBER=2.  SQLSTATE=56098



참고사항)

이런 상태의 트리거는 CREATE TRIGGER문으로 작성하면 아래와 같이 Warning 메시지가 발생하면서 기존의 TRIGGER가 대체됩니다.


SQL0280W  View, trigger or materialized query table "DB2I105.NEW_HIRED" has

replaced an existing inoperative view, trigger or materialized query table.

SQLSTATE=01595


이에 대해서는 IBM Knowledge Center에도 나와있습니다.

An inoperative trigger may be recreated by issuing a CREATE TRIGGER statement using the definition text of the inoperative trigger. This trigger definition text is stored in the TEXT column of the SYSCAT.TRIGGERS catalog view. Note that there is no need to explicitly drop the inoperative trigger in order to recreate it. Issuing a CREATE TRIGGER statement with the same trigger-name as an inoperative trigger will cause that inoperative trigger to be replaced with a warning (SQLSTATE 01595).
 
Inoperative triggers are indicated by an X in the VALID column of the SYSCAT.TRIGGERS catalog view.

뷰, 트리거 등의 오브젝트 상태도 주기적으로 체크하면 좋을 것 같습니다.


https://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000931.html


728x90
728x90

인포믹스 스케줄러에 기본으로 등록된 TASK로 인해 online.log 파일에서 아래의 메시지가 발생하는 경우가 있습니다.

해당 메시지는 테이블의 압축률을 계산하는 프로시저 admin_fragment_command 의 실행 결과를 표시하는 것입니다.

압축기능 라이센스를 보유하지 않은 고객이라면 의미 없는 작업이므로 비활성화 하는 것이 좋습니다.


아래 작업 후에 인포믹스 프로세스를 재시작해야 합니다.


Question

Why do we see estimate compression message in the online.log as shown below, when we did run any compression command? 

Snippet from the online.log:
--------------------------------------
14:50:28 SCHAPI Estimate Compression for txc07_4q:"ssadmin".ubevent started 
14:50:30 admin_fragment_command('fragment estimate_compression ','69206165') succeeded 
14:50:30 SCHAPI Estimate Compression for txc07_4q:"ssadmin".ubflag started 
14:50:31 admin_fragment_command('fragment estimate_compression ','69206167') succeeded 
14:50:31 SCHAPI Estimate Compression for txc07_4q:"ssadmin".ubkeys started 
14:50:35 admin_fragment_command('fragment estimate_compression ','69206168') succeeded 
-------------------------------------- 

Answer

When you connect to the database via OAT and while browsing through the menu in OAT, you click on "Storage" under "Space Administration" section, it will deploy a task called "mon_compression_estimates" in the scheduler. Whenever the task executes, it generates the message, SCHAPI Estimate Compression, in the online.log.

You can run the following SQL statement to stop the task from being executed, hence stop the message from being displayed in the online.log.

UPDATE sysadmin:ph_task 
SET tk_enable = "F" 
WHERE tk_name = "mon_compression_estimates";

You will still need to bounce the informix instance after the update.


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

728x90
728x90
online.log 파일에서 아래의 메시지가 나오는 경우가 있습니다.
Warning: PDQ functionality is not supported in IDS Growth Edition.
이 메시지는 Growth 또는 Workgroup Edition 에서 PDQ 기능을 설정하려 할 때 발생하는 메시지입니다.
Growth 또는 Workgroup 에서는 지원하지 않는 기능이므로 PDQ 기능이 활성화되지 않으며, 
인포믹스 프로세스에 영향은 주지 않지만 관리목적으로 비활성화 할 수 있습니다.

Problem(Abstract)

Customer is getting warning messages when AUS is executed even if PDQPRIORITY is 0 in onconfig

Symptom

online.log messages:

Warning: PDQ functionality is not supported in IDS Growth Edition.

The value of PDQPRIORITY cannot be set to 10. It is reset to 0.  

Cause

the default PDQ priority configured to run AUS is 10%

Environment

IDS 11.50.FC8GE Growth Edition. C is getting warning messages in the online.log after the following tasks are executed.

Auto Update Statistics Evaluation

Auto Update Statistics Refresh  

PDQPRIORITY is set to 0 in the onconfig


Diagnosing the problem

If the following select retunr integer bigger than zero ( 0 ):

select value from ph_threshold where name="AUS_PDQ";

Resolving the problem

Execute the following sentences in dbaccess

database sysadmin;                                  

update ph_threshold set value=0 where name="AUS_PDQ";



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

728x90
728x90

환경

MySQL : 5.0.89, AIX 6.1

Informix : 11.50.FC9, AIX 6.1


MySQL의 BLOB데이터를 Informix로 마이그레이션 해보았습니다.


샘플 테이블 및 데이터 생성 (MySQL)

echo "create table blotest(a int, b blob)" | mysql -u root -p1nfra test

echo "insert into blobtest values (2,load_file('/home/mysql/logo.gif'))" | mysql -u user -ppasswd test


처음에는 mysqldump의 --hex-blob, --tab 옵션으로 데이터를 추출하였으나 구분자가 있는 형태로 추출했을 때 hex형태로 추출되지 않아

아래와 같이 OUTFILE문으로 추출했습니다.

echo "SELECT a,hex(b) INTO OUTFILE '/home/mysql/blobtest.txt'  FIELDS TERMINATED BY '|'      LINES TERMINATED BY '|\n'     FROM blobtest;" | mysql -u user -ppasswd test


위와 같이 MySQL에서 OUTFILE로 데이터를 추출하면 NULL값은 \N으로 추출되기 때문에 이에대한 처리가 필요합니다.

그리고 인포믹스의 구분자 파일에는 레코드 끝에 구분자가 있으므로 LINES TERMINTAED BY를 '|\n' 으로 했습니다.

MySQL에서는 hex값의 알파벳이 대문자로 추출되는 반면 인포믹스는 소문자로 추출되는데, 로드할 때 문제는 없었습니다.



인포믹스에 BLOB 데이터를 입력할 테이블 생성 (Informix)

echo "create table blobtest (a byte)" | dbaccess stores_demo

echo "create table blobtest1 (a blob)" | dbaccess stores_demo


인포믹스에 BLOB 타입에 입력할때는 구분자 파일과 BLOB파일이 별도로 존재하므로 우선 BYTE 타입에 먼저 입력후 BLOB으로 변환하여

다시 입력하는 순서로 진행했습니다.


echo "load from /home/mysql/blobtest.txt insert into blobtest" | dbaccess stores_Demo

echo "insert into blobtest1 select b::blob from blobtest" | dbaccess stores_demo


GUI 툴로 확인한 결과 이미지가 잘 입력되었음을 확인할 수 있었습니다.




How to migrate large blob table from mysql to postgresql?

http://dba.stackexchange.com/questions/4211/how-to-migrate-large-blob-table-from-mysql-to-postgresql


Migrate a database from MySQL to IBM Informix Innovator-C Edition, Part 1: Comparing MySQL to IBM Informix Innovator-C Edition

http://www.ibm.com/developerworks/data/library/techarticle/dm-1102mysqltoinnovatorc/


Migrate a database from MySQL to IBM Informix Innovator-C Edition, Part 2: Step-by-step walk-through of the migration process

http://www.ibm.com/developerworks/data/tutorials/dm-1102mysqltoinnovatorc2/index.html





728x90

+ Recent posts