2020-10-28 22:00:04 +00:00
|
|
|
# system.errors {#system_tables-errors}
|
|
|
|
|
2020-12-09 14:03:38 +00:00
|
|
|
Contains error codes with the number of times they have been triggered.
|
2020-10-28 22:00:04 +00:00
|
|
|
|
|
|
|
Columns:
|
|
|
|
|
|
|
|
- `name` ([String](../../sql-reference/data-types/string.md)) — name of the error (`errorCodeToName`).
|
|
|
|
- `code` ([Int32](../../sql-reference/data-types/int-uint.md)) — code number of the error.
|
2020-12-09 15:50:58 +00:00
|
|
|
- `value` ([UInt64](../../sql-reference/data-types/int-uint.md)) — the number of times this error has been happened.
|
2021-03-08 20:16:46 +00:00
|
|
|
- `last_error_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — time when the last error happened.
|
2021-03-08 20:31:51 +00:00
|
|
|
- `last_error_message` ([String](../../sql-reference/data-types/string.md)) — message for the last error.
|
2021-03-08 20:39:19 +00:00
|
|
|
- `last_error_stacktrace` ([String](../../sql-reference/data-types/string.md)) — stacktrace for the last error.
|
2021-03-08 19:05:51 +00:00
|
|
|
- `remote` ([UInt8](../../sql-reference/data-types/int-uint.md)) — remote exception (i.e. received during one of the distributed query).
|
2020-10-28 22:00:04 +00:00
|
|
|
|
|
|
|
**Example**
|
|
|
|
|
|
|
|
``` sql
|
2021-03-08 19:05:51 +00:00
|
|
|
SELECT name, code, value
|
2020-10-28 22:00:04 +00:00
|
|
|
FROM system.errors
|
|
|
|
WHERE value > 0
|
|
|
|
ORDER BY code ASC
|
|
|
|
LIMIT 1
|
|
|
|
|
|
|
|
┌─name─────────────┬─code─┬─value─┐
|
|
|
|
│ CANNOT_OPEN_FILE │ 76 │ 1 │
|
|
|
|
└──────────────────┴──────┴───────┘
|
|
|
|
```
|