Monday, February 20, 2012

Is my database connection alive and viable?

Currently, our application is issuing a 'select count(*) from systypes' command to check to see if the database connection is live (has not been reaped by the firewall.) This is somewhat inefficient. Perhaps a less expensive way to implement this functionality is to issue a ping statement to the instance? At least a more simple SQL query is needed.

I'm sure this function is typical in application architecture. What recommendations do you have for confirming that a database connection is alive and viable from the application?

Stephanie

One way is "select 1"...

No comments:

Post a Comment