If an activity is consuming too many resources, or is running too long, you can cancel it. Cancelling an activity is gentler than forcing the application that submitted the activity. A cancelled activity returns SQL4725N to the user, but does not end the connection or affect any other user activity. Forcing the application ends both the connection and user activities.
You can only explicitly cancel an activity if a coordinator activity is currently working on a request for the activity. If you cancel an activity in the IDLE state (that is, no requests are being processed), the activity is placed in the CANCEL_PENDING state and is cancelled on the next request that is received. For example, if you attempt to cancel a CURSOR activity between fetches, the SQL4725N error is not returned to the user until the next fetch after the cancel.
All user activities are cancellable, including the load utility and stored procedures.
To cancel an activity: