'Does DB2Connect pause while querying Active Directory?

Our system uses DB2Connect to access data stored on a mainframe zOS DB2 system. Occasionally we see that DB2Access will pause for some seconds. Our system is a C# application, which runs on a windows server. We use this package to connect to DB2

https://www.nuget.org/packages/IBM.Data.DB2.Core/3.1.0.500

We managed capture this pause on a Wireshark trace First, we see traffic flowing nicely to and from the DB2 system enter image description here

Then DB2 traffic will then pause, and we see a lot of traffic to and from our AD enter image description here

After some seconds, AD traffic stops and we see traffic to and from the DB2-system again enter image description here

Comments have asked questions about the connection string. User is a shared user of all requests (an application user), connection string is build like this:

        var builder = new DB2ConnectionStringBuilder
        {
            Server = db2FailoverStatusEnum == Db2FailoverStatusEnum.PrimaryNode ? PrimaryServer() : BackupServer(),
            Database = db2FailoverStatusEnum == Db2FailoverStatusEnum.PrimaryNode ? PrimaryDbName() : BackupDbName(),
            UserID = _db2Descriptor.Db2User,
            Password = PasswordReplacement,
            Authentication = "SERVER_ENCRYPT",
            ClientWorkstationName = Environment.MachineName,
            ClientApplicationName = ApplicationName(),
            ProgramId = ApplicationName().ToUpper(),
            ProgramName = ApplicationName().ToUpper(),
            Connect_Timeout = 20,
            ConnectionLifeTime = 1200,
            DisableCursorHold = true,
            MinPoolSize = 20,
            MaxPoolSize = 50,
            QueryTimeout = 30,
            StatementConcentrator = "Literals",
        };

Also our connection usage is pretty much by the book, I believe (not real production SQL). We use Dapper to help interpret results

    using var connection = GetConnection();
    var result = await connection.QueryAsync("select name, creator from sysibm.systables fetch first 10000 rows only");

Does anyone have experience with DB2Connect making queries to AD?

And is there a way to avoid that, as it delays our connection to DB2?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source