我正在尝试从我的 Java 应用程序连接到 Linux 服务器上的 IBM DB2 9 数据库.我正在使用 db2jcc.jar
(DB2 通用 JDBC 驱动程序).
I am trying to connect to an IBM DB2 9 database on a Linux server from my Java application. I am using db2jcc.jar
(DB2 Universal JDBC Driver).
建立连接需要花费大量时间.有什么问题?我知道有很多因素可能导致这种情况,但我想深入了解根本原因.
Establishing a connection is taking a ridiculous amount of time. What could be wrong? I know there are a lot of factors that could cause this, but I want to get down to the root cause.
首先我会尝试提高驱动程序的日志级别以进行调试甚至跟踪.这可能会给您一种简单的方法来查看它在尝试完成连接时挂在哪里.你在用 log4j 吗?
First off I would try to up the log level on the driver to debug or even trace. This might give you an easy way of seeing where it is hanging in it's attempt to complete the connection. Are you using log4j?
这篇关于Java 中的 DB2 连接速度极慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!