我该如何修复 java.sql.SQLNonTransientException: java.sql.SQLNonTransientException: null DSRA0010E: SQL State = 08001, Error Code = -1,639 错误

How can i fix java.sql.SQLNonTransientException: java.sql.SQLNonTransientException: null DSRA0010E: SQL State = 08001, Error Code = -1,639 error

我在从应用程序服务器(Suse linux 机器 A)连接到数据库服务器(Suse linux 机器 B)时遇到以下问题,其中包含配置了 DB2 的 WEbSphere 应用程序服务器。请在下面找到详细信息。

ASX7015E: Exception running command: "AdminControl.testConnection('DB_NAME(cells/cell_name/nodes/node_name/servers/server1|resources.xml#dataSource_ID)')"; exception information: com.ibm.websphere.management.exception.AdminException javax.management.MBeanException java.sql.SQLNonTransientException: java.sql.SQLNonTransientException: null DSRA0010E: SQL State = 08001, Error Code = -1,639.

  1. 无法找到此错误的根本原因
  2. 无法找到此错误来自哪个服务器。

注意:此问题是在对生产问题进行一些路径更新后出现的。 WebSphere 版本为 9.0,使用 websphere internal java 和 openJPA 2.0,DB2 版本为 11.1.0.0.

sqlode -1639 是由 Db2 服务器上的文件权限不正确引起的。

看到这个technote

如果链接断开,那里给出的建议是:

Cause

This is caused by incorrect permissions and ownership of the following security files in ~/sqllib/security directory
db2chpw
db2ckpw

These files should have root as owner and must have permission -r-s--x--x
Resolving The Problem

Change the owner of the files to root

Change the permission of the files to -r-s--x--x

Update the instance using db2iupdt

除上述之外,将任何 Db2 产品的任何“修复包 0”用于 linux/unix/windows 上的生产环境总是不明智的。总是有太多愚蠢的错误早已被随后的累积修复包修复。您的问题提到 v11.1.0.0 (这是版本 11.1 的修复包 0)。最好的建议是将当前最新的修复包部署到 Db2 服务器,因此让您的 DBA 在部署到生产环境之前先在您的 development/test 环境中执行此操作。

另外考虑确保在您的 WAS 服务器上维护 Db2 jdbc 驱动程序版本,而不是继续使用 WAS 附带的(通常是旧版本)。最佳做法是使 jdbc 驱动程序的版本在 WAS 和 Db2 服务器之间保持相同,因此请保持这些版本。