> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Replicated データベースの情報と状態を含むシステムテーブル。

# system.database_replicas

<div id="description">
  ## 説明
</div>

各 Replicated データベース のレプリカに関する情報が含まれています。

<div id="columns">
  ## カラム
</div>

* `database` ([String](/ja/reference/data-types)) — 属している Replicated データベースの名前。
* `is_readonly` ([UInt8](/ja/reference/data-types)) — データベースのレプリカが読み取り専用モードかどうか。
* `max_log_ptr` ([Int32](/ja/reference/data-types)) — 一般的なアクティビティのログにおける最大エントリ番号。
* `replica_name` ([String](/ja/reference/data-types)) — ClickHouse Keeper 内のレプリカ名。
* `replica_path` ([String](/ja/reference/data-types)) — ClickHouse Keeper 内のレプリカデータへのパス。
* `zookeeper_path` ([String](/ja/reference/data-types)) — ClickHouse Keeper 内のデータベースデータへのパス。
* `shard_name` ([String](/ja/reference/data-types)) — クラスター内の分片名。
* `log_ptr` ([Int32](/ja/reference/data-types)) — レプリカが実行キューにコピーした一般的なアクティビティのログにおける最大エントリ番号に 1 を加えた値。
* `total_replicas` ([UInt32](/ja/reference/data-types)) — このデータベースで認識されているレプリカの総数。
* `zookeeper_exception` ([String](/ja/reference/data-types)) — 最後の例外メッセージ。ClickHouse Keeper から情報を取得中にエラーが発生した場合に返されます。
* `is_session_expired` ([UInt8](/ja/reference/data-types)) — ClickHouse Keeper とのセッションの有効期限が切れているかどうか。基本的には `is_readonly` と同じです。

<div id="example">
  ## 例
</div>

```sql theme={null}
SELECT * FROM system.database_replicas FORMAT Vertical;
```

```text theme={null}
Row 1:
──────
database:            db_2
is_readonly:         0
max_log_ptr:         2
replica_name:        replica1
replica_path:        /test/db_2/replicas/shard1|replica1
zookeeper_path:      /test/db_2
shard_name:          shard1
log_ptr:             2
total_replicas:      1
zookeeper_exception: 
is_session_expired:  0
```
