重启 DB2 服务后,应用服务器在数据库连接中得到 ERRORCODE=-4499, SQLSTATE=58009 [英] After restarting DB2 service, the application server gets ERRORCODE=-4499, SQLSTATE=58009 in database connections

查看:120
本文介绍了重启 DB2 服务后,应用服务器在数据库连接中得到 ERRORCODE=-4499, SQLSTATE=58009的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在 IBM WebSphere Application Server 7.x 上有一个应用程序,它连接到 z/os DB2 10.x 上的远程数据库.对于年度运行,DB2 关闭并重新启动.启动数据库后,我们首先得到

We have an application on IBM WebSphere Application Server 7.x and it connects to a remote database on z/os DB2 10.x. For annual operation, DB2 shut down and restarted. After starting the database, we first get

com.ibm.websphere.ce.cm.StaleConnectionException

然后我们得到

数据库管理器无法接受新请求,已终止所有正在进行的请求,或由于在目标系统检测到意外错误条件而终止了此特定请求.ERRORCODE=-4499, SQLSTATE=58009

WebSphere 和 DB2 之间的连接由 WAS 数据源中的test Connection"测试.两个系统都启动并运行,但它们之间没有正确的连接!DB2、WAS 和 JDBC 驱动程序没有变化.

The connection between WebSphere and DB2 tested by 'test Connection' in WAS datasource. Both systems are up and running but there is no correct connection between them! There was no change in DB2, WAS, and JDBC driver.

更新:JDBC 驱动程序版本是4.15.134,连接属性是IBM WebSphere 默认设置,连接直接到DB2.后来的另一个问题表明,虽然连接仍然有问题,但直接在 z/OS 的 DB2 上执行查询会得到相同的错误.该查询由一个选择和两个不同表的连接组成,在每个表上选择都可以,但最终查询不起作用并得到 ERRORCODE=-4499, SQLSTATE=58009.

Update: The JDBC driver version is 4.15.134, connection properties is IBM WebSphere default setting and the connection is direct to DB2. Another problem later showed that while the connection still has the problem, executing the query directly on z/OS's DB2 gets the same the error. The query consist of a select with a join on two different tables, selecting on each table is ok, but the final query does not work and gets ERRORCODE=-4499, SQLSTATE=58009.

更新 2环境细节是:IBM WebSphere Application Server 7.0.0.45, DB2 10.1, Java version 1.6 SR16 and z/OS 1.13.

Update 2 The detail of environment is: IBM WebSphere Application Server 7.0.0.45, DB2 10.1, Java version 1.6 SR16 and z/OS 1.13.

此特定查询在所有环境中、所有应用程序服务器、z/os SPUFI、数据库查看器(例如 DBeaver)上都会出错.

This specific query gets the error in all environments, on all application server, z/os SPUFI, database viewer, such as DBeaver.

非常感谢任何帮助.

推荐答案

最后,我们找到了解决方案,在两个表及其所有分区上运行 REORG 和 RUNSTATS,应用程序和 SPUFI 上的错误都消失了.我猜在重启过程中出了点问题,表损坏了.现在一切正常.

Finally, we found the solution, ran REORG and RUNSTATS on both tables and on all their partitions, and the error vanished both on the application and SPUFI. I guess something went wrong during restart and tables corrupted. Now everything is ok.

这篇关于重启 DB2 服务后,应用服务器在数据库连接中得到 ERRORCODE=-4499, SQLSTATE=58009的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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