1. 程式人生 > >db2 SQL6036N解決辦法

db2 SQL6036N解決辦法

問題背景:

資料庫在進行大量的運算和資料處理的過程中,IO、CPU等資源消耗非常高的時候,強制停止資料庫。db2stop force

結果資料庫命令遲遲沒有響應。這個時候對資料庫進行其他操作均無響應,執行啟動命令,返回SQL6036N。此時說明資料庫已經hung了。

或 除錯儲存過程,導致資料庫hung,想要通過控制中心重啟下db2,結果長時間沒有任何反應,再想重新連線時報錯,如下

SQL6036N  START 或 STOP DATABASE MANAGER 命令已在處理之中。

 

db2stop 命令同樣會報相同的錯

解決辦法:

刪除/home/username/sqllib/ctrl/db2strst.lck檔案,預設這個檔案是空的。

執行db2_kill,會提示:Application ipclean:Removing DB2 engine and client IPC resources for db2name.

重新啟動db2start,檢視資料庫的活動狀態:db2 list active databases 會顯示當前活動庫,這時候說明資料庫已經恢復正常了。

 

 

 

 

-------------------------參考-------------------------

http://www-01.ibm.com/support/docview.wss?uid=swg21427711

Unable to start or stop db2 - DB2 is hung

   

Technote (troubleshooting)


Problem(Abstract)

SQL6036N: START or STOP DATABASE MANAGER command is already in progress.

Symptom

DB2 will not start or stop.


Cause

DB2 is hung.

Diagnosing the problem

SQL6036N maybe seen when issuing db2stop or db2start, or the command may hang.

Resolving the problem

In some cases, db2 will appear to be hung and will not respond to db2stop or db2start. The db2 commands will give the following message:

SQL6036N: START or STOP DATABASE MANAGER command is already in progress.

To force the db2 to shut down, open a db2 client command line window and issue:
db2_kill

Note: restarting the database or recycling the system may also resolve the issue.

 

Product Alias/Synonym

TSM

----------------------------------end-----------------------------------