Java中极慢的DB2连接 [英] Extremely slow DB2 connectivity in Java

查看:429
本文介绍了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连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆