473,231 Members | 1,786 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,231 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 3611
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: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.