Show Sessions

Summary

The SHOW SESSIONS command returns a result set containing information about all active user sessions in your Connect environment. A session is established when someone (or a program) logs into Connect using valid credentials.

Syntax

show sessions;

Parameters

None.

Details

The SHOW SESSIONS result set includes the following columns:

Column Name
Data Type
Description
id string Unique identifier for each session.
username string The user account tied to the session.
current boolean ‘true’ if the session belongs to the client application that issued the show sessions command. In other words, current identifies if the session belongs to you and the SQL client you are currently using.
alive_for string The length of time the session has been active. Given in hours, minutes, and seconds.
expires_in string Connect will timeout sessions that have been inactive for more than 20 minutes. Each query issued via the session resets the countdown clock. Given in minutes and seconds.
created_by string The user account who established the session.
created_instant instant The UTC instant when the session was first established.
modified_by string The user account who last used the session.
modified_instant instant The UTC instant when the session was last used.

 

Examples

show sessions;

screen-shot-2016-09-19-at-1-31-58-pm

select id, username, expires_in from (show sessions);

screen-shot-2016-09-19-at-1-31-53-pm

Related Commands

DROP CURSOR

DROP SESSION

SHOW CURSORS

SHOW LIMITS