CheckConnection / Logon / Threads

mengue

Member²
I have a program wich have a main program (deplhi) and two threads for serial communications. When the database goes down (for backup,...) I check the connection and, if necessary, try to reconnect. When I try to reconnect all threads stops or run very, very slow. Why the main program inteferenres in the threads at checkconnection or logon ?

Tranks.
 
Do your threads use the same TOracleSession instance? If so, they may interfere with eachother when one thread tries to disconnect or reconnect a session on a server that is shutdown.

------------------
Marco Kalter
Allround Automations
 
When you attempt to reconnect a TOracleSession and the server is down, it may be that SQL*Net/Net8/Net9 (whichever you are using) is using a lot of CPU cycles. I cannot imagine why though, because it should simply be waiting for a response from the server.

What Windows version and SQL*Net/Net8/Net9 version are you using?

------------------
Marco Kalter
Allround Automations
 
Net 8.0.4 on Windows NT.
See that the CPU free continues 99% on try to reconnect.
See that if I place the checkconnection/logon in a separated thread this problem not occurs (main program wich "checkconnection(FALSE)", thread 1 and 2 with serial communication and without SQL, thread 3 with a "checkconnection(TRUE) / logon".

What Windows version and SQL*Net/Net8/Net9 version are you using?

[/B][/QUOTE]
 
See also that thread 3 with "checkconnection(TRUE)" the TOracleSession is a pointer to the TOracleSession in main program...
 
Back
Top