Skip to main content
Querying in ClickHouse CloudThe data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the clusterAllReplicas function. See here for further details.

Description

Contains information about all successful and failed login and logout events.

Columns

Example

Query
Response

Reading rotated tables after an upgrade

When a new value is added to the interface enumeration, the table already stored on disk keeps the older Enum8 definition. On the first start of the new version, system.session_log is renamed to system.session_log_<N> and a fresh table with the current schema is created in its place; the schema of the rotated table is not changed. If a login was recorded over an interface that was missing from the enumeration of the version that wrote it — for example an ArrowFlight login on a version where ArrowFlight was absent from the interface enumeration — the rotated table contains a raw value that its own enumeration does not define, and a SELECT from it throws Unexpected value 10 in enum. Extend the enumeration of that table to read it; this is a metadata-only operation which does not rewrite any data:
Last modified on August 3, 2026