0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SQLServerで冗長化の確認

Posted at

SSMS (SQL Server Management Studio) で確認する。

「Always On」や「可用性グループ」を見るとわかる。

image.png

  • 「読み取り可能なセカンダリレプリカ」として構成されていれば、セカンダリに対してSELECT文などの読み取り専用クエリを実行できる。

クエリで確認

SELECT
  replica_server_name,
  secondary_role_allow_connections_desc
FROM
  sys.availability_replicas;
  • secondary_role_allow_connections_descの値がREAD_ONLYなら、そのセカンダリレプリカは読み取り可能。

SSMS で確認する場合

  1. プライマリレプリカに接続。
  2. オブジェクトエクスプローラーで「AlwaysOn 高可用性」→「可用性グループ」を展開。
  3. 対象の可用性グループを選択し、「可用性レプリカ」を右クリックして「プロパティ」。
  4. 「セカンダリ ロール」の「読み取り可能セカンダリ」欄で、「はい」「読み取り専用」などが選択されていれば、そのレプリカは読み取り可能。

画面イメージはいか

+ オブジェクトエクスプローラー
  + サーバー名 (SQL Server バージョン)
    + データベース
    + セキュリティ
    + サーバーオブジェクト
    + レプリケーション
    + Always On 高可用性
      + 可用性グループ
        + [グループ名]
          + 可用性データベース
          + 可用性レプリカ
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?