

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# FSx for Windows File Server を使用して Amazon EC2 で Microsoft SQL Server フェイルオーバークラスターを設定する
<a name="microsoft-sql-failover-cluster-on-amazon-ec2"></a>

*Amazon Web Services、Sweta Krishna および Ramesh Babu Donti*

## 概要
<a name="microsoft-sql-failover-cluster-on-amazon-ec2-summary"></a>

フェイルオーバークラスターインスタンス (FCI) を備えた Microsoft SQL Server Standard Edition は、SQL Server Enterprise よりもコスト効率の高い代替手段を提供できます。SQL FCI をセットアップするには、ノード間の共有ファイルストレージが必要です。[Amazon FSx for Windows File Server](https://aws.amazon.com/fsx/windows/)は、アベイラビリティーゾーン間で自動的かつ同期的にレプリケートする、フルマネージドストレージを提供します。Amazon FSx は、汎用ファイル共有用の組み込みデータ重複排除を使用してストレージコストを削減し、サードパーティーソリューションを維持する必要性を排除します。Amazon FSx は以下の内容もサポートします。
+ 前払い料金や契約は不要で、使用した分だけ支払います。
+ Amazon FSx を共有ストレージとして手動で FCI を設定します。
+ SQL クラスターのファイル共有監視として Amazon FSx を使用します。
+ Amazon FSx for Windows File Server は、継続的に利用可能なファイル共有のための Server Message Block (SMB) 3.0 をサポートしており、SQL Server FCI のデプロイに適しています。

## 前提条件と制限
<a name="microsoft-sql-failover-cluster-on-amazon-ec2-prereqs"></a>

**前提条件**
+ アクティブな [AWS アカウント](https://aws.amazon.com/account/)。
+ Amazon Virtual Private Cloud (Amazon VPC) リソース、Amazon Elastic Compute Cloud (Amazon EC2) インスタンス、セキュリティグループ、および AWS Identity and Access Management (IAM) ロールを作成および管理するためのアクセス許可。
+ AWS Managed Microsoft AD または独自のオンプレミス Active Directory。
+ フェイルオーバークラスターをセットアップするために[必要なアクセス許可](https://learn.microsoft.com/en-us/windows-server/failover-clustering/configure-failover-cluster-accounts)を持つ Active Directory ドメインユーザー。
+ 安全なハイブリッド接続のための SQL Server FCI および [Microsoft Active Directory ポート](https://docs.aws.amazon.com/whitepapers/latest/access-workspaces-with-access-cards/ip-address-and-port-requirements.html)のセキュリティグループルール。
+ SQL ノード間で適切なアクセス許可が設定された、Active Directory for SQL Server の[サービスアカウント](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-windows-service-accounts-and-permissions?view=sql-server-ver16#sql-server-failover-cluster-instance)。
+ フェイルオーバークラスター内の Amazon FSx for Windows File Server。
+ SQL Server インストールバイナリ。

**制限事項**
+ 一部の AWS のサービス は、すべてで利用できるわけではありません AWS リージョン。利用可能なリージョンについて、詳しくは「[AWS のサービス by Region](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/)」をご確認ください。特定のエンドポイントについては、「[Service endpoints and quotas page](https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html)」から、サービスのリンクを選択してご確認ください。

**製品バージョン**
+ Amazon EC2 for Windows Server 2012 R2 以降
+ 現在のすべての Windows Server バージョンを含む Amazon FSx for Windows File Server
+ 共有ストレージの代替手段としての Amazon FSx for NetApp ONTAP
+ SQL Server 2012/2016/2019/2022

## アーキテクチャ
<a name="microsoft-sql-failover-cluster-on-amazon-ec2-architecture"></a>

**テクノロジースタック**
+ Amazon EC2
+ Amazon FSx for Windows File Server
+ Amazon VPC
+ AWS Directory Service
+ AWS Systems Manager
+ IAM

**ターゲットアーキテクチャ**

次の図は、Amazon FSx for Windows File Server を使用した Amazon EC2 での Microsoft SQL Server FCI のアーキテクチャの概要を示しています。

![Amazon FSx for Windows File Server を使用した Amazon EC2 での Microsoft SQL Server FCI のアーキテクチャ図。](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/images/pattern-img/208bf64a-8fef-4019-944a-723372450885/images/ba0c9169-9536-41c3-ae8e-7264dcc3e1ad.png)


**ネットワークインフラストラクチャ**
+ Amazon VPC は、3 つのアベイラビリティーゾーンにまたがるネットワークコンテナを提供します。
+ プライベートサブネットは、リソースをデプロイするために、各アベイラビリティーゾーンに分離されたサブネットを提供します。

**コンピューティングレイヤー**
+ Amazon EC2 には、Windows Server フェイルオーバークラスター (WSFC) の一部としてアベイラビリティーゾーン 1 にデプロイされた SQL Server クラスターノード 1 が含まれています。
+ Amazon EC2 には、WSFC の一部としてアベイラビリティーゾーン 2 にデプロイされた SQL Server クラスターノード 2 が含まれています。
+ WSFC クラスターは、フェイルオーバー機能のために両方の SQL Server ノードを接続します。

**Amazon FSx for Windows File Server のストレージレイヤー**

**マルチ AZ FSx デプロイ (アベイラビリティーゾーン 1 と 2 にまたがる)**
+ アベイラビリティーゾーン 1 のプライマリ FSx ファイルシステムは、アクティブな SQL Server データとログファイルをホストします。
+ アベイラビリティーゾーン 2 のセカンダリ FSx ファイルシステムは、自動フェイルオーバー機能を提供します。
+ SQL Server データベースの両方のクラスターノードからアクセスできる、SMB ファイル共有 (\\\\fsx.domain\\sqlshare)。

**シングル AZ FSx デプロイ (AZ3 内)**
+ アベイラビリティーゾーン 3 の Amazon FSx ファイルサーバー監視は、クラスタークォーラム監視として機能します。
+ ファイル共有監視 (`\\fsx.domain\witness`) はクラスタークォーラムを維持し、スプリットブレインのシナリオを防止します。

**ディレクトリサービス**
+ AWS Managed Microsoft AD は、クラスター機能に必要な Windows 認証とドメインサービスを提供します。

**高可用性機能**
+ マルチ AZ コンポーネントは、アベイラビリティーゾーン間で耐障害性を提供します。
+ FSx スタンバイファイルサーバーは、プライマリサーバーに障害が発生した場合に自動フェイルオーバーを提供します。
+ ファイル共有監視は、アベイラビリティーゾーン 3 でクラスタークォーラム管理を提供し、障害発生時にクラスターが適切に機能するようにします。
+ ドメインは、シームレスな Windows 認証 AWS Managed Microsoft AD のために と統合されています。

## ツール
<a name="microsoft-sql-failover-cluster-on-amazon-ec2-tools"></a>

**AWS のサービス**
+ [Amazon Elastic Compute Cloud (Amazon EC2)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) は、 AWS クラウドでスケーラブルなコンピューティング容量を提供します。仮想サーバーを必要な数だけ起動して、迅速にスケールアップまたはスケールダウンができます。
+ [Amazon FSx](https://docs.aws.amazon.com/fsx/?id=docs_gateway) は、業界標準の接続プロトコルをサポートし、 AWS リージョン全体で高い可用性とレプリケーションを提供するファイルシステムを提供します。
+ [Amazon Virtual Private Cloud (Amazon VPC)](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html) は、定義した仮想ネットワークに AWS リソースを起動するのに役立ちます。この仮想ネットワークは、ユーザー自身のデータセンターで運用されていた従来のネットワークと似ていますが、 AWSのスケーラブルなインフラストラクチャを使用できるという利点があります。
+ [AWS Directory Service for Microsoft Active Directory](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/directory_microsoft_ad.html) は、ディレクトリ対応のワークロードと AWS リソースが で Microsoft Active Directory を使用できるようにします AWS クラウド。
+ [AWS Identity and Access Management (IAM)](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html) は、誰を認証し、誰に使用する権限を付与するかを制御することで、 AWS リソースへのアクセスを安全に管理するのに役立ちます。
+ [AWS Systems Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html) は、 AWS クラウドで実行されるアプリケーションとインフラストラクチャの管理に役立ちます。これにより、アプリケーションとリソースの管理が簡素化され、運用上の問題を検出して解決する時間を短縮し、 AWS リソースを大規模に安全に管理できます。

## ベストプラクティス
<a name="microsoft-sql-failover-cluster-on-amazon-ec2-best-practices"></a>
+ データベースインスタンスをプライベートサブネットに配置して、インターネットからパブリックにアクセスできないようにしながら、 に接続 AWS のサービス して更新を実行できるようにします。
+ PowerShell を使用して Amazon FSx for Windows File Server を管理するには、「[Administering FSx for Windows file systems](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/administering-file-systems.html)」を参照してください。

## エピック
<a name="microsoft-sql-failover-cluster-on-amazon-ec2-epics"></a>

### SQL Server 用の Amazon EC2 ノードを作成および設定する
<a name="create-and-configure-ec2-nodes-for-sql-server"></a>


| タスク | 説明 | 必要なスキル | 
| --- | --- | --- | 
| 名前とタグを追加します。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) | DBA | 
| Windows AMI を選択します。 | SQL Server の要件を満たす Windows 用の Amazon マシンイメージ (AMI) を選択します。 | DBA | 
| インスタンスのタイプを選択します。 | 要件を満たす Amazon EC2 インスタンスタイプを選択します。 | DBA | 
| キーペアを使用します。 | キーペアを使用すると、インスタンスに安全に接続できます。インスタンスを起動する前に、選択したキーペアにアクセスできることを確認してください。 | DBA | 
| ネットワーク設定を構成します。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) | DBA | 
| [ネットワークの詳細設定] を設定します。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) | DBA | 
| ストレージを設定します。 | 必要な合計ストレージを設定し、必要なストレージタイプを選択します。 | DBA | 
| 高度な詳細を設定し、インスタンスを起動します。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) | DBA | 
| ノード 2 を作成します。 | これらのステップを繰り返して、ノード 2 を作成して設定します。 | DBA | 

### ノード 1 と 2 に Windows Server フェイルオーバークラスターをインストールして設定する
<a name="install-and-configure-windows-server-failover-cluster-on-nodes-1-and-2"></a>


| タスク | 説明 | 必要なスキル | 
| --- | --- | --- | 
| ノード 1 にログインします。 | 管理者として、Windows Amazon EC2 インスタンスにログインします。 | DBA | 
| ノード 1 に FCI 機能をインストールします。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html)<pre>Install-WindowsFeature -Name Failover-Clustering -IncludeManagementTools</pre>[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) | DBA | 
| ノード 2 にログインします。 | 管理者として、Windows Amazon EC2 インスタンスにログインします。 | DBA | 
| ノード 2 に FCI 機能をインストールします。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html)<pre>Install-WindowsFeature -Name Failover-Clustering -IncludeManagementTools</pre>[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) | DBA | 
| 新しいノードをクラスターに追加します。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) | DBA | 
| クラスターをオンラインにします。 | クラスターをオンラインにするには、両方のノードの静的 IP アドレスを更新します。[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) | DBA | 
| クラスターを検証します。 | **[Failover Cluster Manager]** に移動し、クラスターコアリソースがオンラインであることを確認します。 | DBA | 

### ノード 1 と 2 に SQL Server をインストールする
<a name="install-sql-server-on-nodes-1-and-2"></a>


| タスク | 説明 | 必要なスキル | 
| --- | --- | --- | 
| サーバーにログインします。 | 管理者として Amazon EC2 インスタンスにログインします。 | DBA | 
| SQL バイナリをマウントします。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) |  | 
| フェイルオーバークラスターにノード 2 を追加します。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) | DBA | 

### Amazon FSx ファイル共有監視を設定する
<a name="configure-the-fsx-file-share-witness"></a>


| タスク | 説明 | 必要なスキル | 
| --- | --- | --- | 
| クォーラム設定を構成します。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/patterns/microsoft-sql-failover-cluster-on-amazon-ec2.html) | DBA | 
| DNS の詳細を取得します。 | Amazon FSx コンソールで、**[マネージド AD]**、**[アタッチ]** の順に選択します。DNS は次の形式である必要があります。`\\example.example.net\share` | DBA | 
| ファイル共有監視を設定します。 | **[Amazon FSx ファイル共有パス]**、**[完了]** の順に選択します。 | DBA | 

## 関連リソース
<a name="microsoft-sql-failover-cluster-on-amazon-ec2-resources"></a>

**AWS リソース**
+ [Amazon FSx for Windows File Server](https://www.youtube.com/watch?v=IMDWTIShlyI) (ビデオ)
+ [Deep dive on Amazon FSx for Windows File Server](https://www.youtube.com/watch?v=_x_Geur93oc) (ビデオ)
+ [Amazon EBS マルチアタッチを使用して SQL Server フェイルオーバークラスターを Windows Server にデプロイする方法](https://aws.amazon.com/blogs/modernizing-with-aws/how-to-deploy-a-sql-server-failover-cluster-with-amazon-ebs-multi-attach-on-windows-server/) (AWS ブログ記事)
+ [Amazon FSx for Windows File Server を使用して Microsoft SQL Server の高可用性デプロイを簡素化する](https://aws.amazon.com/blogs/storage/simplify-your-microsoft-sql-server-high-availability-deployments-using-amazon-fsx-for-windows-file-server/) (AWS ブログ記事)
+ [Amazon FSx for NetApp ONTAP を使用した SQL Server の高可用性デプロイ](https://aws.amazon.com/blogs/modernizing-with-aws/sql-server-high-availability-amazon-fsx-for-netapp-ontap/) (AWS ブログ記事)
+ 「[Microsoft SQL Server で FSx for Windows File Server を使用する](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/sql-server.html)」
+ [FSx for Windows File Server とは](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/what-is.html)

**その他のリソース**
+ [フェイルオーバークラスターを作成する](https://learn.microsoft.com/en-us/windows-server/failover-clustering/create-failover-cluster?pivots=windows-admin-center)

## 追加情報
<a name="microsoft-sql-failover-cluster-on-amazon-ec2-additional"></a>

**ファイル共有監視を設定する**

Amazon FSx セキュリティグループにインバウンド接続を許可するルールを追加して、両方のノードからファイルシステムに接続していることを確認します。SMB ポートを許可する必要があります。例えば、DNS 名が `\\example.example.com\share` の場合は `\\example.example.com\share` を使用します。Always On 可用性クラスターのファイル共有監視にも同じ値を使用します。ファイル共有監視を設定するには、次の手順を実行します。

1. RDP を使用して、Amazon EC2 インスタンスに接続します。

1. **[Failover Cluster Manager]** に移動します。

1. コンテキスト (右クリック) メニューを開き、**[その他のアクション]** を選択します。

1. **[クラスタークォーラム設定を構成]** を選択します。

1. [**次へ**] を選択します。

1. **[クォーラム設定]** を選択し、ファイル共有監視を設定します。

1. DNS 名を指定します。

1. 概要を確認し、**[完了]** を選択します。ファイル共有監視は、**[クラスターコア]** リソースセクションでオンラインになっている必要があります。