728x90


Problem(Abstract)

When using IBM DB2 for Linux, UNIX and Windows, running db2icrt/db2idrop against an DB2 instance name results in db2icrt/db2idrop process hangs when it is executing db2isrv in child process.

Symptom

db2icrt/db2idrop hangs when executing db2isrv

Cause

DB2 port entries in /etc/services file are missing or in wrong order etc.

Example 1:
DB2_db2instance1 entry is missing:


    DB2_db2instance1_1 60045/tcp 
    DB2_db2instance1_2 60046/tcp 
    DB2_db2instance1_END 60047/tcp

Example 2:
DB2_instance2 related port entries are in wrong order:
    DB2_db2instance2_1 60001/tcp 
    DB2_db2instance2_2 60002/tcp 
    DB2_db2instance2_END 60003/tcp 
    DB2_db2instance2 5914/tcp

Resolving the problem

1. Remove DB2 port entries related to the instance name in /etc/services file

2. Run db2icrt/db2idrop command again.



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

http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.qb.server.doc/doc/t0008487.html

728x90
728x90

Question

Why is db2top screen output not being shown in colors?

Cause

db2top is a monitoring tool included in DB2 for LUW on AIX, Linux, and Solaris platforms. Sometimes this utility is not shown in colors, Even though the monochromatic view of db2top is very useful, db2top can use colors when using the interactive screen mode to highlight some outputs and that can be more useful and attractive to some users.

Answer

The most common reasons to see db2top without colors are the following:

Your term emulator and/or your TERM environment setting cannot manage colors. In this case using xterm or dtterm at your TERM environment setting and use a term emulator capable to emulate either xterm or dtterm would be enough to show db2top in colors.

Your db2top configuration is not configured to show the output in colors, In order to check if db2top is configured to manage colors just execute the utility "db2top -d <database>" (where database is any database active on your instance), and once you are seeing the db2top main screen, just press "w" key, this writes the db2top configuration file and shows its current values:


Ensure the parameter "colors" is set to "ON". If it is configured to "OFF" you can edit directly the configuration file indicated by the first line of the above screen ("/home/db2inst1/.db2toprc" in this case) in order to set this parameter to "ON".



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

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

Problem(Abstract)

DB2START can fail, reporting SQL1390C, for various reasons.

Symptom

The db2start command will fail with the following error message:

SQL10007N Message "-1390" could not be retrieved.  Reason code: "3"



Cause

The problem can be due to several reasons. The common culprits are:

  1. Incorrect DB2INSTANCE environment variable setting.
  2. The db2profile has not be sourced properly.
  3. IZ36615
  4. Inconsistencies in /etc/group or /etc/passwd

Resolving the problem

First, it is a good idea to run db2iupdt as the root user if you're receiving this error message. Ifdb2start continues to fail you should check the following:

  1. The "DB2INSTANCE" environment variable should be set to the instance name of the instance you wish to start. You can check this value by running "env".
     
  2. On UNIX and Linux the db2profile should be sourced properly (db2cshrc for C shell). This may mean the user's profile contains a command similar to:

    . sqllib/db2profile
     
  3. If you're on AIX and receiving this message you should check the password algorithm being used for the user. The sha256 algorithm, for example, is not supported in DB2 V9.1 (at V9.5 Fix Pack 4 it is). You can check the password rules for each DB2 version in the respective Information Center.
     
  4. Check the "id" output of the user running db2start. Then, check to make the user and user's group exist in the /etc/passwd and /etc/group files respectively. Make sure permissions correctly set (at least 644).

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

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

+ Recent posts