Oracle ODBC (Native) and Visual Basic ADO 2.5 Timeouts and Hanging Clients
We have a program using Visual Basic ADO 2.5 with Oracle ODBC Native for 8.1.7 and 8.1.6 connecting an Oracle 22.214.171.124 database. In the field, many Visual Basic clients upload data via Oracle ODBC to a central database. The network we are finding out is not the best. Intermittently we have network blips, although the network folks have been unable to find anything. What we see is the following:
Intermittently connections and commands to the database will hang and wait for a TCP/IP response back. We never see a session still residing on the database. Indicating that the session went inactive on the db and was cleaned up by Oracle, but the client never receives an error, meaning Net8 or ODBC never raises an error.
We have reproduced this in a very hokey way. We coded up a vb client and a stored proc. The vb client calls the proc, and the proc loops until we insert a record into table. At the exact same time the record is inserted we pull the network connection out of the client for a split second and put it back in. Presumably, the stored proc returns a response to the vb client, but b/c the client is off the network, the packet is lost. As a result, the client hangs and no error is raised. Yesterday, Oracle Tech Support said this is by design, which is very bizarre.
We have obtained SQLNET logs for the clients hanging. The trace is at the bottom of the post.
We also have talked to Microsoft re: ADO 2.5. They have indicated that the network handle should occur at the ODBC level.
The hang can occur on a ado.connection open, or any type of ado.command execution. We use the Connection Timeout in ADO, but we do not see any errors raised from it - the connection open stills hang even with the connection timeout set. Recently we have changed to asynchronous processing on the ado.connection open, but we haven't seen the error again, so we don't know if it works. We have the Command Timeout property set that should presumably handle hangs on executes but this only works 9 out of 10 times. Sometimes a hung command will timeout and sometimes it won't.
If anyone has seen any behavior that is similar, I would appreciate any guidance or thoughts you would have on this. Oracle has been bouncing us between the Network group and the ODBC group, and they haven't given us much guidance.