출처 : http://stackoverflow.com/questions/10684244/dbcp-validationquery-for-different-databases
There is not only one validationQuery for all databases. On each database you have to use different validationQuery.
After few hours of googling and testing I have collected this table:
Database validationQuery notes
- hsqldb -
select 1 from INFORMATION_SCHEMA.SYSTEM_USERS
- Oracle -
select 1 from dual
- DB2 -
select 1 from sysibm.sysdummy1
- mysql -
select 1
- microsoft SQL Server -
select 1
(tested on SQL-Server 9.0, 10.5 [2008]) - postgresql -
select 1
- ingres -
select 1
- derby -
values 1
- H2 -
select 1
- Firebird -
select 1 from rdb$database
'DATABASE' 카테고리의 다른 글
[MS-SQL] MSSQL에서 TRUNC 구현하기 (0) | 2016.06.30 |
---|---|
[iBatis] 주요 태그 (0) | 2016.06.30 |
ROWNUM (0) | 2013.06.19 |
oracle 날짜 함수 (0) | 2013.06.18 |
SQL Gate 단축키 (0) | 2013.06.18 |