问题描述
我在下面的代码中设置了queryaccelearation = all,并且出现了以下异常。
i am setting the queryaccelearation=all in below code and i am getting the below exception.
// set queryacceleration
字符串url = ;主机:60010 / DB2:user = xxxx;密码= yyyyy; specialRegisters =当前查询加速=全部;;
//set queryacceleration
String url = "host:60010/DB2:user=xxxx;password=yyyyy;specialRegisters=CURRENT QUERY ACCELERATION=ALL;";
con = DriverManager.getConnection(url,props); - ERROR: com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][10214][10050][3.62.56] java.util.Properties object passed to java.sql.Driver.connect() cannot be overridden by URL: jdbc:db2://ddcs.example.com:50010/DB2T:user=xxxxx;password=yyyyy;specialRegisters=CURRENT QUERY ACCELERATION=ALL;. ERRORCODE=-4461, SQLSTATE=42815
感谢,
Rasheed SK
Thanks,Rasheed SK
推荐答案
- 传递给java.sql.Driver.connect()的java.util.Properties对象不能被URL
您不得在URL和属性中两次指定用户名和密码。
You must not specify user and password twice - in the URL and in the properties. Exclude them from either place.
-
可以在URL中指定当前软件包集,如下所示:
Current package set cat be specified in the URL like this:
jdbc:db2:// 50010 / DB2T:specialRegisters =当前查询加速= ALL; currentPackageSet = F9DERWSl;
jdbc:db2://50010/DB2T:specialRegisters=CURRENT QUERY ACCELERATION=ALL;currentPackageSet=F9DERWSl;
这篇关于如何使用Java JDBC实现queryaccelearation = all和packageset?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!