Extremely slow DB2 connectivity in Java(Java 中的 DB2 连接速度极慢)
问题描述
我正在尝试从我的 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 连接速度极慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Java 中的 DB2 连接速度极慢
基础教程推荐
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 存储 20 位数字的数据类型 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
