How to kill a process/query in DB2

╄→гoц情女王★ 提交于 2019-12-10 16:37:49

问题


I try to optimize a query. After every change, I must wait long time that the query is finished. It is really time consuming.

Is there any way to see the executed queries and kill/stop them??


回答1:


In the DB2 instance command line, you can type

db2 list applications show detail

In this list, you should find your process, note the application id. You can use this command to kill it:

db2 force application (xx)

Where xx is the ID (or a comma-delimited list of IDs).

Here is the DB2 for Linux/Unix/Windows v9.7 Information Center article on FORCE APPLICATION, and here is the one for LIST APPLICATIONS. For both of these commands, you have to have the proper privileges on the database instance (most commonly SYSADM or SYSCTRL).



来源:https://stackoverflow.com/questions/9681668/how-to-kill-a-process-query-in-db2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!