How do I launch Microsoft SQL Server on an EC2 Windows instance?

6 minuto de leitura
0

I want to launch Microsoft SQL Server on my Amazon Elastic Compute Cloud (Amazon EC2) Windows instance.

Short description

New SQL environment deployments are classified under three categories:

  • SQL Server standalone
  • SQL Server failover cluster instances (FCI)
  • SQL Server Always On availability groups (AG)

Resolution

You can use the AWS Launch Wizard to launch Microsoft SQL Server on your EC2 instance. AWS Launch Wizard supports all SQL Server deployment options. For more information, see What is AWS Launch Wizard for SQL Server?

Prerequisites

Before you begin this process, review the following information:

  • Complete the steps found on Prerequisites for using SQL Server on Amazon EC2.
  • The Failover Clustering feature activates the built-in availability form of clustering in Windows Server. This feature allows you to build a Windows Server Failover Cluster (WSFC) to use with an AG or FCI.
  • Always On is an umbrella term for the availability features in SQL Server. The term covers both availability groups and FCIs. Always On isn't the name of the AG feature.
  • The major difference between FCI and AG is that all FCIs require some sort of shared storage, even if it's provided through networking. One node can run and own the FCI's resources at any given time. An AG doesn't require shared storage to be highly available. It's a best practice to have local replicas in one data center for high availability and remote in other data centers for disaster recovery. Each replica must have separate storage.
  • Each AG has it's own component called the listener. The listener allows applications and end users to connect without needing to know which SQL Server instance hosts the primary replica.
  • For a list of supported versions and requirements, review Using SQL Server in Windows on the Microsoft website.

Deploy SQL Server standalone

  1. Open the AWS Launch Wizard console.
  2. In the navigation pane, choose MS SQL Server.
  3. Choose Create Deployment.
  4. On the Review Permissions page, under IAM role, choose Next. The Launch Wizard creates the AmazonED2RoleForLaunchWizard AWS Identity and Access Management (IAM) role. The IAM role lets the Launch Wizard access other AWS services on your behalf.
  5. On the Configure application settings page, enter the following information:
    For Operating System type, choose Windows.
    Under Deployment model, for Model options, choose Single instance.
    Complete the Configure application settings page. For more information, see Deploy an application with AWS Launch Wizard for SQL Server on Windows. Then, choose Next.
  6. On the Define Infrastructure Requirements page, choose either Infrastructure suggestion or Instance type. Then, choose Next.
  7. On the Review and Deploy page, choose Deploy.

Deploy SQL Server Always On availability group (AG)

Launch Wizard console

  1. Open the AWS Launch Wizard console.
  2. In the navigation pane, choose MS SQL Server.
  3. Choose Create Deployment.
  4. On the Review Permissions page, under IAM role, choose Next. The Launch Wizard creates the AmazonED2RoleForLaunchWizard IAM role. The IAM role lets the Launch Wizard access other AWS services on your behalf.
  5. On the Configure application settings page, enter the following information:
    For Operating System type, choose Windows.
    Under Deployment model, for Model options, choose High availability.
    Choose Always on availability group.
    Complete the Configure application settings page. For more information, see Deploy an application with AWS Launch Wizard for SQL Server on Windows. Then, choose Next.
  6. On the Define Infrastructure Requirements page, choose either Infrastructure suggestion or Instance type. Then, choose Next.
  7. On the Review and Deploy page, choose Deploy.

AWS Cloud
You can also deploy a SQL Server Always On availability group from the AWS Cloud. To do so, complete the steps in How do I create an SQL Server Always On availability group cluster in the AWS Cloud?

Deploy SQL Server FCI

Launch Wizard console

  1. Open the AWS Launch Wizard console.
  2. In the navigation pane, choose MS SQL Server.
  3. Choose Create Deployment.
  4. On the Review Permissions page, under IAM role, choose Next. The Launch Wizard creates the AmazonED2RoleForLaunchWizard AWS Identity and Access Management (IAM) role. The IAM role lets the Launch Wizard access other AWS services on your behalf.
  5. On the Configure application settings page, enter the following information:
    For Operating System type, choose Windows.
    Under Deployment model, for Model options, choose High availability.
    Choose Always on Failover Cluster Instances availability group. For information on storage options, see Amazon FSx for Failover Clustering (FCI).
    Complete the Configure application settings page. For more information, see Deploy an application with AWS Launch Wizard for SQL Server on Windows. Then, choose Next.
  6. On the Define Infrastructure Requirements page, choose either Infrastructure suggestion or Instance type. Then, choose Next.

AWS Cloud

  1. Deploy either Amazon FSx for NetApp ONTAP or Amazon FSx for Windows File Server.
  2. Use remote desktop protocol (RDP) to connect to one of the virtual machines (machine A).
  3. On the Failover Cluster Manager, move all core cluster resources to machine A.
  4. Find the installation media. If the virtual machine uses an AMI, then the media is located at C:\SQLServerSetup\Setup media.
  5. Choose Setup. Then, in the SQL Server Installation Center, choose Installation.
  6. Choose New SQL Server failover cluster installation and follow the instructions in the wizard to install the SQL Server FCI.
    Note: The FCI data directories must be on clustered storage. For Amazon FSx NetApp ONTAP, connect to the file system over iSCSI.
  7. Use RDP to connect to the other virtual machine (machine B).
  8. Open the SQL Server Installation Center, and then choose Installation.
  9. Choose Add node to a SQL Server failover cluster. Follow the instructions in the wizard to install SQL Server and add the server to the FCI.

Connecting to SQL Server

After you deploy SQL Server on your instance, use on of the following tools to connect to your instance:

Related information

How do I troubleshoot Microsoft SQL issues on my EC2 Windows instance?

How do I upgrade my Microsoft SQL cluster on my EC2 Windows instances?

Best practices for deploying Microsoft SQL Server on Amazon EC2

Deploy Microsoft SQL Server on Amazon EC2

AWS OFICIAL
AWS OFICIALAtualizada há 7 meses