728x90

Error description

  • when there are applications in rollback or commit state, db2 get
    snapshot for locks on <db2_name> may receive sql1042c error.
    E.g.
    $ db2 get snapshot for locks on sample
    SQL1042C  An unexpected system error occurred.  SQLSTATE=58004
    Some other utility which relies on the service of monitor
    component could also be affected, e.g db2top. In db2top, using
    'U' option to collect lock information may also cause db2top
    exited with sql1042c error.
    The following records could be found in db2diag.log if turning
    on the database manager configuration parameter DIAGLEVEL to 4:
    2013-03-12-03.43.12.074851-240 I243248E595           LEVEL: Info
    PID     : 19365                TID : 46913030187328  KTID :
    xxxxxx
    PROC    : db2sysc
    INSTANCE: db2inst1             NODE : 000            DB   :
    SAMPLE
    APPHDL  : 0-21                 APPID:
    *LOCAL.db2inst1.130312073953
    AUTHID  : DB2INST1             HOSTNAME: host123
    EDUID   : 41                   EDUNAME: db2agent (instance)
    FUNCTION: DB2 UDB, database monitor, sqm_snap_appl_locks,
    probe:10
    DATA #1 : <preformatted>
    Snapshot cannot obtain lock information for application with app
    handle 13. Application in commit/rollback.
    The following records could be found in db2 trace:
    | | | | sqm___sqm_write_lock_waits entry [eduid 224497 eduname
    db2agent]
    | | | | sqm___sqm_write_lock_waits exit
    | | | sqm_snap_appl_locks data [probe 10]
    | | | sqm_snap_appl_locks exit [rc = 0x000004D2 = 1234]
    | | sqm___sqm_snap_db_locks exit [rc = 0x000004D2 = 1234]
    | | sqm___sqm_free_dbcb_list entry [eduid 224497 eduname
    db2agent]
    | | sqm___sqm_free_dbcb_list exit
    | sqm___sqlmonssagnt exit [rc = 0x000004D2 = 1234]
    | sqlm_buffer_postprocess entry [eduid 224497 eduname db2agent]
    | sqlm_buffer_postprocess data [probe 1]
    | sqlm_buffer_postprocess data [probe 2]
    | sqlm_buffer_postprocess exit
    | sqm___sqlmfree entry [eduid 224497 eduname db2agent]
    | sqm___sqlmfree exit [rc = 0xFFFFFFFF = -1]
      sqm___sqlmonssbackend exit [rc = 0xFFFFFFFF = -1]
    

Local fix

  • using db2pd -locks -db <db_name> to collect lock information
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * when there are applications in rollback or commit state, db2 *
    * get                                                          *
    * snapshot for locks on <db2_name> may receive sql1042c error. *
    *                                                              *
    *                                                              *
    *                                                              *
    * E.g.                                                         *
    *                                                              *
    *                                                              *
    *                                                              *
    * $ db2 get snapshot for locks on sample                       *
    *                                                              *
    * SQL1042C  An unexpected system error occurred.               *
    * SQLSTATE=58004                                               *
    *                                                              *
    *                                                              *
    * Some other utility which relies on the service of monitor    *
    *                                                              *
    * component could also be affected, e.g db2top. In db2top,     *
    * using                                                        *
    * 'U' option to collect lock information may also cause db2top *
    *                                                              *
    * exited with sql1042c error.                                  *
    *                                                              *
    *                                                              *
    *                                                              *
    * The following records could be found in db2 trace:           *
    *                                                              *
    *                                                              *
    *                                                              *
    * | | | | sqm___sqm_write_lock_waits entry [eduid 224497       *
    * eduname                                                      *
    * db2agent]                                                    *
    *                                                              *
    * | | | | sqm___sqm_write_lock_waits exit                      *
    *                                                              *
    * | | | sqm_snap_appl_locks data [probe 10]                    *
    *                                                              *
    * | | | sqm_snap_appl_locks exit [rc = 0x000004D2 = 1234]      *
    *                                                              *
    * | | sqm___sqm_snap_db_locks exit [rc = 0x000004D2 = 1234]    *
    *                                                              *
    * | | sqm___sqm_free_dbcb_list entry [eduid 224497 eduname     *
    *                                                              *
    * db2agent]                                                    *
    *                                                              *
    * | | sqm___sqm_free_dbcb_list exit                            *
    *                                                              *
    * | sqm___sqlmonssagnt exit [rc = 0x000004D2 = 1234]           *
    *                                                              *
    * | sqlm_buffer_postprocess entry [eduid 224497 eduname        *
    * db2agent]                                                    *
    * | sqlm_buffer_postprocess data [probe 1]                     *
    *                                                              *
    * | sqlm_buffer_postprocess data [probe 2]                     *
    *                                                              *
    * | sqlm_buffer_postprocess exit                               *
    *                                                              *
    * | sqm___sqlmfree entry [eduid 224497 eduname db2agent]       *
    *                                                              *
    * | sqm___sqlmfree exit [rc = 0xFFFFFFFF = -1]                 *
    *                                                              *
    * sqm___sqlmonssbackend exit [rc = 0xFFFFFFFF = -1]            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 db2_v97fp6                                    *
    ****************************************************************
    

Problem conclusion

  • The fix will be included in DB2 db2_v97fp6
    

Temporary fix

  • using db2pd -locks -db <db_name> to collect lock information
    


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

728x90
728x90


Problem(Abstract)

Prior to Informix Cluster environments, locks were ignored on an HDR secondary. With updateable secondary servers in 11.50.xC8 and above, the lock request is sent to the Primary. This document will help you identify and track these locks from a primary server back to the secondary server it came from.

Symptom

Lock requests showing up on a primary server that do not map to sessions on the primary.


Resolving the problem

To associate an open transaction on the primary with a session on the SDS node, we first start with 'onstat -k' from the primary, we see some locks that are causing problems:

  Locks
address    wtlist  owner      lklist    type     tblsnum  rowid    key#/bsiz
443139e8   0       4b7d0bf0   0         HDR+S    100002   205         0    
44313b68   0       4b7d99c8   4451cae8  HDR+X    1001c8   100         0
4444c168   0       4b7d24f8   0             S    100002   204         0     
4444c7e8   0       4b7d99c8   4451c868  HDR+S    100002   206         0     
444b43e8   0       4b7d2d50   0         HDR+S    100002   204         0     
4451c668   0       4b7d35a8   0             S    100002   204         0     
4451c868   0       4b7d99c8   0         HDR+X    649      3           0     
4451cae8   0       4b7d99c8   4444c7e8  HDR+IX   1001c8   0           0    
 8 active, 20000 total, 16384 hash buckets, 0 lock table overflows

The owner '4b7d99c8' has been identified as a lock on a table we need access to, or maybe while running an onstat –x, you see a open transaction that looks older than it should:

$ onstat –x
Transactions
                                                                     est.   
address  flags userthread locks begin_logpos   current logpos  isol  rb_time
4b811af0 A-B-- 4b7d99c8   4     2500:0x1014018 2578:0x1014080 
... 

To find the session, on the primary, use the owner from ‘onstat -k’ and run:

$ onstat -g ath|grep 4b7d99c8
 tid     tcb      rstcb    prty status                vp-class       name
 1770    4d0e9568 4b7d99c8 1    sleeping secs: 1       5cpu         proxyTh

...make note of the 'tid' value, then run:

$ onstat -g proxy all
IBM Informix Dynamic Server Version 11.50.F       -- on-Line
Secondary  Proxy      Reference Transaction  Hot Row   
Node       ID         Count     Count        Total     
sds2       1609       0         1            0         

TID      Flags      Proxy  Source   Proxy    Current  sqlerrno iserrno 
                    ID     SessID   TxnID    Seq                       
1770     0x00008224 1609   22       3        2        0        0       

...here we see the Proxy ID of 1609, and the Source SessID of 3, and the ProxyTxnID of 2.

On the SDS node, using the ‘Source SessId’ from the ‘onstat –g proxy all’ output, run the following:

$ onstat -g sql 22
IBM Informix Dynamic Server Version 11.50.F       -- Updatable (SDS) -- Up 06:08:18 – 443096 Kbytes

Sess       SQL          Current     Iso Lock       SQL  ISAM F.E.
Id         Stmt type    Database    Lvl Mode       ERR  ERR  Vers Explain
22         -            pwhite      DR  Not Wait   0    0    9.24  Off

Last parsed SQL statement :
  insert into tab1 values(0,"Howdy") { commit work; }

You can also find similar information using the ‘ProxyID’ and the ‘ProxyTxnID’ from the ‘onstat –g proxy all’ output from the primary:

$ onstat -g proxy 1609 3

IBM Informix Dynamic Server Version 11.50.F       -- Updatable (SDS) -- Up 06:07:33 -- 443096 Kbytes
Sequence Operation rowid    Table                          sqlerrno
Number   Type               Name                                   
1        *Insert   0        pwhite:informix.tab1           0  

Conclusion:
Using this method, you can track down user 'pwhite' and find out why he is still causing Informix problems?



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

728x90
728x90

Problem(Abstract)

A java program getting "OutOfMemory" when handling blobs. Informix JDBC Driver uses the java File.deleteOnExit when handling blobs which causes the OutOfMemory problem in the JVM heap.

Resolving the problem

PROBLEM

A java application that uses Informix JDBC Driver to deal with BLOBs runs out of memory. Informix JDBC Driver uses the java File.deleteOnExit which causes the OutOfMemory problem in the JVM heap.

Example of error java.lang.OutOfMemoryError

The heap will have a lot of blocks that contain file names that have names like ifxb_123456 or ifxb_123456890. The shorter file names in JDBC drivers upwards from 2.21.JC6 and 3.00.JC1 and the longer filenames in earlier versions. 


CAUSE

Reason for this is a known bug regarding File.deleteOnExit() calls:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4813777
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4513817


SOLUTION

To workaround this set the environment variable LOBCACHE to -1.


EXTERNAL REFERENCES

To read more about the environment variable LOBCACHE see the manual "IBM Informix JDBC Driver Programmer’s Guide".

http://www-306.ibm.com/software/data/informix/pubs/library/


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

728x90
728x90


Question

This document describes how to determine if a table has been manually taken out of check pending state.

Answer

To determine if a table has been taken out of check pending (by the SET INTEGRITY ... IMMEDIATE UNCHECKED command), you can use the following SELECT query to see what options were used to perform the SET INTEGRITY command: 

select tabschema as Schema, tabname as Name, status as State, substr(const_checked,1,1) as Foreign_Keys, substr(const_checked,2,1) as Check_Constraints, substr(const_checked,5,1) as Summary_Tables from syscat.tables where tabname = '<tablename>' and tabschema = '<schema>'


...where <tablename> is the table and <schema> is the table schema.

For example, if <schema> = db2inst1 and <tablename> = employee, then an example of the result of the query is as follows:


SCHEMA NAME STATE FOREIGN_KEYS CHECK_CONSTRAINTS SUMMARY_TABLES
-------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ----- ------------ ----------------- --------------
DB2INST1 EMPLOYEE N U Y Y 

1 record(s) selected.

The FOREIGN_KEYS column shows the status of the check constraint for table DB2INST1.EMPLOYEE and is shown to have a value of 'U' -- indicating it was checked by the user using the SET INTEGRITY ... IMMEDIATE UNCHECKED command.


728x90
728x90

Question

This technote provides troubleshooting information for the situation where your table data is corrupted and you do not have a recent good backup to restore your data. It describes a method for dumping the table data.

Answer

You can dump table data by using the ddel option of the db2dart command. The database needs to be offline to run the db2dart command.

This example extracts data from the EMPLOYEE table residing in the default USERSPACE1 tablespace with id 2 in the SAMPLE database in a DB2 V9.7 environment.

$db2dart sample /DDEL 

Table object data formatting start.
Please enter
Table ID or name, tablespace ID, first page, num of pages:
EMPLOYEE,2,0,5

14 of 14 columns in the table will be dumped.
Column numbers and datatypes of the columns dumped:
0 CHAR() -FIXED LENGTH CHARACTER STRING
1 VARCHAR() -VARIABLE LENGTH CHARACTER STRING
2 CHAR() -FIXED LENGTH CHARACTER STRING
3 VARCHAR() -VARIABLE LENGTH CHARACTER STRING
4 CHAR() -FIXED LENGTH CHARACTER STRING
5 CHAR() -FIXED LENGTH CHARACTER STRING
6 DATE
7 CHAR() -FIXED LENGTH CHARACTER STRING
8 SMALLINT
9 CHAR() -FIXED LENGTH CHARACTER STRING
10 DATE
11 DECIMAL
12 DECIMAL
13 DECIMAL
Default filename for output data file is TS2T6.DEL,
do you wish to change filename used? y/n
n

Filename used for output data file is TS2T6.DEL. If existing file, data will be appended to it.

Formatted data being dumped ...
Dumping Page 0 ....
Table object data formatting end.

The requested DB2DART processing has completed successfully!
Complete DB2DART report found in:
/home/v97fp2/sqllib/db2dump/DART0000/SAMPLE.RPT


Note: Above example dumps 5 pages of data from the table Employee. If you are not sure of the number of pages, use a large number such as 99999 so that all the pages of the table will get dumped.


Sample contents in the output file (called TS2T6.DEL in this example) found in the location /home/v97fp2/sqllib/db2dump/DART0000 are as follows:

$cat TS2T6.DEL 

"000010","CHRISTINE","I","HAAS","A00","3978",19950101,"PRES ",18,"F",19630824,+0152750.00,+0001000.00,+0004220.00
.....

"200340","ROY","R","ALONZO","E21","5698",19970705,"FIELDREP",16,"M",19560517,+0031840.00,+0000500.00,+0001907.00



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

728x90
728x90

서버: Oracle SPARC T5-2

CPU: 2장 (각 16 코어, 128 가상프로세서, 총 32코어, 256 가상프로세서) 

OS: Oracle Solaris 10 Update 9

RAM: 256GB

DBMS: IBM Informix 12.10.FC2 Workgroup Edition


작년에 Fernando Nunes씨가 포스팅한 글에서의 환경은 HP-UX Itanium이긴 하였으나 결과적으로 원인은 같은 것으로 보인다.


# ./ids_install

Preparing to install...

Extracting the JRE from the installer archive...

Unpacking the JRE...

Extracting the installation resources from the installer archive...

Configuring the installer for this system's environment...


Launching installer...


./ids_install: /tmp/install.dir.13028/Solaris/resource/jre/jre/bin/java: 실행할수 없음



GNU tar를 쓰면 해결된다는 글이 다수 있어 시도해보았다.

솔라리스에 다행히 gtar가 설치되어 있었다.


# mv /usr/sbin/tar /usr/sbin/tar_old

# mv /usr/sfw/bin/gtar /usr/sfw/bin/tar


GNU tar를 사용해서 해결은 되었으나 결국에는 제품 설치 패키지내의 파일이름이 길거나 공백이 있지 않나 싶다. 



설치하면서 인스턴스를 생성하는 옵션을 지정할 때에는 다른 오류가 있었다.

===============================================================================

Server Instance Creation

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


Create a server instance?


  ->1- Yes - create an instance

    2- No - do not create an instance


ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::


인스턴스를 생성하도록 선택한 다음 진행하면 아래와 같이 설치 중 오류가 발생한다.


===============================================================================

Installing...

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


 [==================|==================|==================|==================]

 [------------------|------------------|------------------|------------------]

#

# A fatal error has been detected by the Java Runtime Environment:

#

#  SIGSEGV (0xb) at pc=0xffffffff7e94ddfc, pid=13656, tid=2

#

# JRE version: 6.0_17-b04

# Java VM: Java HotSpot(TM) 64-Bit Server VM (14.3-b01 mixed mode solaris-sparc )

# Problematic frame:

# C  [libc.so.1+0x4ddfc]

#

# An error report file with more information is saved as:

# /tmp/install.dir.13656/hs_err_pid13656.log

#

# If you would like to submit a bug report, please visit:

#   http://java.sun.com/webapps/bugreport/crash.jsp

# The crash happened outside the Java Virtual Machine in native code.

# See problematic frame for where to report the bug.

#


인스턴스 생성하는 옵션에서 No를 선택하면 오류없이 설치된다.

에러 로그 파일을 열어보면 자바 스택이 보이는데 자바 버전, 서버 환경 등의 원인등으로 추측할 수 밖에.



http://informix-technology.blogspot.kr/2013/04/1210-install-issue-on-hp-ux-problema-na.html

http://community.flexerasoftware.com/archive/index.php?t-188987.html

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


728x90
728x90

Question

What are the chunk limitations in Informix Dynamic Server (IDS) and Extended Parallel Server (XPS)?

Answer

The IBM Informix® database servers have different limitations on the number of chunks and the maximum chunk size.

The following table shows the maximum number of chunks and the maximum chunk size that the IBM Informix onLine (OnLine), IBM Informix Dynamic Server (IDS), and IBM Informix Extended Parallel Server (XPS) database servers can create.

Version
Number of chunks
Maximum Chunk Size
OnLine 5.x 
with 2KB pages
Varies from 12 
to about 50 
(see below)
2GB
OnLine 5.x 
with 4KB pages
Varies from 26 
to about 100 
(see below)
2GB
XPS 8.1x and 8.2x
32767
2GB
XPS 8.3, 8.4, and 8.5x
32767
1 TB
IDS 7.x
2047
2GB
IDS 9.1, 9.2, and 9.3
2047
2GB
IDS 9.4/IDS 10.0
32766
2 Billion Pages


Number of chunks in onLine 5.x 

In onLine 5.x a data page is used to store information about the chunks. 28 bytes of the page are used for various structures. Out of the memory left, each chunk uses up 28 bytes plus one byte for every character in the complete path name of the chunk. So the shorter the full path names of your chunks are the more chunks you can have. 

The ranges in the table above are based on the maximum allowed path name of 128 characters and a realistic minimum path name length of 12 characters. 


Units used in this document 

This document uses the base-two definitions for memory units as follows: 

    KB = kilobyte = 1024 bytes = 2 10  bytes 
    MB = megabyte = 1024 KB = 2 20  bytes 
    GB = gigabyte = 1024 MB = 2 30  bytes 
    TB = terabyte = 1024 GB = 2 40  bytes


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


728x90
728x90


Problem(Abstract)

When migrating from an older server that supports only the ISO-8859-1 locale to a newer server that uses UTF-8 locale to configure a database, the new database might not accept all characters without first using a conversion process.

Symptom

When attempting to load data from a database created with ISO-8859-1 locale into a database using UTF-8 locale, reject files are created for rows containing unrecognizable characters even though CLIENT_LOCALE, DB_LOCALE and SERVER_LOCALE have all been set accordingly.


Cause

It is possible that setting CLIENT_LOCALE, DB_LOCALE and SERVER_LOCALE will still leave some characters unrecognizable to a database created with the UTF-8 locale.

Resolving the problem

Most of the time 8859-1 will load into a UTF-8 database without error, however if you have already attempted to load the data and failed, complete the following steps:

First, set the environment variables CLIENT_LOCALE, DB_LOCALE and SERVER_LOCALE so they have the appropriate settings. After migrating the old data onto the UTF-8 server, use a conversion process such as the iconv API to ensure all data will be accepted into the new database.

For example, once you have migrated the data file, you could run the command:

iconv -f ISO-8859-1 -t UTF-8 {filename} > {pipe, file}

Once the file has been converted, you can direct it to a new file or a pipe before loading it into the destination table.


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

728x90
728x90

Problem(Abstract)

An 'SQL0433N Value "XXXX" is too long' error is returned when the TIMESTAMDIFF scalar function is run against a database with Oracle compatibility.

Symptom

SQL0433N Value "XXXX" is too long. SQLSTATE=22001

Cause

Subtraction of timestamp values returns DECFLOAT(34), representing the difference as a number of days. As a result, you can not use the TIMESTAMPDIFF scalar function because it depends on the default behavior of timestamp subtraction. Similarly, subtraction of date values returns DECFLOAT(34), which also represents a number of days, because date values are really TIMESTAMP(0). For more details on the functions that are changed under date_compat mode, please go through the 'DATE data type based on TIMESTAMP(0)' in the Related URL below.


Environment

Environments where databases are created with Oracle compatibility mode enabled.

Diagnosing the problem

The following test case can help you determine if you are encountering the problem:

  1. Set the DB2_COMPATIBILITY_VECTOR registry variable as below to enable all of the supported Oracle compatibility features:

    db2set DB2_COMPATIBILITY_VECTOR=ORA
    db2stop
    db2start
     
  2. Created the oratest database for testing purpose: 

    db2 create db oratest
    DB20000I  The CREATE DATABASE command completed successfully. 

  3. Running the TIMESTAMPDIFF scalar function will return SQL0433N error as below:

    db2 "values(TIMESTAMPDIFF(4,CHAR(TIMESTAMP('2001-09-29-11.25.42.483219')-TIMESTAMP('2001-09-26-12.07.58.065497'))))"

    1
    -----------
    SQL0433N  Value "2.970652982893518518518518518518519" is too long. SQLSTATE=22001

Resolving the problem

This is a restriction on the Oracle compatibility mode. A comparison of the tradeoffs needs to be done to determine if Oracle compatibility mode is more necessary than the use of these functions. one of the solutions below can be used as a work around when the database has been created with Oracle compatibility mode enabled:



o  Reducing the length of the timestamp

    db2 "values(TIMESTAMPDIFF(4,CHAR(TIMESTAMP('2010-04-01-09.43.05')-TIMESTAMP('2010-05-01-09.43.05'))))"
      1
      -----------
       
                0
        1 record(s) selected.


o  Multiply the DECFLOAT result to get the units you are interested in.  
    db2 "values ( TIMESTAMP('2001-09-29-11.25.42.483219')-TIMESTAMP('2001-09-26-12.07.58.065497') ) /* days */ * 24 /* hours per day */ * 60 /* minutes per hour */"
      1                                         
      ------------------------------------------
             4277.740295366666666666666666666668

        1 record(s) selected.


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

728x90
728x90


Problem(Abstract)

To turn on or off the SQL Explain in the IDS engine while SQL is running, use the onmode -Y command.

The syntax:

onmode -Y <session id> 2
onmode -Y <session id> 1
onmode -Y <session id> 0

The option with 2 turns SET EXPLAIN on for sessionid and displays the query plan only
The option with 1 turns SET EXPLAIN on for sessionid
The option with 0 turns SET EXPLAIN off for sessionid


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

728x90

+ Recent posts