Repository: apache/shardingsphere
Issue: Sql-Server exception : The URL of JDBC is not supported. 

spring-boot 1.5.6.RELEASE
sharding-3.0.0.M3
sqlServer 2012
sqljdbc4 4.0

when I use sharding-3.0.0.M1，everything works fine
my configuration is like this sharding.jdbc.datasource.ds_0.url=jdbc:sqlserver://dev.database.chinacloudapi.cn;database=sharding;loginTimeout=30;sendStringParametersAsUnicode=false

but when I upgrade to M3, the connection fails.
report this error : The URL of JDBC is not supported. 

Changed files:
sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/H2DataSourceMetaData.java
sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/PostgreSQLDataSourceMetaData.java
sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/OracleDataSourceMetaData.java
sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/SQLServerDataSourceMetaData.java
sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/MySQLDataSourceMetaData.java

diff --git a/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/H2DataSourceMetaData.java b/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/H2DataSourceMetaData.java
index 38487251c2d..c3f0b37ad60 100644
--- a/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/H2DataSourceMetaData.java
+++ b/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/H2DataSourceMetaData.java
@@ -40,7 +40,7 @@ public final class H2DataSourceMetaData implements DataSourceMetaData {
     
     private final String schemeName;
     
-    private final Pattern pattern = Pattern.compile("jdbc:h2:(mem|~)[:/]([\\\\w\\\\-]+);?\\\\w*");
+    private final Pattern pattern = Pattern.compile("jdbc:h2:(mem|~)[:/]([\\\\w\\\\-]+);?\\\\w*", Pattern.CASE_INSENSITIVE);
     
     public H2DataSourceMetaData(final String url) {
         Matcher matcher = pattern.matcher(url);
@@ -49,7 +49,7 @@ public final class H2DataSourceMetaData implements DataSourceMetaData {
             port = DEFAULT_PORT;
             schemeName = matcher.group(2);
         } else {
-            throw new ShardingException("The URL of JDBC is not supported.");
+            throw new ShardingException("The URL of JDBC is not supported. Please refer to this pattern: %s.", pattern.pattern());
         }
     }
     
diff --git a/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/MySQLDataSourceMetaData.java b/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/MySQLDataSourceMetaData.java
index 6f307335735..b8b0a121fb8 100644
--- a/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/MySQLDataSourceMetaData.java
+++ b/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/MySQLDataSourceMetaData.java
@@ -41,7 +41,7 @@ public final class MySQLDataSourceMetaData implements DataSourceMetaData {
     
     private final String schemeName;
     
-    private final Pattern pattern = Pattern.compile("jdbc:mysql://([\\\\w\\\\-\\\\.]+):?([0-9]*)/([\\\\w\\\\-]+);?\\\\w*");
+    private final Pattern pattern = Pattern.compile("jdbc:mysql://([\\\\w\\\\-\\\\.]+):?([0-9]*)/([\\\\w\\\\-]+);?\\\\w*", Pattern.CASE_INSENSITIVE);
     
     public MySQLDataSourceMetaData(final String url) {
         Matcher matcher = pattern.matcher(url);
@@ -50,7 +50,7 @@ public final class MySQLDataSourceMetaData implements DataSourceMetaData {
             port = Strings.isNullOrEmpty(matcher.group(2)) ? DEFAULT_PORT : Integer.valueOf(matcher.group(2));
             schemeName = matcher.group(3);
         } else {
-            throw new ShardingException("The URL of JDBC is not supported.");
+            throw new ShardingException("The URL of JDBC is not supported. Please refer to this pattern: %s.", pattern.pattern());
         }
     }
    
diff --git a/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/OracleDataSourceMetaData.java b/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/OracleDataSourceMetaData.java
index 544c79c3601..9cbaf1518ad 100644
--- a/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/OracleDataSourceMetaData.java
+++ b/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/OracleDataSourceMetaData.java
@@ -41,7 +41,7 @@ public final class OracleDataSourceMetaData implements DataSourceMetaData {
     
     private final String schemeName;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:thin:@/{0,2}([\\\\w\\\\-\\\\.]+):?([0-9]*)[:/]([\\\\w\\\\-]+)");
+    private final Pattern pattern = Pattern.compile("jdbc:oracle:thin:@/{0,2}([\\\\w\\\\-\\\\.]+):?([0-9]*)[:/]([\\\\w\\\\-]+)", Pattern.CASE_INSENSITIVE);
     
     public OracleDataSourceMetaData(final String url) {
         Matcher matcher = pattern.matcher(url);
@@ -50,7 +50,7 @@ public final class OracleDataSourceMetaData implements DataSourceMetaData {
             port = Strings.isNullOrEmpty(matcher.group(2)) ? DEFAULT_PORT : Integer.valueOf(matcher.group(2));
             schemeName = matcher.group(3);
         } else {
-            throw new ShardingException("The URL of JDBC is not supported.");
+            throw new ShardingException("The URL of JDBC is not supported. Please refer to this pattern: %s.", pattern.pattern());
         }
     }
     
diff --git a/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/PostgreSQLDataSourceMetaData.java b/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/PostgreSQLDataSourceMetaData.java
index 066897eeecc..8dd813f99fc 100644
--- a/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/PostgreSQLDataSourceMetaData.java
+++ b/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/PostgreSQLDataSourceMetaData.java
@@ -41,7 +41,7 @@ public final class PostgreSQLDataSourceMetaData implements DataSourceMetaData {
     
     private final String schemeName;
     
-    private final Pattern pattern = Pattern.compile("jdbc:postgresql://([\\\\w\\\\-\\\\.]+):?([0-9]*)/([\\\\w\\\\-]+)");
+    private final Pattern pattern = Pattern.compile("jdbc:postgresql://([\\\\w\\\\-\\\\.]+):?([0-9]*)/([\\\\w\\\\-]+)", Pattern.CASE_INSENSITIVE);
     
     public PostgreSQLDataSourceMetaData(final String url) {
         Matcher matcher = pattern.matcher(url);
@@ -50,7 +50,7 @@ public final class PostgreSQLDataSourceMetaData implements DataSourceMetaData {
             port = Strings.isNullOrEmpty(matcher.group(2)) ? DEFAULT_PORT : Integer.valueOf(matcher.group(2));
             schemeName = matcher.group(3);
         } else {
-            throw new ShardingException("The URL of JDBC is not supported.");
+            throw new ShardingException("The URL of JDBC is not supported. Please refer to this pattern: %s.", pattern.pattern());
         }
     }
   
diff --git a/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/SQLServerDataSourceMetaData.java b/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/SQLServerDataSourceMetaData.java
index 791faa9aeaa..8ec50d4048f 100644
--- a/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/SQLServerDataSourceMetaData.java
+++ b/sharding-core/src/main/java/io/shardingsphere/core/metadata/datasource/dialect/SQLServerDataSourceMetaData.java
@@ -41,16 +41,16 @@ public final class SQLServerDataSourceMetaData implements DataSourceMetaData {
     
     private final String schemeName;
     
-    private final Pattern pattern = Pattern.compile("jdbc:(microsoft:)?sqlserver://([\\\\w\\\\-\\\\.]+):?([0-9]*);DatabaseName=([\\\\w\\\\-]+)");
-    
+    private final Pattern pattern = Pattern.compile("jdbc:(microsoft:)?sqlserver://([\\\\w\\\\-\\\\.]+):?([0-9]*);(DatabaseName|database)=([\\\\w\\\\-]+)", Pattern.CASE_INSENSITIVE);
+
     public SQLServerDataSourceMetaData(final String url) {
         Matcher matcher = pattern.matcher(url);
         if (matcher.find()) {
             hostName = matcher.group(2);
             port = Strings.isNullOrEmpty(matcher.group(3)) ? DEFAULT_PORT : Integer.valueOf(matcher.group(3));
-            schemeName = matcher.group(4);
+            schemeName = matcher.group(5);
         } else {
-            throw new ShardingException("The URL of JDBC is not supported.");
+            throw new ShardingException("The URL of JDBC is not supported. Please refer to this pattern: %s.", pattern.pattern());
         }
     }