Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

与最新SQLserver jdbc驱动兼容问题 #150

Closed
boying52 opened this issue Sep 30, 2016 · 1 comment
Closed

与最新SQLserver jdbc驱动兼容问题 #150

boying52 opened this issue Sep 30, 2016 · 1 comment

Comments

@boying52
Copy link

boying52 commented Sep 30, 2016

public String getDatabaseProductName() throws SQLServerException {
this.checkClosed();
return "Microsoft SQL Server";
}

新驱动的PN是这个,导致不能转换shardingDataSource

@hanahmily
Copy link
Contributor

该方法在主流数据库驱动中一般都是显示声明了一个字符串,数据库与该字符串对应关系如下:

  • H2 : "H2"
  • MySQL : "MySQL"
  • Oracle :"Oracle"
  • SQLServer :"Microsoft SQL Server"

可以观察到只有微软的SQLServer较为特殊。

对于IBM的DB2情况较为复杂,从驱动的源代码看该值不是显示声明而是从数据库动态获取的。从jdbc驱动文档中看取值可能由于安装的平台不同而不同。

故sjdbc针对DB2将使用其“DB2 for Linux, UNIX, and Windows on Linux on x86”平台上的名字"DB2"

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants