DB2 - Problem description
Problem IC99378 | Status: Closed |
DB2V10_START.KSH SCRIPT HANGS IN CASE OF REMOTELY CATALOGED DATABASES | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
The db2V10_start.ksh script might loop infinitely in activateDatabase function in following while loop: while [ $deact -eq 1 ]; do : su - ${DB2INSTANCE?} -c "db2 activate database ${db?}" & log info "su - ${DB2INSTANCE?} -c db2 activate database ${db?}" sleep 5 deact=$(su - ${DB2INSTANCE?} -c "db2pd -db ${db?}" | grep "not activated" | wc -l) done It might happen that loop forever in case the database is cataloged remotely. The reason is that the script is using 'Database name' in the activation command and it will not work for remotely cataloged databases | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All users * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 version 10.5 fix pack 4 * **************************************************************** | |
Local Fix: | |
Modify the db2V10_start.ksh by changing the following part: su - ${DB2INSTANCE?} -c "LANG=en_US db2 list database directory" | grep "Database name" \ | tr "[a-z]" "[A-Z]" | awk '{print $4}' > ${dbFN?} to: su - ${DB2INSTANCE?} -c "LANG=en_US db2 list db directory" | awk 'BEGIN{FS="=";} \ {if($1 ~ /Database name/)tmp=$2;else if(($1 ~ /Directory entry type/) && ($2 !~ /Remote/)) \ print tmp}' > ${dbFN?} | |
available fix packs: | |
DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4) for Linux, UNIX, and Windows | |
Solution | |
Problem is fixed in DB2 version 10.5 fix pack 4 | |
Workaround | |
Modify the db2V10_start.ksh by changing the following part: su - ${DB2INSTANCE?} -c "LANG=en_US db2 list database directory" | grep "Database name" \ | tr "[a-z]" "[A-Z]" | awk '{print $4}' > ${dbFN?} to: su - ${DB2INSTANCE?} -c "LANG=en_US db2 list db directory" | awk 'BEGIN{FS="=";} \ {if($1 ~ /Database name/)tmp=$2;else if(($1 ~ /Directory entry type/) && ($2 !~ /Remote/)) \ print tmp}' > ${dbFN?} | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 14.02.2014 08.09.2014 08.09.2014 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.4 |