This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 89f1e93  [Fix][api] Fix build parameter error of sqlserver when 
create. (#4015)
89f1e93 is described below

commit 89f1e93bcf936b527856f658e33fe38ead5ec8b9
Author: t1mon <[email protected]>
AuthorDate: Sun Nov 15 19:56:37 2020 +0800

    [Fix][api] Fix build parameter error of sqlserver when create. (#4015)
    
    * [fix-#3962][api] Avoid ClassCastException for LoggerService.queryLog().
    
    * [Fix][api] Fix build parameter error of sqlserver when create.
---
 .../apache/dolphinscheduler/api/service/DataSourceService.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/DataSourceService.java
 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/DataSourceService.java
index 74c2f69..d21a64c 100644
--- 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/DataSourceService.java
+++ 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/DataSourceService.java
@@ -499,7 +499,13 @@ public class DataSourceService extends BaseService {
 
         String address = buildAddress(type, host, port, connectType);
         Map<String, Object> parameterMap = new LinkedHashMap<String, 
Object>(6);
-        String jdbcUrl = address + "/" + database;
+        String jdbcUrl;
+        if (DbType.SQLSERVER == type) {
+            jdbcUrl = address + ";databaseName=" + database;
+        } else {
+            jdbcUrl = address + "/" + database;
+        }
+
         if (Constants.ORACLE.equals(type.name())) {
             parameterMap.put(Constants.ORACLE_DB_CONNECT_TYPE, connectType);
         }

Reply via email to