Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Terminating a session

Focus mode
Terminating a session - Amazon Relational Database Service

To terminate a session, use the Amazon RDS procedure rdsadmin.rdsadmin_util.kill. The kill procedure has the following parameters.

Parameter name Data type Default Required Description

sid

number

Yes

The session identifier.

serial

number

Yes

The serial number of the session.

method

varchar

null

No

Valid values are 'IMMEDIATE' or 'PROCESS'. If you specify IMMEDIATE, it has the same effect as running the following statement:

ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE

If you specify PROCESS, you terminate the processes associated with a session. Only specify PROCESS if terminating the session using IMMEDIATE was unsuccessful.

To get the session identifier and the session serial number, query the V$SESSION view. The following example gets all sessions for the user AWSUSER.

SELECT SID, SERIAL#, STATUS FROM V$SESSION WHERE USERNAME = 'AWSUSER';

The following example terminates a session.

BEGIN rdsadmin.rdsadmin_util.kill( sid => sid, serial => serial_number, method => 'IMMEDIATE'); END; /

The following example terminates the processes associated with a session.

BEGIN rdsadmin.rdsadmin_util.kill( sid => sid, serial => serial_number, method => 'PROCESS'); END; /
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.