Quickly validating sql server configuration settings statistics for dating violence

Default: none Assuming the OP wants a Java answer: As of JDBC3 / Java 6 there's the is Valid() method which should be used rather than inventing one's own method.The implementer of the driver is required to execute some sort of query against the database when this method id called.My intention would be to programmatically determine a statement I can use based on my database provider configuration.My SQL also supports this for compatibility reasons, but not all databases do.

Is there a database-agnostic query that's equivalently efficient but will work for all SQL databases?

Edit: If there's not (which seems to be the case), can somebody suggest a set of SQL queries that will work for various database providers?

You - as a mere JDBC user - do not have to know or understand what this query is.

All you have to do is to trust that the creator of the JDBC driver has done his/her work properly.

Famous connection pools, like Hikari CP, still have a config parameter for specifying a test query but strongly discourage to use it: 🔠connection Test Query If your driver supports JDBC4 we strongly recommend not setting this property.

quickly validating sql server configuration settings-32quickly validating sql server configuration settings-48quickly validating sql server configuration settings-29

This is for "legacy" databases that do not support the JDBC4 Valid() API.

Join our conversation (42 Comments).
Click Here To Leave Your Comment Quickly validating sql server configuration settings.

Comments:

Leave a Reply

Your email address will not be published. Required fields are marked *