Thread: DB2 Connection Issue
09-16-04, 15:34 #1Registered User
- Join Date
- Sep 2004
Unanswered: DB2 Connection Issue
DB2 Connection Issue
Platform: Windows Server 2003 Enterprise Edition
Version: DB2 version 8.1 Fix Pack 6
Server: Dell PowerEdge 2600
When connecting to DB2 using the CLI/ODBC Settings via the Microsoft ODBC Data Source Administrator, the first connection takes 15 seconds. Subsequent connections take 1 second. After about 30 to 40 seconds have elapsed since the first connection, the next connection takes 15 seconds again, with subsequent connections taking 1 second. If we wait for 30 to 40 seconds between each connection attempt, each attempt takes 15 seconds. This behavior is consistent when the server is part of an existing Domain. When the server is removed from the domain and is used as a standalone computer, every single connection attempt takes 1 second. This behavior is also exhibited by other 3rd party software attempting to connect to DB2. We would like for all authentication to be handled locally on the server (without contacting the domain controller). The user account that we use for connections resides locally on the server.
What Windows or DB2 settings can be changed so that connection attempts consistently take 1 second when the server is part of the existing domain?
09-16-04, 17:35 #2Registered User
- Join Date
- May 2003
I would look at 2 things. First, when your DB2 system is started, issue the activate db command for the database (see the Command Reference). This keeps all memory allocations active even if no one is connected to the database. Otherwise, DB2 releases these resources when the last connection is disconnected, and then has to reallocate them for the first connection.
The other thing to consider is whether you should use the ODBC driver supplied by IBM, rather than Microsoft (although I am not sure if that is what you are doing). Many people have reported problems with non-IBM ODBC drivers for DB2.M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
09-16-04, 18:20 #3:-)
Provided Answers: 1
- Join Date
- Jun 2003
- Toronto, Canada
the reasons you're mentioning are of course valid, however they would cause the same delays regardless of whether the server is in a Windows domain or not. I suspect the real reason is the time DB2 spends trying to authenticate users.
Even if the users are local to the server they may belong to groups, which could be defined at the domain. I would first make sure that DB2_GRP_LOOKUP is set to LOCAL and probably make use of cached credentials.
To check current value of the registry variable, issue "db2set db2_grp_lookup"; set it to LOCAL,TOKENLOCAL if it's not so.
There's a detailed discussion regarding Windows authentication in "Administration Guide: Implementation"