728x90

Question

If your database was created prior to DB2 Universal Database Version 8.1, FixPak 7, new UDFs SYSFUN.GET_DBM_CONFIG and SYSFUN.APPLICATION_ID may not exist.

Answer

The db2updv8 command is a program that will define new user defined functions (UDFs) and stored procedures (SPs) that have been added to DB2 UDB in a Version 8.x FixPak.

The UDFs SYSFUN.GET_DBM_CFG and SYSFUN.APPLICATION_ID are supported in DB2 UDB Version 8.1 FixPak 7. Run db2updv8 to use these new functions. 

e.g. db2 "select application_id() from sysibm.sysdummy1"


Also note that other tools (for example, the Activity Monitor and its stored procedures) may not be fully functional until these UDFs are defined.



db2updv8 - Update Database to Version 8 Current Level


This command updates the system catalogs in a database to support the current level by enabling the following built-in routines:

v HEALTH_DBM_INFO

v HEALTH_DBM_HI

v HEALTH_DBM_HI_HIS

v HEALTH_DB_INFO

v HEALTH_DB_HI

v HEALTH_DB_HI_HIS

v HEALTH_TBS_INFO

v HEALTH_TBS_HI

v HEALTH_TBS_HI_HIS

v HEALTH_CONT_INFO

v HEALTH_CONT_HI

v HEALTH_CONT_HI_HIS

v GET_WRAP_CFG_C

v LIST_FILES_C

v ODBC_DISCOVERY

v HEALTH_HI_REC

v EXEC_DB2_SCRIPT

v HEALTH_HI_REC

v EXEC_DB2_SCRIPT

Authorization:

sysadm

Required connection:

Database. This command automatically establishes a connection to the specified

database.

Command syntax:

 db2updv8 -d database-name

-u userid -p password -h



Command parameters:

-d database-name

Specifies the name of the database to be updated.

-u userid

Specifies the user ID.

-p password

Specifies the password for the user.

-h Displays help information. When this option is specified, all other options

are ignored, and only the help information is displayed.



Example

After installing the current level (a FixPak or a new version), update the system catalog in the sample database by issuing the following command:

db2updv8 -d sample

Usage notes:

1. This tool can only be used on a database running DB2 Version 8.1.2 or later. If the command is issued more than once, no errors are reported and each of the catalog updates is applied only once.

2. To enable the new built-in functions, all applications must disconnect from the database and the database must be deactivated if it has been activated.

3. This command must be run if you will be importing data using nicknames.



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

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

728x90
728x90

http://www.db2ude.com/?q=node/83


http://soff.tistory.com/


http://www.50001.com/tt/board/ttboard.cgi?act=read&db=20303&page=1&idx=60


DB2의 자가 튜닝 메모리 매니저(STMM)

http://www.ibm.com/developerworks/kr/library/dm-0708naqvi/index.html


DB2 9 소개, Part 3: DB2 9의 자가 튜닝(self-tuning) 메모리 (한글)

http://www.ibm.com/developerworks/kr/library/dm-0606ahuja/

728x90
728x90

SQL access to DB2 monitoring data

http://www.ibm.com/developerworks/data/library/techarticle/0305deroos/0305deroos.html


Best practices for tuning DB2 UDB v8.1 and its databases

http://www.ibm.com/developerworks/data/library/techarticle/dm-0404mcarthur/


DB2 Tuning Tips for OLTP Applications

http://www.ibm.com/developerworks/data/library/techarticle/anshum/0107anshum.html#monitoring


Best Practices: Tuning and Monitoring Database System Performance

http://www.ibm.com/developerworks/data/bestpractices/systemperformance/#In this paper



DB2 Monitoring 및 Tuning

http://www.starhost.co.kr/xe/blog/183775


DB2 기초: 테이블 공간과 버퍼 풀 (한글)

http://www.ibm.com/developerworks/kr/library/0212wieser/0212wieser.html


DB2 기초: DB2 UDB 모니터링의 이유 및 방법 (한글)

http://www.ibm.com/developerworks/kr/library/dm-0408hubel/index.html





728x90
728x90

Confirming the link-edit of the wrapper library files (UNIX)
On federated servers that run UNIX®, some wrappers must be link-edited with the client software for the data source.

You must confirm that a wrapper library file exists on the federated server for each data source that you want to access.


About this task

This task applies to only the following data sources:
  • Informix®
  • Microsoft® SQL Server
  • Oracle
  • Sybase
  • Teradata

Procedure


To check for the wrapper library files:

Check for the library files in the default directory path where WebSphere® Federation Server is installed. If the library files are not in that directory, you must manually link the wrapper libraries to the data source client software.


The directory path for the wrapper library depends on the data source.



Oracle wrapper library files

The Oracle wrapper library files are added to the federated server when you install the wrapper.


When you install the Oracle wrapper, three library files are added to the default directory path. For example, if the federated server is running on AIX®, the wrapper library files that are added to the following directory path are libdb2net8.a, libdb2net8F.a, and libdb2net8U.a, The default wrapper library file is libdb2net8.a. The other wrapper library files are used internally by the Oracle wrapper.


The default directory paths and default wrapper library file names are listed in the following table.


Table 1. Oracle wrapper library locations and file names
Operating systemDirectory pathLibrary file names
AIX

/usr/opt/install_path/lib32/
/usr/opt/install_path/lib64/

libdb2net8.a
Linux®

/opt/IBM/db2/install_path/lib32
/opt/IBM/db2/install_path/lib64

libdb2net8.so
Solaris

/opt/IBM/db2/install_path/lib32
/opt/IBM/db2/install_path/lib64

libdb2net8.so
Windows®%DB2PATH%\bindb2net8.dll


Manually linking the wrapper libraries to the data source client software

If the wrapper library files are not in the directory path, you must manually link the wrapper libraries.

Before you begin


You need root authorization to run the link scripts.


The client software for the data sources that you want to access must be installed and configured on the federated server.


For the djxlinkxxx scripts to issue their messages in your language, at least one database instance must exist on the federated server. If an instance does not exist on the federated server, the scripts will still work. However, the scripts will issue all messages in English.



Procedure


To link the wrapper libraries to the data source client software:

  1. Decide which method you want to use to perform the link:
    MethodStep
    Run the link-edit scripts.
    1. Open a UNIX® command prompt and run the link-edit script for each data source that you want to access. The names of the link-edit script are:
      • djxlinkInformix
      • djxlinkMssql
      • djxlinkOracle
      • djxlinkSybase
      • djxlinkTeradata
    2. Issue the db2iupdt command on each federated database instance to enable federated access to the data sources.

    There is another script, the djxlink script, that attempts to create a wrapper library for every data source that is supported by WebSphere Federation Server. If you run djxlink script and have the client software for only some of the data sources installed, you will receive an error message for each of the data sources that you do not have installed.

  2. After the link is performed, check the permissions on the wrapper libraries. Make sure that the libraries can be read and run by the database instance owners.

Checking the FEDERATED parameter


The FEDERATED parameter must be set to YES to enable the federated server to access to the data sources.


To check the FEDERATED parameter setting:

  1. Issue the following DB2® command to display all of the parameters and their current settings:
    GET DATABASE MANAGER CONFIGURATION
  2. Determine if the concentrator is active based on the value of the max_connections parameter:
    • Off: max_connections is equal to max_coordagents.
    • On: max_connections is greater than max_coordagents.
    The max_connections parameter cannot be active when the FEDERATED parameter is configured to YES. If the concentrator is on, change the setting to off.
  3. Check the FEDERATED parameter setting. If the FEDERATED parameter is set to NO, change the setting to YES. Issue the following DB2 command to change the setting:
    UPDATE DATABASE MANAGER CONFIGURATION USING FEDERATED YES



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

http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp (Configuring - 페더레이티드 시스템 구성)


728x90

'Db2 > Db2 reference' 카테고리의 다른 글

STMM (수정중)  (0) 2011.11.09
모니터링/튜닝 참고  (0) 2011.11.09
테이블과 테이블 공간 상태 분석하기  (0) 2011.10.22
DB2 Federation reference  (0) 2011.10.18
PRECOMPILE/BIND/PACKAGE (수정중)  (0) 2011.10.17
728x90




http://www.ibm.com/developerworks/data/library/techarticle/dm-0407melnyk/index.html

http://www.ibm.com/developerworks/kr/library/dm-0407melnyk/#rp

728x90
728x90

Federated system and datasource


Configuring datasource


DB2 wrapper library files


Oracle wrapper library files


Valid server types in SQL statements

728x90
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

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

+ Recent posts