JDBC Snippets
Last modified by christoph_lechleitner@iteg_at on 2015-05-23 06.25:19
Typical JDBC URLs and validation Queries
The JDBC URL links usually refer to what we presume to be the most recent product version at the time we googled the links, earlier versions might not support all URL parameters.
Database | Driver class name | JDBC URL Example | JDBC URL Links | validation Query recommendation |
|---|---|---|---|---|
Apache Derby | org.apache.derby.jdbc.EmbeddedDriver | jdbc:derby:[subsubprotocol:]MYDATABASE |
| |
MySQL | com.mysql.jdbc.Driver | jdbc:mysql://myserver:3306/MYDATABASE | SELECT 1 | |
MS SQL Server | com.microsoft.sqlserver.jdbc.SQLServerDriver | jdbc:sqlserver://myserver:1433;databaseName=MYDATABASE | SELECT 1 | |
Oracle | oracle.jdbc.driver.OracleDriver | jdbc:oracle:thin:@myserver:1521:MYTNS | SELECT SYSDATE FROM DUAL | |
PostgreSQL | org.postgresql.Driver | jdbc:postgresql://myserver:5432/MYDATABASE | SELECT 1 | |
SQLite | org.sqlite.JDBC | jdbc:sqlite:/var/foo/MYDATABASE.db | - |
|