By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,440 Members | 1,872 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,440 IT Pros & Developers. It's quick & easy.

DB2 Connect Hangs in Shell Scripts

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
Raj
We has a smiliar situation, we resolved it by activating the db before
running the batch processing.

Nov 29 '06 #3

P: n/a

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.