728x90

Determine the server-processing locale

The database server uses the server-processing locale to obtain locale information for its own internal sessions and for any connections.

When the database server begins execution, it initializes the server-processing locale to the default locale. When a client application requests a connection, the database server must redetermine the server-processing locale to include the client and database locales. The database server uses the server-processing locale to obtain locale information that it needs when it transfers data between the client system and the database.

After the IBM® Informix® database server verifies the database locale, it uses a precedence of environment variables from the client and database locales to set the server-processing locale.

The database server obtains the following information from the server-processing locale:
  • Locale information for the database

    This database information includes the localized order and code set for data in columns with the locale-sensitive data types (NCHAR and NVARCHAR). The database server obtains this information from the name of the database locale that it has verified.

  • Locale information for client-application data

    This client-application information provides the end-user formats for date, time, numeric, and monetary data. The database server obtains this information from the client application when the client requests a connection.

The following figure shows the relationship between the client locale, database locale, server locale, and server-processing locale.
Figure 1. The server-processing locale
begin figure description - This figure is described in the surrounding text. - end figure description
Tip: The database server uses the server locale, as specified by the SERVER_LOCALE environment variable, for read and write operations on its own operating-system files. For information about operating-system files, see GLS support by IBM Informix database servers.


Locale information for the database

The database server must know how to interpret the data in any columns with the locale-specific data types, NCHAR and NVARCHAR.

To handle this locale-specific data correctly, the database server must know the localized order for the collation of the data and the code set of the data. In addition, the database server uses the code set of the database locale as the code set of the server-processing locale.

The database server might have to perform code-set conversion between the code sets of the server-processing locale and the server locale. For more information, see Perform code-set conversion.

The database server uses the following precedence to determine this database information:
  1. The locale that the database server uses to determine the database information for the server-processing locale depends on the state of the database to which the client application requests a connection, as follows:
    1. For a connection to an existing database, the database server uses the database information from the database locale that it obtains when it verifies the database locale. If the client application does not send DB_LOCALE, the database server uses the DB_LOCALE that is set on the server computer.
    2. For a new database, the database server uses the DB_LOCALE, which the client application has sent.
  2. The locale that the DB_LOCALE environment variable on the server computer indicates
  3. The default locale (U.S. English)

IBM® Informix® uses the precedence of steps 1, 2, and 3 in the preceding list to obtain the database information for the server-processing locale. You are not required to set the other environment variables.

Tip: The precedence rules apply to how the database server determines both the COLLATION category and the CTYPE category of the server-processing locale. For more information about these locale categories, see Locale categories.

For more information about how the database server obtains these environment variables, see Send the client locale.

If the client application makes another request to open a database, the database server must reestablish the database information for the server-processing locale, as follows:
  1. Reverify the database locale by comparing the database locale in the database to be opened with the value of the DB_LOCALE environment variable from the client application.
  2. Reestablish the server-processing locale with the newly verified database locale (from the preceding step).

For example, suppose that your client application has DB_LOCALE set to en_us.8859-1 (U.S. English with the ISO8859-1 code set). The client application then opens a database with the U.S. English locale (en_us.8859-1), and the database server establishes a server-processing locale withen_us.8859-1 as the locale that defines the database information.

If the client application now closes the U.S. English database and opens another database, one with the French locale (fr_fr.8859-1), the database server must reestablish the server-processing locale. The database server sets the eighth character field of the SQLWARN array to W indicate that the two locales are different. The client application, however, might choose to use this connection because both these locales support the ISO8859-1 code set. If the client application opens a database with the Japanese SJIS locale (ja_jp.sjis) instead of one with a French locale, your client application would probably not continue with this connection because the locales are too different.

http://publib.boulder.ibm.com/infocenter/idshelp/v115/topic/com.ibm.glsug.doc/ids_gug_050.htm#ids_gug_050

http://publib.boulder.ibm.com/infocenter/idshelp/v115/topic/com.ibm.glsug.doc/ids_gug_051.htm

728x90

'Informix > informix reference' 카테고리의 다른 글

Uninstalling ISM  (0) 2011.10.24
Setting Up ISM on UNIX  (0) 2011.10.24
How to use oncheck to detect corruption  (0) 2011.10.10
Informix Continuing Support Offering  (0) 2011.10.06
The archecker Schema Reference  (0) 2011.08.31
728x90

1. Precompile


2. Bind


3. Package


4. Link


5. Compile


샘플 코드 위치 $DB2DIR/samples 또는 $HOME/sqllib/samples


c 프로그램 샘플 실행 방법

1. c

bldapp 파일이름 (확장자 제외)


2. sqc 

embprep 파일이름 (확장자 제외)

bldapp 파일이름 (확장자 제외)




http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/conn/c0005595.htm

http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.apdv.cli.doc%2Fdoc%2Fr0007866.html

728x90
728x90

Question

What do these messages from the db2fmp process mean?


Cause


This technote provides some FAQs regarding messages in the db2diag.log in regards to db2fmp processes used to run non-SQL routines such as Java and C.

Scenario #1: Threads in db2fmp process, SQL1042

When the DB2 registry variable DB2_MAX_THREADS_PER_FMP is set you may see the messages below which can be safely ignored. This registry variable was introduced as an enhancement to DB2 via IZ08425. 

In some cases the SQL1042 is a legitimate error so its important to note that in this scenario "Max number of thread in fmp reached; no thread created" is the cause of the SQL1042. The SQL1042 can be safely ignored.

Please note that the SQL1042 is transparent to the application, so no errors will be returned to the application. DB2 automatically starts a new db2fmp process to service the existing or subsequent requests.

2011-01-10-11.31.12.480063-300 I34781A381 LEVEL: Warning 
PID : 1200 TID : 1 PROC : db2fmp (Java) 0
INSTANCE: db2inst1 NODE : 000 
EDUID : 1 EDUNAME: db2fmp (Java) 0 
FUNCTION: DB2 UDB, routine_infrastructure, sqlerMasterThreadListener, 
probe:200 
MESSAGE : Max number of thread in fmp reached; no thread created

2011-01-10-12.10.13.923352-300 I74680A573 LEVEL: Warning 
PID : 1234 TID : 100 PROC : db2sysc 
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE 
APPHDL : 0-33648 APPID: 192.168.1.1.50234.11022217100
AUTHID : DB2INST1 
EDUID : 608 EDUNAME: db2agent (SAMPLE) 0 
FUNCTION: DB2 UDB, routine_infrastructure, sqlerMasterThreadReq, 
probe:89 
MESSAGE : FMP reported it could not create a new thread 
DATA #1 : Hexdump, 4 bytes 
0x000000020210F180 : 0000 0C05 ....

2011-01-10-10.02.25.454418-300 I2221A448          LEVEL: Severe
PID     : 1234                 TID  : 100         PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-51434              APPID: 10.111.41.13.56427.110218150224
AUTHID  : DB2INST1
EDUID   : 260                  EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, routine_infrastructure, sqlerGetFmpThread, probe:20
RETCODE : ZRC=0xFFFFFBEE=-1042


Scenario #2: Operating system resource issue, SQL1042

The messages are very similar to Scenario #1 so how do we determine if the SQL1042 is legitimate? Work backwards and look for preceding messages originating from the same PID and TID. 

In the case below we see the source of the error is originating from the operating system (OSERR) and the operating system API which returned the error (pthread_create). pthread_create() is an AIX API indicating that the operating system was unable to create a new thread in the db2fmp process. The root cause is likely an operating system limitation or resource issue when trying to create an additional thread due to the EAGAIN return code.


2011-01-01-13.01.03.345767-240 E287334A401 LEVEL: Severe (OS) 
PID : 2609242 TID : 1 PROC : db2fmp (Java) 0
INSTANCE: db2inst1 NODE : 000 
EDUID : 1 EDUNAME: db2fmp (Java) 0 
FUNCTION: DB2 UDB, oper system services, sqloCreateAppThread, probe:100 
CALLED : OS, -, pthread_create 
OSERR : EAGAIN (11) "Resource temporarily unavailable" 

2011-01-01-13.01.03.426469-240 I287736A455 LEVEL: Severe 
PID : 2609242 TID : 1 PROC : db2fmp (Java) 0
INSTANCE: db2inst1 NODE : 000 
EDUID : 1 EDUNAME: db2fmp (Java) 0 
FUNCTION: DB2 UDB, trace services, sqlt_logerr_data (secondary logging 
func, probe:0 
MESSAGE : Failed to create app thread: 
DATA #1 : Hexdump, 4 bytes 
0x0FFFFFFFFFFFEF60 : 0000 000B ... 

2011-01-01-13.01.03.426684-240 I288192A343 LEVEL: Severe 
PID : 2609242 TID : 1 PROC : db2fmp (Java) 0
INSTANCE: db2inst1 NODE : 000 
EDUID : 1 EDUNAME: db2fmp (Java) 0 
FUNCTION: DB2 UDB, routine_infrastructure, sqlerCreateWorkerThread, 
probe:20 
RETCODE : ZRC=0xFFFFFBEE=-1042 

Scenario #3: SQL1042N returned on AIX platforms using Power7 processors

There is an incompatibility between the IBM JDK bundled with DB2 v9.7 and Power7. For details refer to the link db2setup or db2fmp (Java) abnormally terminated on Power7

Scenario #4: SQL1042N returned due to permission issue 

Ensure the DB2 instance home directory has the permission below, otherwise the db2fmp may not be able to access files located in ~/sqllib/function

/home $ ls -la 
drwxr-xr-x 14 db2inst1 db2admg 4096 Aug 04 10:51 db2inst1/

Also check the stored procedure binaries in ~/sqllib/function to ensure they are world readable because the fenced userid is usually not the instance owner.

/home/db2inst1/sqllib/function:
-rw-r--r-- 1 db2fenc fencgrp 875 Jul 29 14:24 DUMMY_JAVASP.class 


Scenario #5: Executing long running query 

A remote DB2 client has abnormally terminated when executing a long running query which includes a call to a routine. These messages are informational in nature and can be ignored. However the application should contain some exception handling logic to handle any abnormal terminations. Under the covers DB2 will clean up any non-SQL routines being executed on behalf of the connection. one of the side effects is that the db2diag.log may contain a 0xFFFFFB38 ( SQL1224) 

In the example below the message originating from the db2fmp process about "The database manager is not able to accept new requests..." is misleading. The message is originating from the JDBC (db2jcc.jar) used internally by the DB2 server to execute a Java routine and can be ignored. There is nothing wrong with the DB2 database server.

2011-01-12-12.08.33.158935-300 I6813000A541       LEVEL: Error
PID     : 9644                 TID  : 172         PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-20965              APPID: 192.168.1.1.33819.110220052256
AUTHID  : DB2INST1
EDUID   : 172                  EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, common communication, sqlcctcptest, probe:11
MESSAGE : Detected client termination
DATA #1 : Hexdump, 2 bytes
0xFFFFFFFF4B7F3376 : 0036                                       .6 

2011-01-12-12.08.33.170419-300 I6813542A523       LEVEL: Error
PID     : 9644                 TID  : 172         PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-20965              APPID: 192.168.1.1.33819.110220052256
AUTHID  : DB2INST1
EDUID   : 172                  EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, common communication, sqlcctest, probe:50
MESSAGE : sqlcctest RC
DATA #1 : Hexdump, 2 bytes
0xFFFFFFFF4B7F346E : 0036  

2011-01-01-12.08.33.170664-300 I6814066A503       LEVEL: Error
PID     : 9644                 TID  : 172         PROC : db2sysc 0
INSTANCE: db2inst11             NODE : 000         DB   : SAMPLE
APPHDL  : 0-20965              APPID: 192.168.1.1.33819.110220052256
AUTHID  : DB2INST1
EDUID   : 172                  EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, base sys utilities, sqeAgent::AgentBreathingPoint, probe:10
CALLED  : DB2 UDB, common communication, sqlcctest
RETCODE : ZRC=0x00000036=54 

2011-01-01-12.08.33.173237-300 I6814570A507       LEVEL: Error
PID     : 9644                 TID  : 172         PROC : db2sysc 0
INSTANCE: db2inst11             NODE : 000         DB   : SAMPLE
APPHDL  : 0-20965              APPID: 192.168.1.1.33819.110220052256
AUTHID  : DB2INST1
EDUID   : 172                  EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, routine_infrastructure, sqlerInvokeFencedRoutine, probe:40
DATA #1 : Hex integer, 4 bytes
0x804B006D
DATA #2 : Hex integer, 4 bytes
0xFFFFFB38  /* SQL1224 */
 

2011-01-01-12.08.33.173599-300 E6815078A3474      LEVEL: Severe
PID     : 9644                 TID  : 172         PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-20965              APPID: 192.168.1.1.33819.110220052256
AUTHID  : DB2INST1
EDUID   : 172                  EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, routine_infrastructure, sqlerReturnFmpToPool, probe:900
DATA #1 : String, 50 bytes
Marking fmp as unstable, fmp is forced or aborted:

DATA #2 : Boolean, 1 bytes
true
DATA #3 : String, 20 bytes
Fmp entry use count:
DATA #4 : unsigned integer, 4 bytes
1
DATA #5 : String, 8 bytes
Fmp TID:

DATA #6 : Hexdump, 4 bytes
0x000000020079F650 : 0000 0037  /* 0x37 = 55 */
DATA #7 : String, 8 bytes
Fmp row:
DATA #8 : sqlerFmpRow, PD_SQLER_TYPE_FMP_ROW, 496 bytes
 fmpPid: 15781 

When executing Java routines one additional side effect is that the message below will appear in the db2diag.log. This message is misleading because there is nothing wrong with the database manager on the DB2 server. The message originates from the JDBC driver which is local to the DB2 server used to execute Java routines. This message can be safely ignored.

2011-01-01-12.08.33.213727-300 I6840110A1387      LEVEL: Warning
PID     : 15781
                TID  : 55          PROC : db2fmp (Java) 0
INSTANCE: db2inst1             NODE : 000
EDUID   : 55                   EDUNAME: db2fmp (Java) 0
FUNCTION: DB2 UDB, BSU Java support, sqlejLogException, probe:10
DATA #1 : String, 962 bytes
com.ibm.db2.jcc.am.DisconnectNonTransientException: [jcc][2055][11259][3.61.86] The database manager is not able to accept new requests, has terminated all requests in progress, 
or has terminated this particular request due to unexpected error conditions detected at the target system. 
ERRORCODE=-4499, SQLSTATE=58009
    at com.ibm.db2.jcc.am.ed.a(ed.java:321)
    at com.ibm.db2.jcc.t4.ab.T(ab.java:1264) 
...


Scenario #6: SQL1131 or SQL4302

This indicates the non-SQL routine was abnormally terminated. This is usually not a serious error as long as the application is coded to handle these exceptions and the messages do not appear frequently e.g. once a month.

2011-02-02-15.01.23.476662-240 I299008A471 LEVEL: Warning 
PID : 8245982 TID : 1280 PROC : db2fmp (Java) 0
INSTANCE: db2inst1 NODE : 000 
EDUID : 12080 EDUNAME: db2fmp (Java) 0 
FUNCTION: DB2 UDB, trace services, sqlt_logerr_data (secondary logging 
func, probe:0 
MESSAGE : Thread of db2fmp terminated with nonzero rc 
DATA #1 : Hexdump, 4 bytes 
0x000000011E7685EC : FFFF FB95 /* SQL1131 */ ...

2011-02-02-15.01.23.883044-240 I299480A453 LEVEL: Severe 
PID : 8245982 TID : 1280 PROC : db2sysc 0 
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE 
APPHDL : 0-40776 APPID: 192.168.1.10.47637.100712165705 
AUTHID : DB2INST1 
EDUID : 17812 EDUNAME: db2agent (CLNPIS) 0 
FUNCTION: DB2 UDB, routine_infrastructure, sqlerDisassociateWithFmp, 
probe:30 
RETCODE : ZRC=0xFFFFFB95=-1131 


Scenario #7: Marking fmp as unstable

This message is returned when DB2 decides to shut down a db2fmp process and can be part of normal DB2 operations. DB2 automatically picks a new db2fmp or creates a new db2fmp process to execute any subsequent calls to stored procedures or UDFS.

To determine whether this message is more than informational please check for additional db2diag.log entries around the same timestamp which return a ZRC return code, 0xFFFFxxxx return code or an error from the operating system (OSERR). Please use the db2diag tool to decode these return codes. 

This message may also be returned when:


2011-01-10-12.01.55.448367+000 E288536A3366 LEVEL: Severe 
PID : 582 TID : 9823 PROC : db2sysc 0 
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE 
APPHDL : 0-40834 APPID: 10.69.63.248.47961.100712170155 
AUTHID : DB2INST1 
EDUID : 18069 EDUNAME: db2agent (SAMPLE) 0 
FUNCTION: DB2 UDB, routine_infrastructure, sqlerMasterThreadReq, 
probe:901 
DATA #1 : String, 50 bytes 
marking fmp as unstable: 
DATA #2 : String, 8 bytes 
Fmp TID: 
DATA #3 : Hexdump, 4 bytes 
0x078000000113B770 : 0000 0000 .... 
DATA #4 : String, 8 bytes 
Fmp Row: 
DATA #5 : sqlerFmpRow, PD_SQLER_TYPE_FMP_ROW, 504 bytes 
fmpPid: 2609242 
fmpPoolList Ptr: 0x0000000000000000 fmpForcedList Ptr: 
0x0000000000000000 
nextFmpCB Ptr: 0x0780000000ed6980 prevFmpCB Ptr: 0x078000000100ea20 
fmpIPCList Ptr: 0x0780000001138960 
stateFlags: 0x00000013 numFmp32Attaches: 0 
numActiveThreads: 41 numPoolThreads: 0 
fmpCodePage: 1252 fmpRowUseCount: 42 
...
...

2011-01-10-12.01.56.172884+000 I2049780A492 LEVEL: Warning 
PID : 7131362 TID : 1 PROC : db2agent (SAMPLE) 0 
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE 
APPHDL : 0-1333 APPID: 192.168.1.10.17420.0710250420 
AUTHID : DB2INST1 
FUNCTION: DB2 UDB, trace services, sqlt_logerr_data, probe:0 
MESSAGE : Removing FMP from pool 
DATA #1 : Hexdump, 16 bytes 

2011-01-10-12.01.56.172890+000 I2040223A1335 LEVEL: Error 
PID : 7131362 TID : 1 PROC : db2agent (SAMPLE) 0 
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE 
APPHDL : 0-1333 APPID:192.168.1.10.17420.0710250420 
AUTHID : DB2INST1 
FUNCTION: DB2 UDB, oper system services, sqlossig, probe:10 
MESSAGE : Sending SIGKILL to the following process id 
DATA #1 : signed integer, 4 bytes 
7016538 

The SIGKILL can be safely ignored since it is returned when DB2 brings down the db2fmp.

The meaning of the stateFlags can be decoded via the chart provided in the technote belowAccumulation of db2fmp (Java) processes.


Scenario #8: Messages related to Java memory

Please see the technote db2fmp (Java) Memory Issues in the links below.


Scenario #9: Data Partitioned System

On systems using data partitioning, please ensure that the fenced userid exists on ALL partitions. Otherwise SQL1042C may be returned. Most of the DB2 table snapshot functions are implemented as non-SQL routines.

db2 "select count(*) from SYSIBMADM.TBSP_UTILIZATION" 
SQL1042C An unexpected system error occurred. SQLSTATE=58004

Scenario #10: SQL0952N Processing was cancelled due to an interrupt.

If the application calling the routine cancelled the call, -952 will be reported in the db2diag.log. The application may have canceled the routine because there was an error or it may have logic to terminate the routine call if no result is returned within a timeout. To investigate further check the application log and the application developer to determine what may have caused the application to cancel the call the to routine.


Other Aids

The db2diag command can be used to translate any hexadecimal messages such as 0xFFFFFB38 or ZRC=0x8136001C code into a meaningful SQLCODE.

db2diag -rc FFFFFB38

Input ECF string 'FFFFFB38' parsed as 0xFFFFFB38 (-1224).
ERROR: ../sqz/sqlzwhatisrc.C:
Input ZRC 0xFFFFFB38 (-1224) cannot be identified as a V7 or V6 ZRC value

Answer

Related information

Knowledge Collection: DB2 Stored Procedure and FMP iss
db2fmp (Java) performance issues
IZ08425: Enhancements for db2fmp
db2fmp (Java) memory issues
Accumulation of db2fmp (Java) processes
db2setup or db2fmp (Java) abnormally terminated on Powe



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

728x90
728x90

DB2 Setup log file started at: Thu Oct 13 16:53:26 2011 CDT

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


Operating system information: AIX 6.1

ERROR:The value provided for the FILE keyword is not valid. The location specified

"/opt/IBM/db2/V9.1" exists and is not empty. Specify a new or empty location.



DB2 Setup log file finished at: Thu Oct 13 16:53:26 2011 CDT

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



Problem(Abstract)

Installing DB2 in a non-default directory results in a "FILE keyword is not valid" error.

Symptom

Error as seen in the installation.log file:

DB2 Setup log file started at: Tue Jun 16 08:13:26 2010 EDT              
============================================================                                                                 
Operating system information: AIX 5.3                                    
ERROR:The value provided for the FILE keyword is not valid. The location 
specified "/opt/db2V91" exists and is not empty. Specify a new or empty location.                                                                  
DB2 Setup log file finished at: Tue Jun 16 08:13:27 2010 EDT             
============================================================             

In this scenario the non-default installation directory being used is /opt/db2V91.

Cause

The specified directory is not empty. There may be files or possibly another directory within it.

Resolving the problem

Change directories (cd) to the non-default directory you want to install in. Verify that the directory is empty.

Example:
root@nuat01 /opt/db2V91> ls -latr 
total 8 
drwxrwxrwx 2 root system 256 Feb 1 07:40 lost+found 
drwxr-xr-x 6 bin bin 256 Feb 1 15:54 .. 
drwxrwxrwx 3 root system 4096 Feb 5 18:59 . 

In this example the directory is not actually empty. The lost+found directory is present. 

Resolution:

  1. Remove lost+found directory
  2. Install DB2
  3. Recreate lost+found directory



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

728x90
728x90

Error description


User affected: Users who use V8 client ->V8 Gateway ->DB2 server configuration.

Problem description:
In V8 client -> V8 GW -> server configuration, if the request from the client is big(greater than communication buffer size) and MONITOR is turned on on gateway, running "force application" command on gateway may cause gateway instance crash.
You can see similar messages in db2diag.log:
2005-06-08-17.01.05.054919   Instance:XXXXXX   Node:000
PID:76504(db2agentg (XXXXX ) 0)   TID:1
Appid:O212DF2D.GF2E.01045B2D1685
DRDA Application Server  sqljsTermAgentReply Probe:10
DIA5000C A DRDA AS token "AGENT TERMINATING" was detected.  The
diagnostic data
returned is (SRVDGN): "SQLERRP:SQLJCMN  SQLCODE:-30081".
ALERT :26
PID:76504 TID:1 Node:000 Title: SQLCA
 sqlcaid : SQLCA     sqlcabc: 136   sqlcode: -30081   sqlerrml:
37
 sqlerrmc: 32 * 0 TCP/IP SOCKETS 127.0.0.1 send
 sqlerrp : SQLJCMN ?
 sqlerrd : (1) 0x81360012      (2) 0x00000012      (3)
0x00000000
           (4) 0x00000000      (5) 0x00000000      (6)
0x00000000
 sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)
          (7)      (8)      (9)      (10)        (11)
 sqlstate:
2005-06-08-17.01.05.762408   Instance:XXXXXX   Node:000
PID:76504(db2agentg (XXXXX ) 0)   TID:1
Appid:O212DF2D.GF2E.01045B2D1685
base sys utilities  sqleagnt_sigsegvh Probe:1
Error in agent servicing application with coor_node:
0x2FF19ECC : 0x0000                                     ..
Trap file looks like that:
0xD1F0E0A0 sqljcCompleteDss__FP10sqljCmnMgrl + 0x11C
0xD2CABCA0 sqljrDrdaArDisconnect__FP7UCintfc + 0x244
0xD2510640 sqleuUCagentDrdaArTermConnect__FP7UCintfc + 0x88
0xD250EB68 sqleUCagentConnectReset + 0x148
0xD1CC7DC0 sqljsCleanup__FP13sqle_agent_cbP11UCconHandle + 0x244
0xD1CC7608 sqljsDrdaAsInnerDriver__FP17sqlcc_init_structb + 0x2A0
0xD1CC7440 sqljsDrdaAsDriver__FP17sqlcc_init_struct + 0x134


Local fix

Connect directly to server.


Problem summary

User Affected:
Users who using DB2 gateway and monitor is turned on Problem Description:
If you run DB2 as a gateway, and monitor is turned on in the gateway, you may encounter DB2 crash if you issue "force applicaiton all" command in gateway server.
Problem Summary:
In V8 client -> V8 gateway -> server configuration, and monitor is turned on on the gateway. You may encounter DB2 instance cras h if you running "FORCE APPLICATION" command on the DB2 gateway server. The trap file looks like that:
0xD1F0E0A0 sqljcCompleteDss__FP10sqljCmnMgrl + 0x11C
0xD2CABCA0 sqljrDrdaArDisconnect__FP7UCintfc + 0x244
0xD2510640 sqleuUCagentDrdaArTermConnect__FP7UCintfc + 0x88
0xD250EB68 sqleUCagentConnectReset + 0x148
0xD1CC7DC0 sqljsCleanup__FP13sqle_agent_cbP11UCconHandle + 0x244
0xD1CC7608 sqljsDrdaAsInnerDriver__FP17sqlcc_init_structb + 0x2A0
0xD1CC7440 sqljsDrdaAsDriver__FP17sqlcc_init_struct + 0x134


Problem conclusion

Problem was first fixed in Version 8.1 FixPak 11(also known as Version 8.2 FixPak 4)(s060120)


Temporary fix

Connect to DB2 server directly, don't use DB2 gateway.


APAR Information

  • APAR number

    IY73035

  • Reported component name

    DB2 UDB ESE AIX

  • Reported component ID

    5765F4100

  • Reported release

    810

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2005-06-23

  • Closed date

    2006-02-05

  • Last modified date

    2006-02-05




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

728x90
728x90

2011-10-11-15.17.17.759485+540 E8925734A426       LEVEL: Error

PID     : 18152                TID  : 1           PROC : db2agent (******) 0

INSTANCE: ***                  NODE : 000         DB   : ******

APPHDL  : 0-2162               APPID: *LOCAL.***.111107141109

AUTHID  : ***

FUNCTION: DB2 UDB, net8 wrapper, Net8_Connection::xa_open, probe:450

MESSAGE : ZRC=0xFFFFFFFD=-3

DATA #1 : String, 16 bytes

xa_open() Failed




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

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

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

728x90
728x90


Question

This document lists some SQL30081N TCP/IP communication protocol errors and recommended action plans associated with them.

Cause

The protocol error is dependent on the platform. Each protocol error has its own definition and corresponding action plan.

Answer

Problem Details
The SQL30081N error has the following format:

SQL30081N A communication error has been detected. Communication protocol being used:protocol . Communication API being used: interface . Location where the error was detected:location . Communication function detecting the error: function . Protocol specific error code(s): rc1, rc2 , rc3 . 

For example:
SQL30081N A communication error has been detected. Communication protocol
being used: "TCP/IP". Communication API being used: "SOCKETS". Location
where the error was detected: "". Communication function detecting the error: "connect".
Protocol specific error code(s): "111", "*", "*".

The following table lists protocol specific errors that can occur on different platform and their action plan to resolve the problem.

cf) db2diag.log (HP)

2011-10-11-15.17.32.470470+540 E8945037A747       LEVEL: Error

PID     : 17111                TID  : 1           PROC : db2sysc

INSTANCE: ***                  NODE : 000         DB   : ******

FUNCTION: DB2 UDB, XA DTP Support, sqlxaConnect, probe:4666

MESSAGE : XA Interface SQLCA

DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes

 sqlcaid : SQLCA     sqlcabc: 136   sqlcode: -30081   sqlerrml: 45

 sqlerrmc: 239 * * TCP/IP SOCKETS 172.16.250.42 connect

 sqlerrp : SQLJCMN

 sqlerrd : (1) 0x81360012      (2) 0x00000012      (3) 0x00000000

           (4) 0x00000000      (5) 0x00000000      (6) 0x00000000

 sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)

           (7)      (8)      (9)      (10)        (11)

 sqlstate:


Windows​​AIX​​SUN​​HP​​Linux​​Short Name​​Action Plan​​
10061​​79​​146​​239​​111​​ECONNREFUSED ​​

Connection Refused​​

Client attempts to make connection to server using an invalid IP/port ​​

Check server side: ​​

DB2 environment variable DB2COMM is set: DB2COMM=TCPIP ​​

DBM CFG's SVCENAME is set to the instance's port number or service name. The command to update this parameter is: "db2 update dbm cfg using svcename <port/service name>" ​​

If service name is set, please check 'services' file see if the name corresponds to an unused port number ​​

Make sure db2 server instance is started properly ​​

Check client's side: ​​

Node directory's entry: ​​

Service name should show the right port number/service name corresponds to db2 server's instance port (svcename setting) ​​

To check if server's port is opened: ​​

telnet <hostname> <port> ​​

If fails then the port on server is not opened and the problem is outside of DB2 area. ​​

Additional technote on ECONNREFUSED:​​
​​http:​​/​​​​/​​www.ibm.com​​/​​support​​/​​docview.wss?rs​​=​​71​​&​​uid​​=​​swg21328644​​​​ ​​

​​

Windows​​AIX​​SUN​​HP​​Linux​​Short Name​​Action Plan​​
10053​​ ​​ ​​ ​​ ​​SOCECONNABORTED ​​

Software caused a connection abort. ​​

​​

Software closed connection ​​

If error is reported on client application which uses ODBC/CLI to connect to DB2 UDB server. ​​

Please disable DB2's CLI timeout: ​​

Add 'QUERYTIMEOUTINTERVAL=0' on client's side's db2cli.ini file ​​

Check application if they have any timeout. ​​

e.g. ADO timeout, VB timeout ​​

If application connects to OS390 server, please check idlethreadtimeout parameter (IDTHTOIN) on OS390. ​​

This parameter sets the active thread timeout limit on OS390. ​​

​​

Windows​​AIX​​SUN​​HP​​Linux​​Short Name​​Action Plan​​
10054​​73​​131​​232​​104​​ECONNRESET ​​

Connection has been reset by partner​​

Connected partner has closed the connection. ​​

Check any timeout limit on partner side. ​​

E.g. Firewall, Application, DB2 CLI layer and etc ​​

If error is reported on client application which uses ODBC/CLI to connect to DB2 UDB server. ​​

Please disable DB2's CLI timeout: ​​

Add 'QUERYTIMEOUTINTERVAL=0' on client's side's db2cli.ini file ​​

Check if there's any firewall between client and server. ​​

If it has any time limit on open connection ​​

Check application if they have any timeout. ​​

e.g. ADO timeout, VB timeout. ​​

​​


This error can also be caused by the issue described in ​​technote_1395285​​
​​
When a local database connection is catalogued using a different alias name than the database name, you might get error SQL30081 when you try to connect to that database using a TCPIP connection.​​
​​
If you get that error when when you try to connect to a database, make sure that on the machine where that database resides the database is not catalogued using a different alias name than the database name.​​
​​

​​

Windows​​AIX​​SUN​​HP​​Linux​​Short Name​​Action Plan​​
10060​​78​​145​​238​​110​​ETIMEDOUT ​​

Connection timeout​​

Connection has reached the network timeout limit and is terminated by network ​​

Timeout by tcpip layer ​​

TCPIP has their own timeout value, if the open connection stayed too long, tcpip will force the connection off. ​​

Usually this is network issue ​​

Check TCPIP's KEEPALIVE setting ​​

see note1 ​​

​​

Windows​​AIX​​SUN​​HP​​Linux​​Short Name​​Action Plan​​
10048​​67​​125​​226​​98​​EADDRINUSE ​​

The specified address already in use​​

A: 2 instances are starting on the same machine listening on the same port (usually would trap on db2start) ​​

B: A client application or agent is making an outgoing connection attempt and is using a socket that is already being used by another connection to the database or is in the wait state (2MSL state). ​​

Usually only happen to Windows client: ​​

This is a Microsoft error. Winsock has given a port that is already in use (winsock defect) or is closed but still waiting in the wait state. ​​

Workaround for Windows: ​​

1. Adjust the time that a socket sits in wait state after being closed (default is 2 minutes) ​​

TcpTimedWaitDelay​​ ​​

see Note 3 ​​

2. Adjust the number of ports available (default is 5000) ​​

MaxUserPort​​ ​​

see Note 4 ​​

3. ​​Adjust the use of connect / disconnect so that it doesn't cycle so rapidly in the program (best solution).​​ 10048 is most often caused by rapid connection / disconnection logic in the application, which puts too many ports in the time_wait state (2MSL). Re-using the connection handle when an application is issuing multiple statements is the best way of handling this (don't disconnect then reconnect every time a statement completes) ​​

4. ​​Implement client side connection pooling so that the application logic internally doesn't have to change. ​​Make sure the pool is large enough to handle 80% of the connections. Make sure the pool has some form of re-connect logic in the case of a disconnect while idle. ​​

​​

Windows​​AIX​​SUN​​HP​​Linux​​Short Name​​Action Plan​​
10055​​74​​132​​233​​105​​ENOBUFS ​​

No buffer space available​​

System running out of resource to complete the TCPIP call ​​

For Windows: ​​

The problem is caused by running out of Windows desktop heap or system page table entries. It is not DB2 related ​​

Increase the Windows SystemPages registry entry. ​​

​​

Windows​​Short Name​​Action Plan​​
10065​​WSAEHOSTUNREACH​​No route to host​​
​​
For Windows client, Linux server:​​
​​
Unset firewall on Linux server to allow connections to go through from clients.​​
​​
Note 1: From DB2 manual explained more what KEEPALIVE does and how we use it.

DB2 uses TCP/IP's connection KEEPALIVE option to detect if there is a connection failure. This option transmits a message periodically to determine if the partner is still alive. If the partner fails to respond to this message, the connection is considered to be broken, and an error is returned.

Note 2:

KEEPALIVE settings affect all TCP/IP applications running on the machine.

For Windows 95, Windows 98, and Windows NT:

Use the KeepAliveTime TCP/IP configuration parameter in the registry. The KEEPALIVE parameter may be created if it does not exist under the Parameters registry subkey. Add this parameter to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

The default value is two hours.

For OS/2:

Use the inetcfg command. (For OS/2 TCP/IP Version 2.0, you must apply the fix CSD UN64092 to use this command.)

For AIX:

Change the values of the network options tcp_keepidle and tcp_keepintvl with the no command (for details, type man no). The default value is two hours.

For HP-UX systems:

Change the values of the network options tcp_keepstart and tcp_keepfreq with the nettunecommand (for details, type man nettune).

For Solaris systems:

Change the value of the network option tcp_keepalive_interval with the following command:

ndd -set /dev/tcp tcp_keepalive_interval value

(For details, type man ndd.)

For other platforms:

See your TCP/IP documentation for details on configuring the KEEPALIVE setting. If it is not supported by the TCP/IP stack, then it is not used by DB2.

Note 3:

This parameter determines the length of time that a connection stays in the TIME_WAIT state when being closed. While a connection is in the TIME_WAIT state, the socket pair cannot be reused. This is also known as the 2MSL state because the value should be twice the maximum segment lifetime on the network. See RFC 793 for further details.

Note 4:

This parameter controls the maximum port number used when an application requests any available user port from the system. Normally, short-lived ports are allocated in the range from 1024 through 5000. Setting this parameter to a value outside of the valid range causes the nearest valid value to be used (5000 or 65534).

Note 5:

For other TCPIP messages.
V8.2:http://publib.boulder.ibm.com/infocenter/db2luw/v8//topic/com.ibm.db2.udb.doc/core/rcommsec.htm
V9.1:http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.msg.doc/doc/rcommsec.htm
V9.5:http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.messages.doc/doc/r0052008.html
V9.7:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.messages.doc/doc/r0052008.html



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

728x90
728x90

Question

EINVAL (22) "Invalid argument" LEVEL: Error (OS) error is returned when you pipe the output of a DB2 command to the head operating system command (for example, "db2 list tablespaces show detail | head -81").

Cause

We've added a problem diagnose purpose code in sqlowqueInternal function on DB2 UDB Version 9.

When a command such as "db2 list tablespaces show detail | head -81" or "db2 select * from employee | head -10" is run, DB2® Version 9 logs the following message in the db2diag.log file:

------------------------------------------------------------------------
2007-03-06-23.17.14.080280-300 E10282A659         LEVEL: Error (OS)
PID     : 9883690              TID  : 1           PROC : db2bp
INSTANCE: hidehy               NODE : 000
APPID   : *LOCAL.hidehy.070307041048
FUNCTION: DB2 UDB, oper system services, sqlowqueInternal, probe:40
MESSAGE : ZRC=0x870F003E=-2029060034=SQLO_QUE_BAD_HANDLE "Bad Queue Handle"
          DIA8555C An invalid message queue handle was encountered.
CALLED  : OS, -, write
OSERR   : EINVAL (22) "Invalid argument"
DATA #1 : system V message queue identifier., PD_TYPE_SYSV_QUEUE_ID, 4 bytes
0x1DD001B8
DATA #2 : Pointer, 8 bytes
0x0000000110035760
DATA #3 : unsigned integer, 8 bytes
78
------------------------------------------------------------------------


When a command such as db2 "select * from tab1" | more is run (tab1 has a lot of records such as 700000) then run Control + C on HP, will show the message too.
(The same scenario above does not reproduce in Solaris)

This error may occur in any scripting language that does not use direct connection to the DB2 instance but instead spawns a subshell to handle the DB2 connection (e.g. shell, C using "system", Perl using "open", "system" or "``", etc.).

Answer

The logging of this message is expected. There is no option to remove the logging of this message. The message can be ignored.


If you pipe the DB2 command output to the less or tail commands, the message will not be written.

If you pipe the output to awk first then pipe to head or others, the message will not be written.

Examples:

$db2 select * from employee | awk '{print $0}' | head -10

$db2 list tablespaces show detail | awk '{print $0}' | head -8

If you use Perl and a sleep(), the message will not be written.

Example:
---
open(DB2QUERY,"db2 -tf $querysql |") || die "Failed to get data from DB2, $!";
while (<DB2QUERY>)
{
. . .
}
while (!eof(DBQUERY)){};

sleep(1);
close(DB2QUERY);
---


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


728x90
728x90

Problem(Abstract)

Message "Fenced server is not null but not connected, Cleanup failed for server" in db2diag.log

Symptom

You see a message similar to the following in db2diag.log:

2008-08-11-13.59.07.053103-300 I584734A1271 LEVEL: Error
PID : 581690 TID : 16022 PROC : db2sysc
INSTANCE: my_inst NODE : 000 DB : MYDB
EDUID : 16022 EDUNAME: db2agent (MYDB) 0
FUNCTION: DB2 UDB, Query Gateway, sqlqgRouter_conn_lost_cleanup, probe:25
DATA #1 : <preformatted>
Message: Fenced server is not null but not connected,
Cleanup failed for server: MYSERVER

CALLSTCK:
[0] 0x090000000F632524 sqlqgRouter_conn_lost_cleanup__FP12FencedServer + 0x104
[1] 0x090000000F62DE88 sqlqgRouter__FP17sqlqg_FMP_RequestPP15sqlqg_FMP_ReplyP10sqlri_ufob + 0x348
[2] 0x090000000F633070 sqlqg_fedstp_hook + 0x1B0
[3] 0x090000000AF8988C sqlqgDyload__FP10sqlri_ufob + 0x23C
[4] 0x090000000AF68F34 sqlriFedInvokerTrusted__FP10sqlri_ufobP21sqlriRoutineErrorIntf + 0x1A8
[5] 0x090000000AF68554 sqlriFedInvokeInvoker__FP10sqlri_ufobP14sqlqg_Fmp_Info + 0xE4
[6] 0x0900000009CBA7B0 sqlqg_Call_FMP_Thread__FP17sqlqg_FMP_RequestPP15sqlqg_FMP_Reply + 0x458
[7] 0x090000000B248EE8 sqlqgFedStart__FP14UnfencedServerc + 0x80C
[8] 0x0900000009CC30B0 sqlqgPassthruPrepare__FP15sqlri_rpassthru + 0x2BC
[9] 0x090000000991B5E8 sqlrj_passthru_prepare__FP8sqlrr_cbP11sqlrrstringP14sqlrr_cmpl_envPi + 0x48

Cause

This message can usually be ignored. It can be a side effect of any of the following conditions:

(1) An earlier error occurred that caused Federation Server to lose the connection to a data source. In this case, there will be an earlier error entry in db2diag.log or an earlier error message resulting from an SQL statement that tried to access the data source. A common error message in this case is SQL30081N (SQLCODE -30081).

(2) You have the data source server status health indicator or the nickname status health indicator turned on and Federation Server cannot access the data source. You can determine whether the data source status health indicator or the nickname status health indicator is on by issuing the following commands from the DB2 command line processor (CLP):

GET ALERT CFG FOR DATABASES USING db.fed_servers_op_status;
GET ALERT CFG FOR DATABASES USING db.fed_nicknames_op_status;

(3) Federation Server Version 9.5 or later: You have database configuration parameterauto_runstats turned on for nicknames and Federation Server cannot access the data source, or there is no user mapping from the instance owner to the data source. You can determine whether auto_runstats is on by issuing the following command from the DB2 command line processor and looking at the setting of auto_runstats:

GET DB CFG FOR dbname;

By default, the database configuration parameter auto_runstats is on for nicknames unless there is an auto_runstats maintenance policy that excludes nicknames (for example, specifies TYPE<>'N').

Diagnosing the problem

See the list of causes shown above.

Resolving the problem

This message can usually be ignored. 

If the cause is an earlier error that caused Federation Server to lose the connection to a data source (cause 1 listed above), then resolve the problem that caused Federation Server to lose the connection.

If the cause is a data source server status health indicator or a nickname status health indicator (cause 2 listed above), then resolve the problem that prevents Federation Server from accessing the data source, or turn off the health indicators. To turn off the health indicators, issue the following commands from the DB2 command line processor:

UPDATE ALERT CFG FOR DATABASES USING db.fed_nicknames_op_status SET THRESHOLDSCHECKED NO;
UPDATE ALERT CFG FOR DATABASES USING db.fed_servers_op_status SET THRESHOLDSCHECKED NO;

Federation Server Version 9.5 or later: If the cause is auto_runstats being on (cause 3 listed above), then do one of the following, listed in order of preference:

    UPDATE DB CFG FOR dbname USING auto_runstats OFF;

    Note that this turns off auto_runstats for all tables and nicknames, including local tables. DB2 will no longer maintain table or nickname statistics automatically, which can result in performance degradation.



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

728x90
728x90



http://db2portal.blogspot.com/2005/11/to-rebind-or-not-to-rebind-that-is.html

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

http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.admin.doc/doc/r0023582.htm


728x90

+ Recent posts