Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / November 2006

Tip: Looking for answers? Try searching our database.

DB2 Connect Hangs in Shell Scripts

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gwise@pressganey.com - 29 Nov 2006 14:31 GMT
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
Larry - 29 Nov 2006 14:34 GMT
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

> 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
[quoted text clipped - 13 lines]
> Greig Wise
> DBA -- Press Ganey Associates
Raj - 29 Nov 2006 14:39 GMT
We has a smiliar situation, we resolved it by activating the db before
running the batch processing.
gwise@pressganey.com - 29 Nov 2006 16:30 GMT
> 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
Gert van der Kooij - 29 Nov 2006 23:55 GMT
> 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
[quoted text clipped - 13 lines]
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.