Skip to content

Commit

Permalink
update oracle validator query
Browse files Browse the repository at this point in the history
  • Loading branch information
aiceflower committed Jan 2, 2025
1 parent d87ef5b commit 131d887
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ protected DataSource buildDataSource(String dbUrl, Map<String, String> propertie
DruidDataSource datasource = new DruidDataSource();
LOG.info("Database connection address information(数据库连接地址信息)=" + dbUrl);
datasource.setUrl(dbUrl);
if (dbUrl.toLowerCase().contains("oracle")) {
datasource.setValidationQuery("SELECT 1 FROM DUAL");
}
datasource.setUsername(username);
if (AESUtils.LINKIS_DATASOURCE_AES_SWITCH.getValue()) {
// decrypt
Expand Down

0 comments on commit 131d887

Please sign in to comment.