DROP SESSION

Use the DROP SESSION command to abort and remove a session.

Syntax

Syntax for dropping a session:
DROP SESSION <session_id>

Input

The DROP SESSION command takes the following input:
Table 1. DROP SESSION input
Input Description
<session_id> The ID of the session to be dropped.

Outputs

The DROP SESSION command produces the following outputs:
Table 2. DROP SESSION outputs
Output Description
DROP SESSION The command was successful.
ERROR: id '<session_id>' does not correspond to an existing session. The indicated session ID does not exist.
ERROR: system session id '<session_id>' cannot be aborted The indicated session ID is a system session. Users cannot roll back transactions of a system session.
ERROR: access denied. You must have ABORT privileges to perform this action You do not have permission to roll back the transaction of the indicated session.
ERROR: session abort failed for session <session_id>; reason is '<reason>' The attempt to roll back the transaction in the indicated session failed.

Privileges

You must be the admin user, the owner of the session, or your account must have Abort privileges for the user who is the owner of the session or for the User object class.

Usage

The following provides sample usage:
  • Drop the session with the ID 17044:
    MYDB.SCH1(USER)=> DROP SESSION 17044;