Now a request has come in to modify the code so that the thread does not shut down. Instead, the code is being modified to check the primary database first, then, if the connection fails or is lost, then switch to the replicated database that resides elsewhere.
At some point, when the primary database is available again, I would like to reconnect to it. Does anyone know of a clean way to ping/query the database to see if it is available without actually connecting to that database? I don’t want to disconnect from the replicated one and attempt to reconnect to the primary only to find it is still down. (We connect at startup not with each message). Also, I’ve attempted to use the tnsping utility that is on the Cloverleaf box but I am getting a “permission denied” error.
Any help would be greatly appreciated….
Tom Rioux