如何在 DB2 中终止进程/查询 [英] How to kill a process/query in DB2

查看:31
本文介绍了如何在 DB2 中终止进程/查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试优化查询.每次更改后,我必须等待很长时间才能完成查询.真的很费时间.

有什么方法可以查看执行的查询并杀死/停止它们?

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??

推荐答案

在DB2实例命令行中,可以输入

In the DB2 instance command line, you can type

db2 list applications show detail

在此列表中,您应该找到您的进程,记下应用程序 ID.你可以用这个命令杀死它:

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

db2 force application (xx)

其中 xx 是 ID(或以逗号分隔的 ID 列表).

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

这里是关于 FORCE APPLICATION 的 DB2 for Linux/Unix/Windows v9.7 信息中心文章和 这里是一个列表应用程序.对于这两个命令,您必须对数据库实例具有适当的权限(最常见的是 SYSADMSYSCTRL).

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).

这篇关于如何在 DB2 中终止进程/查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆