How to detect Oracle is shutting down.

rakgol_a

Member²
Hi,
I have server that does backround processing; and I need to detect if the server is shutting down so as to retry reconnections on some intervals.

I also would like to know is the database is very busy or not; if possible.
 
You can use TOracleSession.CheckConnection to verify if a session is still alive.

If you attempt to logon while a database is shutting down, you will get a "ORA-01014: Oracle shutdown in progress" exception. If it is already shutdown, you will get a different message, depending on the configuration.

I'm not sure how to detect a "very busy" server though.

------------------
Marco Kalter
Allround Automations
 
TOracleSession.CheckConnection will never raise an exception. All exceptions are handled and returned as ccError.

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