Connection Problems

gtalpers

Member
Greetings!

I am using DOA components in an ISAPI dll to access several Oracle databases. I sometimes get ORA-03113-end of file on communication channel and ORA-03114-not connected to Oracle errors if one of the servers I am accessing goes down. I have to reboot my server in order to re-establish connections with the database.

Is there a way to avoid this??? Can the Session Component somehow reconnect?
TIA for any help!

Gary
 
The only way to reconnect a session is by calling TOracleSession.CheckConnection. This first checks if the session is still okay, and if not, attempts to reconnect.

------------------
Marco Kalter
Allround Automations
 
Thanks for your help Marco!

Is there a preferred way or time to use the CheckConnection method? Do I need to check before every query?

Thanks Again - Gary
 
The best moment to check this is before a transaction, or any sequencee of SQL statements that are logically grouped together and need to be executed as one.

If you call CheckConnection with the Reconnect parameter set to True, then it may be necessary to perform some clean-up actions in your application if the session is reconnected. DataSets and Queries will be closed, because the session has effectively been logged off and logged on.

------------------
Marco Kalter
Allround Automations
 
Hi,

i have one additional question about Checkconnection. What actions will DOA perform against the server when you call Checonnection ?

Thanks,

Lars
 
--->Is there a way to avoid this???

I had the same problem, setting the property ThreadSafe to true of the oraclesession all works fine.

[This message has been edited by ROLF (edited 01 February 2002).]
 
CheckConnection will fire a simple "select 'x' from dual" and will interpret the results to determine if the session is still alive. If it is not, it will try to logon again.

------------------
Marco Kalter
Allround Automations
 
Back
Top