简体   繁体   English

DAL01013:无法连接到服务器

[英]DAL01013: Cannot connect to server

I'm trying to connect to DB2 db but getting the error:我正在尝试连接到 DB2 db,但出现错误:

DAL01013. Cannot create connection to server 'Unknown server' due to the following: [jcc][t4][2034][11148][3.69.24] Execution failed due to a distribution protocol error that caused deallocation of the conversation.
A DRDA Data Stream Syntax Error was detected.  Reason: 0x3. ERRORCODE=-4499, SQLSTATE=58009

Assume it's something with my system.假设它与我的系统有关。 I cannot connect neither via DataStudio nor via QMF.我既无法通过 DataStudio 也无法通过 QMF 进行连接。 Other users from other system can.来自其他系统的其他用户可以。 I use same jdbc drivers.我使用相同的 jdbc 驱动程序。 My system is Windows 7. Is there anything else I need to adjust on my system?我的系统是 Windows 7。我的系统还有什么需要调整的吗?

Generally you get the reason 0x3 from error -4499 out of the IBM JDBC driver when you are connecting to a SSL port, but you have not specified sslConnection=true on your JDBC connection string.通常,当您连接到 SSL 端口时,您会从 IBM JDBC 驱动程序中的错误-4499得到原因0x3 ,但您没有在 JDBC 连接字符串上指定sslConnection=true You can also get the error if your database name is incorrect (ie does not exist on the server), or your JDBC dirver is too old ( DB2 JDBC Driver Versions and Downloads Download Fix Packs by version for IBM Data Server Client Packages )如果您的数据库名称不正确(即服务器上不存在),或者您的JDBC 驱动程序太旧,您也可能收到错误消息( DB2 JDBC 驱动程序版本和下载按版本为 IBM 数据服务器客户端包下载修复包

If connecting to Db2 on Cloud, Db2 Warehouse or Db2 Warehouse on Cloud, all you should need is the sslConnection=true as the CA certificate used in these products is part of the Db2 driver package (for recent drivers anyway)如果连接到 Db2 on Cloud、Db2 Warehouse 或 Db2 Warehouse on Cloud,您只需要sslConnection=true因为这些产品中使用的 CA 证书是 Db2 驱动程序包的一部分(无论如何都适用于最近的驱动程序)

If connecting to Db2 on premise, you can specify your certificate location via the JDBC properties sslCertLocation or sslTrustStoreLocation and sslTrustStorePassword如果连接到本地 Db2,您可以通过 JDBC 属性sslCertLocationsslTrustStoreLocationsslTrustStorePassword指定您的证书位置

Common IBM Data Server Driver for JDBC and SQLJ properties for all supported database products 适用于所有受支持数据库产品的通用 IBM 数据服务器驱动程序 JDBC 和 SQLJ 属性

sslCertLocation Specifies that an application can configure the location of a trusted certificate file. sslCertLocation指定应用程序可以配置受信任证书文件的位置。 For applications that have the database server certificate, sslCertLocation is the only property that is needed to be configured to instruct IBM Data Server Driver for JDBC and SQLJ to trust the certificate for SSL connections.对于具有数据库服务器证书的应用程序,sslCertLocation 是唯一需要配置以指示 IBM Data Server Driver for JDBC and SQLJ 信任 SSL 连接证书的属性。 This property removes the need to import the certificate into a Java truststore database and related driver configurations.此属性消除了将证书导入 Java 信任库数据库和相关驱动程序配置的需要。

Error codes issued by the IBM Data Server Driver for JDBC and SQLJ IBM Data Server Driver for JDBC and SQLJ 发出的错误代码

error codes in the ranges -4200 to -4299, and -4450 to -4499 are reserved for the IBM® Data Server Driver for JDBC and SQLJ. -4200 到 -4299 和 -4450 到 -4499 范围内的错误代码是为 IBM® Data Server Driver for JDBC and SQLJ 保留的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM