DB2 Connection hang

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

DB2 Connection hang

Ralf
Hi All,

we have a problem with connections to a DB2 database. Apparently our application hangs when trying to connect to the database and you can only kill the process. Unfortunately, the behavior can not be easily reproduced, it sometimes occurs or not. Most of the time, if the catalog entry for the database binding was recreated. It then helps to connect over the command line tool, query a table and disconnect. Then our program can connect to the database and will work.
So I wanted to try to connect to the database without a catalog entry, but instead of server name, port and database name. Maybe it can solve the problem. Unfortunately, I do not find any clue for this, if and if so, how I can do that. So I'm grateful for any help.

Thanks

Ralf

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/cc531c0b-d563-4aa3-a278-305a2f114378%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: DB2 Connection hang

jtuchel
Ralf,

we've seen issues similar to what you describe. We can connect, but some queries will not be answered in reasonable time (while the exact same sql issued on the command line will be answered by the same database quickly and nicely),
In our case, it helps to issue an "db2 force application all" on the db server. This is only feasible in a test environment, obviuosly. We get a db2 connection error and can reconnect without restarting the image in such cases. We've tried to find hints as to what causes these hickups, but so far we found nothing.

So this message is not much more than a warm "you are not alone". But maybe that helps a little ;-)

Joachim



Am Dienstag, 29. Oktober 2019 19:13:51 UTC+1 schrieb Ralf:
Hi All,

we have a problem with connections to a DB2 database. Apparently our application hangs when trying to connect to the database and you can only kill the process. Unfortunately, the behavior can not be easily reproduced, it sometimes occurs or not. Most of the time, if the catalog entry for the database binding was recreated. It then helps to connect over the command line tool, query a table and disconnect. Then our program can connect to the database and will work.
So I wanted to try to connect to the database without a catalog entry, but instead of server name, port and database name. Maybe it can solve the problem. Unfortunately, I do not find any clue for this, if and if so, how I can do that. So I'm grateful for any help.

Thanks

Ralf

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/b4694956-587e-4c10-bf22-4aed4c635808%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: DB2 Connection hang

Wayne Johnston
In reply to this post by Ralf
Ralf, I don't know what you mean by "the catalog entry for the database binding was recreated".  But we have applications that use DB2 a great deal, and I don't remember a problem with connecting to the database (except of course if we are up against MAXAPPLS).  Also the fact that a command line connect/query/disconnect happens to fix things sounds weird as well.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/2d96d25d-70e4-487f-bba5-68db9f42957f%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: DB2 Connection hang

Ralf
In reply to this post by Ralf
Thanks Joachim, for your warm words.:)

@Wayne Sorry, my english is not so good. For a DB2 connection normally you "catalog" the server and then the database on your client machine. So the client know the connection informations for the database you will connect. But, you can connect to the database without catalog entry, give servername, port, databasename and credentials, JDBC as example can do so, Delphi too. Delphi is using CLI, thats is why I think that Smalltalk can do as well.What I need is the knowledge for a DB2 connection via Smalltalk without catalog entry for testing. Our customer is a bit angry and I need a solution to the problem.


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/4b5b1925-200c-4ff4-b834-3749b4b634e6%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: DB2 Connection hang

jtuchel
Ralf,

I am not sure you can use the CLI driver to connect to an uncataloged db. My DB2-knowledge is too limited for this.
But I would guess that a good test would be if you can use the DB2 cli on your client machine (the one running the Smalltalk image) without any problems when this happens. It should be possible to do a "db2 connect to myDB user user using pw" in a DB" command line. This way you can probably find out quite quickly if you have a Smalltalk or a DB2 configuration problem.

Having to uncatalog and re-catalog pretty much sounds like a DB2 problem to me..... *headscratch*



Joachim


Am Mittwoch, 30. Oktober 2019 10:42:09 UTC+1 schrieb Ralf:
Thanks Joachim, for your warm words.:)

@Wayne Sorry, my english is not so good. For a DB2 connection normally you "catalog" the server and then the database on your client machine. So the client know the connection informations for the database you will connect. But, you can connect to the database without catalog entry, give servername, port, databasename and credentials, JDBC as example can do so, Delphi too. Delphi is using CLI, thats is why I think that Smalltalk can do as well.What I need is the knowledge for a DB2 connection via Smalltalk without catalog entry for testing. Our customer is a bit angry and I need a solution to the problem.


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/1ad75713-530c-48cd-866d-f498608d652c%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: DB2 Connection hang

jtuchel
Another question: which of the ca. 140 different DB2 client products are you using on your machines?
What platforn are you on?


Am Mittwoch, 30. Oktober 2019 11:39:32 UTC+1 schrieb Joachim Tuchel:
Ralf,

I am not sure you can use the CLI driver to connect to an uncataloged db. My DB2-knowledge is too limited for this.
But I would guess that a good test would be if you can use the DB2 cli on your client machine (the one running the Smalltalk image) without any problems when this happens. It should be possible to do a "db2 connect to myDB user user using pw" in a DB" command line. This way you can probably find out quite quickly if you have a Smalltalk or a DB2 configuration problem.

Having to uncatalog and re-catalog pretty much sounds like a DB2 problem to me..... *headscratch*



Joachim


Am Mittwoch, 30. Oktober 2019 10:42:09 UTC+1 schrieb Ralf:
Thanks Joachim, for your warm words.:)

@Wayne Sorry, my english is not so good. For a DB2 connection normally you "catalog" the server and then the database on your client machine. So the client know the connection informations for the database you will connect. But, you can connect to the database without catalog entry, give servername, port, databasename and credentials, JDBC as example can do so, Delphi too. Delphi is using CLI, thats is why I think that Smalltalk can do as well.What I need is the knowledge for a DB2 connection via Smalltalk without catalog entry for testing. Our customer is a bit angry and I need a solution to the problem.


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/74c5e2ec-3ac7-48bc-9672-8902b8243e4d%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: DB2 Connection hang

jtuchel
And yet another one: have you taken a look at the db2diag.logs on both the DB and the client machines? Do these offer any insights?

Joachim



Am Mittwoch, 30. Oktober 2019 11:41:48 UTC+1 schrieb Joachim Tuchel:
Another question: which of the ca. 140 different DB2 client products are you using on your machines?
What platforn are you on?


Am Mittwoch, 30. Oktober 2019 11:39:32 UTC+1 schrieb Joachim Tuchel:
Ralf,

I am not sure you can use the CLI driver to connect to an uncataloged db. My DB2-knowledge is too limited for this.
But I would guess that a good test would be if you can use the DB2 cli on your client machine (the one running the Smalltalk image) without any problems when this happens. It should be possible to do a "db2 connect to myDB user user using pw" in a DB" command line. This way you can probably find out quite quickly if you have a Smalltalk or a DB2 configuration problem.

Having to uncatalog and re-catalog pretty much sounds like a DB2 problem to me..... *headscratch*



Joachim


Am Mittwoch, 30. Oktober 2019 10:42:09 UTC+1 schrieb Ralf:
Thanks Joachim, for your warm words.:)

@Wayne Sorry, my english is not so good. For a DB2 connection normally you "catalog" the server and then the database on your client machine. So the client know the connection informations for the database you will connect. But, you can connect to the database without catalog entry, give servername, port, databasename and credentials, JDBC as example can do so, Delphi too. Delphi is using CLI, thats is why I think that Smalltalk can do as well.What I need is the knowledge for a DB2 connection via Smalltalk without catalog entry for testing. Our customer is a bit angry and I need a solution to the problem.


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/f74a6e07-0835-4f04-bf5d-e08358c7ccdd%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: DB2 Connection hang

Ralf
Hello Joachim

I have no idea which excatly version of DB2 our costumer is using. He has a few dfifferent enviroments with different servers. And so far as I know, no infos in db2diag. For me, I have found a solution to connect to DB2 without catalog. The connection string can include the server name and port. An example:

Driver={IBM DB2 ODBC DRIVER};Database=DBNAME;Hostname=db2servername;Port=50000;Protocol=TCPIP;Uid=UID;Pwd=password

will work under windows. The bad news: On Linux it will not work without a few changes. The good news, I could use the windows code under Linux, so it will run now.

My curses, which I have expelled while reading the Linux code, I'll leave that aside.
 
I will inform here, when I have a feedback from our costumer.

If you are looking for the classes, start with AbtIbmCliDatabaseConnection, AbtIbmCliDatabaseManager


Am Mittwoch, 30. Oktober 2019 11:43:06 UTC+1 schrieb Joachim Tuchel:
And yet another one: have you taken a look at the db2diag.logs on both the DB and the client machines? Do these offer any insights?

Joachim



Am Mittwoch, 30. Oktober 2019 11:41:48 UTC+1 schrieb Joachim Tuchel:
Another question: which of the ca. 140 different DB2 client products are you using on your machines?
What platforn are you on?


Am Mittwoch, 30. Oktober 2019 11:39:32 UTC+1 schrieb Joachim Tuchel:
Ralf,

I am not sure you can use the CLI driver to connect to an uncataloged db. My DB2-knowledge is too limited for this.
But I would guess that a good test would be if you can use the DB2 cli on your client machine (the one running the Smalltalk image) without any problems when this happens. It should be possible to do a "db2 connect to myDB user user using pw" in a DB" command line. This way you can probably find out quite quickly if you have a Smalltalk or a DB2 configuration problem.

Having to uncatalog and re-catalog pretty much sounds like a DB2 problem to me..... *headscratch*



Joachim


Am Mittwoch, 30. Oktober 2019 10:42:09 UTC+1 schrieb Ralf:
Thanks Joachim, for your warm words.:)

@Wayne Sorry, my english is not so good. For a DB2 connection normally you "catalog" the server and then the database on your client machine. So the client know the connection informations for the database you will connect. But, you can connect to the database without catalog entry, give servername, port, databasename and credentials, JDBC as example can do so, Delphi too. Delphi is using CLI, thats is why I think that Smalltalk can do as well.What I need is the knowledge for a DB2 connection via Smalltalk without catalog entry for testing. Our customer is a bit angry and I need a solution to the problem.


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/0a3b6c66-38ac-4006-9fbe-0ca1857a5d1c%40googlegroups.com.