ESQL connection check
Posted in 1997
Topics: Installation, Setup & Upgrades, Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL
Hello, Does anybody know of an efficient way to check the health of a connection? The code I've inherited makes a connection at startup, then uses that connection the whole time it is up (almost 24 hours each day). This is fine most of the time - it reduces the overhead of making a connection for every db transaction, but when the engine is taken down, we run into problems. I'm handling SIGPIPE, but that only comes into play when box itself is rebooted. There is a periodic health check that does an sqldone(), but that does not tell us that the connection is bad. Is there a simple way to test the connection, other than writing a small query? We're using 7.12.UC1 Pyramid Nile 150 SMP_DC-OS rel d87, about to upgrade to some flavor of 7.23 on HPUX, so if there's an improvement in that release I can wait for it. Oh, the engine is coming down in a PANIC. I found the reason for that, (someone was yanking my shared memory & semaphore) and it's being fixed, but I still want to handle this type of situation in the future. Thanks, Teresa