【解决方案】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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM