473,396 Members | 1,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DB2 Connect Hangs in Shell Scripts

We're running DB2 v8.2 (fix pak 11) on Red Hat Linux Enterprise 3
(kernel 2.4.21-32) on Itanium (IA64). For a few months now, we've had
a recurring problem where a shell script that we run nightly will hang
immediately after issueing a db2 connect statement. The script runs on
the database server itself. It does connect to some remote databases.
It seems to happen at random places in the script and on random
databases. The script is pretty big and does a lot of things and
connects to many different databases. In the case of a hang, the db
connection is never established. The only way to un-hang the script is
to find the child db2 client process and kill it. The script will then
bomb-out without a database connection. We can then restart the script
and everything usually works fine. Isn't this weird? Has anyone ever
seen this? Does anyone have any suggestions?

Thanks,
Greig Wise
DBA -- Press Ganey Associates

Nov 29 '06 #1
4 3626
Has this script ever run successfully?

Sounds to me like you need to either put some debug statements in and
put out return codes and SQL error codes from each connect ... or you
may have to split the scipt into pieces and test each one. Also, you
might try correlating msgs in the db2diag.log and perhaps the errrpt to
the times when the hangs occur. You might also try to open a PMR with
support to see if they can help.

Larry Edelstein

gw***@pressganey.com wrote:
We're running DB2 v8.2 (fix pak 11) on Red Hat Linux Enterprise 3
(kernel 2.4.21-32) on Itanium (IA64). For a few months now, we've had
a recurring problem where a shell script that we run nightly will hang
immediately after issueing a db2 connect statement. The script runs on
the database server itself. It does connect to some remote databases.
It seems to happen at random places in the script and on random
databases. The script is pretty big and does a lot of things and
connects to many different databases. In the case of a hang, the db
connection is never established. The only way to un-hang the script is
to find the child db2 client process and kill it. The script will then
bomb-out without a database connection. We can then restart the script
and everything usually works fine. Isn't this weird? Has anyone ever
seen this? Does anyone have any suggestions?

Thanks,
Greig Wise
DBA -- Press Ganey Associates
Nov 29 '06 #2
Raj
We has a smiliar situation, we resolved it by activating the db before
running the batch processing.

Nov 29 '06 #3

Raj wrote:
We has a smiliar situation, we resolved it by activating the db before
running the batch processing.
The database is already activated, so this is not the issue. Also, to
answer a question from a previous posting, the script DOES work most of
the time. It's runs nightly and only fails in this manner like once a
week.

Greig Wise

Nov 29 '06 #4
In article <11*********************@h54g2000cwb.googlegroups. com>,
gw***@pressganey.com says...
We're running DB2 v8.2 (fix pak 11) on Red Hat Linux Enterprise 3
(kernel 2.4.21-32) on Itanium (IA64). For a few months now, we've had
a recurring problem where a shell script that we run nightly will hang
immediately after issueing a db2 connect statement. The script runs on
the database server itself. It does connect to some remote databases.
It seems to happen at random places in the script and on random
databases. The script is pretty big and does a lot of things and
connects to many different databases. In the case of a hang, the db
connection is never established. The only way to un-hang the script is
to find the child db2 client process and kill it. The script will then
bomb-out without a database connection. We can then restart the script
and everything usually works fine. Isn't this weird? Has anyone ever
seen this? Does anyone have any suggestions?

Thanks,
Greig Wise
DBA -- Press Ganey Associates

The only thing I can recommend is to put the 'db2 terminate' command
just before each 'db2 connect' statement. This will also force the
background connection process and it is automatically restarted when
running the 'db2 connect' statement.
Nov 29 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: eichin | last post by:
One of my recent projects has involved taking an accretion of sh and perl scripts and "doing them right" - making them modular, improving the error reporting, making it easier to add even more...
9
by: Jeff Wagner | last post by:
I have a project of converting numerous DOS cmd shell scripts to Python. Is there a tutorial to getting started? Thanks, Jeff
0
by: Ian | last post by:
Dear All, I just downloaded & installed MYSQL. It seemed to work and I can start it and enter my password and change a directory but that is about all. I have been ready and playing "hit & miss"...
10
by: Ed Stevens | last post by:
A tale of woe, and a question . . . Last week my boss said to me "we've installed DB2 Connect on this Solaris box. Make it work." Now, I've barely seen DB2 Connect on Windows, having fumbled...
6
by: Paolo | last post by:
Hello, I am getting no response when trying to connect to one of our databases. The funny thing is that it only happens when trying to connect using a specific user. Other users are able to...
2
by: Pierre Rouleau | last post by:
Hi all, I have a consistent test case where os.popen3() hangs in Windows. The system hangs when retrieving the lines from the child process stdout. I know there were several reports related to...
4
by: Anastasios Hatzis | last post by:
I'm looking for a pattern where different client implementations can use the same commands of some fictive tool ("foo") by accessing some kind of API. Actually I have the need for such pattern for...
1
by: creeds | last post by:
Hello , I am thinking of performing databse operation using shell scripts , for example i am in need to delete sum number from database very often so if i just run a shell scripts and give that...
3
by: techquest | last post by:
Hi, I want to connect into oracle database and export the table data into a flat file using UNIX shell scripts. I cant use other GUI tools to do this, as the dataload will be in millions. hence if...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.