Last updated: 2026-11-05

Session Browser

Monitor active database sessions across Oracle, SQL Server, PostgreSQL, and MySQL from a single interface. Browse running queries, inspect locks and wait events, and kill runaway sessions before they impact your workload.

Getting Started

The Session Browser gives DBAs real-time visibility into what is happening on a database server. Use it to find long-running queries, diagnose blocking chains, and terminate problematic sessions.

How to Open the Session Browser

  1. Open Jam SQL Studio and connect to the database server you want to monitor
  2. Click More → DBA → Session Browser in the main toolbar
  3. Select the connection from the dropdown
  4. The session grid loads automatically, showing all active sessions
The Session Browser grid on SQL Server with Active Only selected: a sleeping session marked Head blocker, and two waiting sessions whose Blocked By column names the session they wait on
Active Only on a SQL Server blocking chain: the sleeping head blocker is listed and marked, and Blocked By shows who each waiting session waits on.

Browsing Sessions

The main grid displays one row per active session. Each row includes the key columns a DBA needs at a glance:

  • SPID / PID - The session or process identifier
  • User - The login or role running the session
  • Database - The database context for the session
  • Status - Running, sleeping, suspended, or other engine-specific states
  • CPU - Cumulative CPU time consumed by the session
  • Reads / Writes - Logical I/O counters
  • Command - The current command type (SELECT, INSERT, AWAITING COMMAND, etc.)
  • Wait Type - The wait event the session is currently blocked on, if any
  • Blocked By - The session this one is waiting on for a lock. The session at the start of a blocking chain (it blocks others and waits on nobody) shows a Head blocker badge in this column

Filtering

The filter list above the grid has four options:

  • Active Only (the default) - Sessions that are running or waiting, plus any session another session is waiting on. A head blocker is often idle: a client opened a transaction, changed a row and went quiet (SQL Server sleeping, PostgreSQL idle in transaction, MySQL Sleep, Oracle INACTIVE). It is listed anyway, so you don't have to switch to All Sessions to find it
  • All Sessions - Every user session, idle ones included
  • By Username and By Program - Sessions whose login or program name contains the text you type (on MySQL, By Program matches the host)

Use the search box for free-text search across the grid's columns, and the refresh menu to reload the grid every 5, 10 or 30 seconds.

Session Detail

Click any row in the session grid to open the detail panel beside it. The Info tab shows:

  • Current SQL - The statement the session is running
  • Last SQL - For an idle session, the last SQL it ran, labelled so you don't mistake it for a running statement. This is usually the statement that took the locks a head blocker is holding
  • Statistics and waits - Engine-specific counters (CPU, reads, writes, elapsed time, transaction duration and similar) and the session's recent waits

Lock Viewer

The Locks tab in the session detail panel lists the locks of all user sessions on the server, so you can see both sides of a block:

  • Object - The table the lock is on. On SQL Server this includes row (KEY / RID) and page locks, which are resolved to their table in the lock's database
  • Type and mode - The lock type (row, page, table, transaction and others) and the mode held or requested (shared, exclusive, intent, schema)
  • Blocked By - The session the lock owner is waiting on
  • Blocking Tree - Above the table when anything is blocked: each tree starts at a head blocker, with the sessions waiting on it below. Hover the head blocker and click the kill icon to end its session; the tab reloads its locks afterwards
Session Browser Locks tab on SQL Server: a blocking tree from the head blocker to two waiting sessions, above the lock table with the Orders table named on KEY, PAGE and OBJECT locks
The Locks tab names the locked table and draws the blocking tree from the head blocker.

Lock Statistics (PostgreSQL 19, beta)

On a PostgreSQL 19+ connection, the Locks tab adds a Lock Statistics section below the lock table — cumulative counters from PostgreSQL 19's pg_stat_lock view, one row per lock type (relation, extend, frozenid, and others) rather than per session: Lock Type, Waits, Wait Time, and Fastpath Exceeded, accumulated since the server's last stats reset. Where the main lock table shows what's blocked right now, Lock Statistics shows the server-wide lock-contention picture over time. On PostgreSQL versions older than 19, this section simply doesn't appear — the rest of the Locks tab is unaffected.

Wait Event Analysis

The Wait Events tab breaks down where a session is spending its time. Each wait event entry shows:

  • Wait type - The specific wait event (e.g., PAGEIOLATCH_SH, LCK_M_X, ASYNC_NETWORK_IO)
  • Wait duration - How long the session has been waiting on the current event
  • Cumulative waits - Total wait time and wait count for the session's lifetime
  • Signal wait time - Time spent in the runnable queue after the resource became available

Killing Sessions

When you identify a runaway query or a session causing blocking, you can end it from the Session Browser:

  1. Click the session in the grid
  2. Click one of the kill buttons at the top of the detail panel (Info tab)
  3. Confirm the prompt

The buttons depend on the engine:

EngineFirst buttonSecond button
SQL ServerKill - KILL <spid> ends the session and rolls back its open transactionNone. SQL Server has a single KILL
OracleKill - ALTER SYSTEM KILL SESSION 'sid,serial#'Kill Immediate - the same with IMMEDIATE, which returns at once instead of waiting for a busy session to reach a point where it can be ended
PostgreSQLCancel Query - pg_cancel_backend stops the running query and keeps the connectionTerminate - pg_terminate_backend ends the connection and rolls back its open transaction
MySQLKill Query - KILL QUERY stops the running statement and keeps the connectionKill Connection - KILL ends the connection and rolls back its open transaction

Right-clicking a row in the grid runs the first button's action after a confirmation. To release a blocked chain, end the head blocker's session: on PostgreSQL and MySQL that is Terminate or Kill Connection, because cancelling the query does nothing to an idle session holding locks. The kill icon in the Lock Viewer's blocking tree always uses the action that ends the session. The grid refreshes after a kill.

Killing a session needs the engine's permission for it (for example ALTER ANY CONNECTION on SQL Server, ALTER SYSTEM on Oracle); without it the server's error is shown in a line above the grid. That line stays until you close it with its × or kill again; refreshing the list does not clear it.

Multi-Engine Support

The Session Browser works across all supported database engines, adapting its queries and kill commands to each platform:

FeatureSQL ServerOraclePostgreSQLMySQL
Session listsys.dm_exec_sessionsV$SESSIONpg_stat_activitySHOW PROCESSLIST
Kill commandKILLALTER SYSTEM KILL SESSION [IMMEDIATE]pg_cancel_backend / pg_terminate_backendKILL QUERY / KILL
Blocked By and head blockersys.dm_exec_requestsV$SESSION.BLOCKING_SESSIONpg_blocking_pids()performance_schema.data_lock_waits (INNODB_LOCK_WAITS on 5.7 and MariaDB)
Last SQL of an idle sessionLast batch (most_recent_sql_handle)PREV_SQL_IDpg_stat_activity.queryevents_statements_current (performance_schema)
Lock viewerYesYesYesYes
Wait eventsYesYesYesYes
Open cursors—Yes——
Lock Statistics——Yes (PostgreSQL 19+)—
Session detail panel for a sleeping SQL Server head blocker: the Last SQL it ran, an UPDATE of order 42, and the Kill button
The detail panel of an idle head blocker shows the last SQL it ran and the Kill button.

Key Capabilities

  • Real-time session monitoring - Browse all active sessions with key metrics including CPU, I/O, and wait information
  • Multi-engine support - Works with SQL Server, Oracle, PostgreSQL, and MySQL using native session metadata
  • Blocking chains - A Blocked By column, a Head blocker badge that also shows on idle sessions, and a Lock Viewer with table names and a blocking tree
  • Lock statistics (PostgreSQL 19, beta) - Cumulative wait counters per lock type across the whole server
  • Wait event analysis - Drill into wait types and durations to diagnose performance bottlenecks
  • Kill sessions - End a session or cancel its query with the engine's own kill commands, after a confirmation
  • Filtering - Active Only, All Sessions, by username or program, and free-text search

Frequently asked questions

How do I monitor active database sessions in Jam SQL Studio?

Open More → DBA → Session Browser, select a connection, and you'll see a live grid of all active sessions showing SPID, user, database, status, CPU usage, reads, writes, command, and wait type. Click any row for session details, including the running SQL or, for an idle session, the last SQL it ran.

How do I kill a runaway session in Jam SQL Studio?

Click the session in the Session Browser grid, then use the kill buttons at the top of the detail panel and confirm. SQL Server has one Kill (KILL). Oracle has Kill and Kill Immediate. PostgreSQL has Cancel Query and Terminate, and MySQL has Kill Query and Kill Connection; only Terminate and Kill Connection end the session and roll back its open transaction. Right-clicking a row runs the first action.

Which databases does the Session Browser support?

The Session Browser supports SQL Server, Oracle, PostgreSQL, and MySQL. Each engine uses its native session metadata (sys.dm_exec_sessions, V$SESSION, pg_stat_activity, or SHOW PROCESSLIST) and kill commands.

Can I see which session is blocking the others?

Yes. The Blocked By column shows which session each waiting session is waiting on, and the session at the start of the chain is marked Head blocker. It stays listed under Active Only even when it is idle with an open transaction. Click a session and open the Locks tab to see every lock on the server, with the table it is on, and a blocking tree that starts at the head blocker. The kill button on the head blocker ends its session.

How do I analyze wait events for a session?

The Session Browser displays wait type and wait duration directly in the main grid. For deeper analysis, click a session row and open the Wait Events tab to see a breakdown of cumulative wait statistics, including wait type, total wait time, and signal wait time.

Ready to Monitor Your Sessions?

Download Jam SQL Studio and start browsing database sessions today.