【解决方案】DB2连接报错57019处理

db2 连接库时

db2 connect to TESTDB
SQL1117N  A connection to or activation of database "TESTDB" cannot be made 
because of ROLL-FORWARD PENDING.  SQLSTATE=57019

由于前滚等待,连接不能被创建

执行以下命令处理

-- 前滚到日志末尾后停止
db2 rollforward db testdb to end of logs and stop

再次连接即可

db2 connect to testdb

执行脚本时

db2 -tvf aaa.sql
SQL1035N The operation failed because the specified database connot be 
connected to in the mode requested. SQLSTATE=57019

这种情况可能是当前脚本需要断开所有数据库连接后执行,而目前仍有数据库连接存在,执行

db2 force application all
db2stop
db2start
db2 -tvf aaa.sql

如何查看当前数据库已存在的连接

db2 list applications
posted @ 2021-03-15 18:31  浮生若梦z  阅读(3750)  评论(0编辑  收藏  举报