Previous Topic

Next Topic

Book Contents

Book Index

Options - Cancel Queries

This option specifies whether long-running queries are able to be cancelled.

To understand this, you should realize that queries are run in two phases:

If you are running a delete or update, only the first of these two phases is applicable.

If Cancel Mode is set to None, AQT is locked during the first of these two phases. During the second phase, AQT is active and the query can be canceled by clicking on the Abort button.

There are two ways to cancel the query during the first phase:

Note on Cancelling Queries

When you click on the Abort button (with either the above options), AQT sends a Cancel request to the database. It is then up to the database as to what to do with this request. The query may not stop immediately; some databases will wish to wait until the current operation completes (for instance, it may be in the middle of a sort), which could take some time. This is out of the control of AQT.

Tools > Display Active Queries (on the Database Explorer window) shows you the current state of the queries that AQT is running.

Note for DB2/Connect Users

If you are connecting to a DB2 z/OS or DB2 for iSeries system via DB2/Connect, then you can only cancel a query if your DB2 Server supports interrupts. If it does not, you can specify that the DB2/Connect server is to handle interrupt processing. This is done by setting the INTERRUPT_ENABLED flag on the DCS entry for the connection.