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