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

查看:2491
本文介绍了如何在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).

这里是DB2 for Linux / Unix / Windows v9.7信息中心文章 FORCE APPLICATION 这里 LIST APPLICATIONS 的一个。对于这两个命令,您必须对数据库实例具有适当的权限(最常见的是 SYSADM SYSCTRL ) 。

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天全站免登陆