SlideShare a Scribd company logo
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Baris Furtinalar
Microsoft Specialist Solutions Architect
AWS
Best Practices for Running Microsoft
SQL Server on AWS
Gianluca Hotz
Microsoft SQL Server MVP
UGISS
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Agenda
• Where can I run SQL Server on AWS?
• Amazon RDS for SQL Server
• Optimizing Performance for SQL Server on EC2
• High Availability Best Practices for SQL Servers on AWS
• Migrating SQL Server to EC2
• Q&A
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Where can I run my SQL Server workloads on AWS?
Amazon Relational Database Service
(Amazon RDS)
Managed service with up to 128 vCPU, 4TBRAM, and 16 TB storage
Amazon Elastic Compute Cloud
(Amazon EC2)
Self-managed virtual machine with up to 448 vCPU, 24TB RAM, and 400-TB storage
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Amazon RDS for SQL Server SQL Server on Amazon EC2
Customer managed
AWS managed
Power, HVAC, net
OS Install/Maintenance
OS Patching
DBMS Install/Maintenance
DBMS Patching
Database Backups
High Availability
Scaling
Power, HVAC, net
OS Install/Maintenance
OS Patching
DBMS Install/Maintenance
DBMS Patching
Database Backups
High Availability
Scaling
• Consider RDS first
• Focus on business
value tasks
• High-level tuning asks
• Schema optimization
• No in-house database
expertise
• Need full control over
DB instance
• Backups
• Replication
• Clustering
• Options that are not
available in RDS
Options for Deploying SQL Server on AWS
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
SQL Server Features at a Glance
2012 – 2019
Versions Supported:
Editions Supported:
High Availability:
Encryption:
Authentication:
Backups:
Maintenance:
Express, Web, Standard, Enterprise
All
All
AWS-managed
TDE, Column-level, Always Encrypted, TLS, EBS encryption
Self-managed; AlwaysOn, Mirroring…
Windows & SQL Authentication
AWS- managed Self-managed
AWS- managed Self-managed
Amazon RDS Amazon EC2
BI Stack: SSIS, SSRS, SSAS (tabular) All
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Amazon RDS with SQL Server
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Amazon RDS: Hassle-free flexibility
• Instance type selection:
• t3 instances for lower cost
• m5/m5d instances
• r5/z1d/x1e instances for more RAM
• EBS volume type selection:
• GP2 volumes for lower cost
• IO1 volumes for I/O intensive, critical workloads
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Compute and Storage Scaling
Scale Compute to
Handle Increased Load
Up to 128 vCPUs
4TiB of RAM
Scale Storage for
Larger Data Sets
Scalable EBS storage up to 16TiB
Scale Down to
Control Costs
As little as 4 vCPU and
16 GiB of RAM
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Automated backups, Snapshots and Native Backups
• Backup and restore directly to and from S3 bucket
• Supports Compression
• Only full & diff backups (no t-log)
• Full, diff & t-log restores
• Multi-file backup/restore
Amazon
RDS SQL Server
Amazon
S3
IAM
SQL Server
*.bak
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Amazon RDS Multi-AZ SQL Server
Region A
VPC
Availability Zone 1 Availability Zone 2
Private subnet Private subnet
Synchronous commit
Automatic failover
Amazon
RDS
primary
Amazon
RDS
secondary
• Always On AG (Basic AG for Standard) for 2016,
2017 & 2019
• DB Mirroring for 2012 and 2014
• Synchronous Secondary hot stand-by
• Automatic & Manual Failover
• No read traffic
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Read scale-out with Amazon RDS
• 2016+ Enterprise Edition feature
• Up to 5 asynchronous read replicas
• In-region
• Promotion
• Separate end-point
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Amazon RDS Enhanced Monitoring
Overview:
• OS Level Monitoring Metrics – 26 system and per process
metrics
• Metrics delivered to CloudWatch Logs
• Up to 1 second granularity
Compared to CloudWatch Metrics:
• Agent based metrics collections
• There can be differences with CloudWatch metrics due to
collection source (hypervisor vs. agent) – eg. CPU
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Performance Insights for RDS SQL Server
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
SQL Server on Amazon EC2
SQL Server
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
SQL Server on Amazon EC2
• How to start
Spin up an EC2 instance and install from customer media (BYOL)
Spin up an EC2 instance that includes SQL in the Amazon Machine Instance (AMI)
• Self-Managed SQL Server
• Security, patching & updates
• Backups
• High Availability
• Full SQL Server sysadmin privileges
SQL Server
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Optimizing Performance for SQL
Server on EC2
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Amazon EC2: Purpose-built computing
Current instance families and generation Family/usage
M5, M5a, M5zn General purpose compute
T2, T3 Burstable performance
C5, C5n, C5a,C4 Compute optimized
X1, X1E, R5, R5d, R5a, Z1d Memory optimized
P2, G3, F1 Accelerated computing
I3, I3en
Storage optimized
(I/O)
H1, D2
Storage optimized
(Density)
(4.5GHz)
(4.0GHz)
© 2021, Amazon Web Services, Inc. or its Affiliates.
16,000
Get the maximum EBS performance on Amazon EC2
GP3
General Purpose SSD
99.8% - 99.9%
1 GiB - 16 TiB
16,000
1,000 MiB/s
Max IOPS
per volume
(16 KiB I/O)
Max throughput
per volume
Amazon EC2
Max EBS Bandwidth 10,000Mbps
Maximum IOPS 43,333
R5b.4xlarge
16,000
GP3
Durability
Size (Min-Max)
Total IOPS=32,000
© 2021, Amazon Web Services, Inc. or its Affiliates.
64,000
Get the maximum EBS performance on Amazon EC2
IO2
Provisioned IOPS SSD
99.999 %
4 GiB - 16 TiB
64,000
1,000 MiB/s
Max IOPS
per volume
(16 KiB I/O)
Max throughput
per volume
64,000
IO2
Durability
Size (Min-Max)
Total IOPS=128,000
Amazon EC2
Max EBS Bandwidth 30,000Mbps
Maximum IOPS 130,000
R5b.12xlarge
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Amazon EBS io2 Block Express Volumes
IO2 Block Express IO2 Block Express
• 256.000 IOPS per volume
• 4000 MB/s throughput per vikume
• 64 TiB per volume
• 99.999% durability
• Available with Amazon EC2 R5b instances
• Supports standard io2 features
© 2021, Amazon Web Services, Inc. or its Affiliates.
Place tempdb in EC2 Instance Store
Amazon EC2
What is instance storage?
• Some instance types come with direct attached disk-based storage
• SSD
• NVMe SSD
• Included in the hourly cost
• Data on instance storage does not persist a user- initiated instance
stop/start or hardware failure
• Fast disk I/O without going over the network
• Traffic does not count towards EBS IOPS
z1d.12xlarge
2 x 900 NVMe SSD
© 2021, Amazon Web Services, Inc. or its Affiliates.
Place tempdb in EC2 Instance Store
Amazon EC2
What is instance storage?
• Some instance types come with direct attached disk-based storage
• SSD
• NVMe SSD
• Included in the hourly cost
• Data on instance storage does not persist a user- initiated instance
stop/start or hardware failure
• Fast disk I/O without going over the network
• Traffic does not count towards EBS IOPS
z1d.12xlarge
2 x 900 NVMe SSD
Disk Mirroring
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Region
Amazon FSx
for Windows File Server
fs-0123456789.example.com
Amazon FSx for Windows File Server Amazon FSx for Windows File
Server
SQL DB
instance
CREATE DATABASE [DBonFSx] ON PRIMARY ( name = N’DBonFSx_data’,
filename = N’fs-0123456789.example.comDBDBonFSx_data.mdf’,
size = 8192kb, maxsize = unlimited,filegrowth = 1024kb )
log ON ( name = N'DBonFSx_log’,
filename =N‘fs-0123456789.example.comDBDBonFSx_log.ldf’,
size = 1024kb, maxsize = 2048gb, filegrowth = 10%)
GO
© 2021, Amazon Web Services, Inc. or its Affiliates.
Optimize your disk layout or file distribution
Data Files
Log Files
Tempdb Data Files
Tempdb Log Files
Backup Files
Random Access
Sequential Access
Random Access
Sequential Access
Sequential Access
.mdf .ndf .ndf
.ldf .ldf .ldf
.mdf .ndf .ndf
.ldf .ldf .ldf
.bak
© 2021, Amazon Web Services, Inc. or its Affiliates.
Optimize your disk layout or file distribution
GP3/IO2
GP3/IO2
GP3/IO2
Amazon EC2 Instance
SQL Server
Amazon EBS File distribution
ST1/SC1
Database
File Group
bak/trn
Instance Store Volumes
SQL Data Files
Tran. Log Files
Backup Files
TempDB
Data/Log Files
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
High Availability Best Practices for
SQL Server on EC2
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
SQL Server HA/DR on EC2
• Windows clusters can span Availability Zones or regions
• Mirroring
• AlwaysOn Availability Groups
• Transaction Log Shipping
• SQL Failover Cluster Instance
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Always On AG
Multi-AZ Always On Availability Group
• SQL Server:
• Database-level HA solution
• Manual adding logins, SQL Agent jobs,
certificates and other SQL Server instance
level objects to all secondary
• Data/Transactions replicated through SQL
Server
• Infrastructure:
• Shared-nothing configuration
• Storage configured and managed outside
of WSFC
• Flexibility and granularity of storage
configuration and maintenance
• Limited SQL resources managed by WSFC
AWS Cloud
VPC
Private subnet Private subnet Private subnet
Availability Zone A Availability Zone B Availability Zone C
Private subnet
Active
Directory
DC1
Private subnet
Active
Directory
DC2
File Share
Witness
1st SQL
Replica
2nd SQL
Replica
Sync Mode Auto
Failover
10.0.10.0/24 10.0.20.0/24 10.0.30.0/24
10.0.40.0/24 10.0.50.0/24
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Always On AG
Multi-AZ Always On Availability Group
• Best Practices:
• Multi AZ setup
• Use File Share Witness
• MultiSubnetFailover = Yes
• Connect to Listener
• RegisterAllProvidersIP = Yes
• Change default HostRecordTTL
• SQL Native Client Providers
AWS Cloud
VPC
Private subnet Private subnet Private subnet
Availability Zone A Availability Zone B Availability Zone C
Private subnet
Active
Directory
DC1
Private subnet
Active
Directory
DC2
File Share
Witness
1st SQL
Replica
2nd SQL
Replica
Sync Mode
Auto Failover
10.0.10.0/24 10.0.20.0/24 10.0.30.0/24
10.0.40.0/24 10.0.50.0/24
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Always On AG
Multi-Region Always On Availability Group
AWS Cloud
VPC
Private subnet Private subnet Private subnet
Availability Zone A Availability Zone B Availability Zone C
Private subnet
Active
Directory
DC1
Private subnet
Active
Directory
DC2
File Share
Witness
1st SQL
Replica
2nd SQL
Replica
Sync Mode
Auto Failover
10.0.10.0/24 10.0.20.0/24 10.0.30.0/24
10.0.40.0/24 10.0.50.0/24
AWS Cloud
VPC
Private subnet
Availability Zone A
Private subnet
Active
Directory
DC3
3rd SQL
Replica
10.1.10.0/24
10.1.20.0/24
Async Mode
Manual Failover
Peering
connection
AWS Transit Gateway
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
SQL FCI with Amazon FSx for Windows File Server
AWS Cloud
VPC
Availability Zone A Availability Zone B
Private subnet
Active
Directory
DC1
Private subnet
Active
Directory
DC2
10.0.30.0/24 10.0.40.0/24
Shared Storage
Private subnet Private subnet
1st SQL
Node
2nd SQL
Node
10.0.10.0/24 10.0.20.0/24
Amazon
FSx
Amazon
FSx
• SQL Server:
• Instance-level HA solution
• Logins, SQL Agent jobs, certificates and other SQL
Server instance level objects are in-tact after
failover
• Infrastructure:
• Clustered disk resource via SMB and continuously
available shares (CAFS)
• AWS managed SMB file system
• Storage and Network traffic using the same network
pipe
• Managed storage configuration and maintenance
• Very limited control over file system configuration
(e.g. 4k vs. 64k allocation unit)
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
SQL FCI with Amazon FSx for NetApp ONTAP
AWS Cloud
VPC
Availability Zone A Availability Zone B
Private subnet Private subnet
1st SQL
Node
2nd SQL
Node
10.0.10.0/24 10.0.20.0/24
iSCSI/SMB
Primary Standby
• Amazon FSx for NetApp ONTAP includes all of
ONTAP’s storage efficiency and cost-savings features
• High-performance SSD storage
• NetApp ONTAP offers multiple throughput capacity
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Migrating SQL Server to AWS
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
Backup & Restore
SQL Server’s native backup functionality
AWS Database Migration Service
Minimize downtime during migrations, migrate between
different DB platforms
1
3
2
SQL Always On Availability Group
Asynchronous-commit mode, distributed AGs (SQL
Server 2016+)
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SQL SERVER ON AWS
migrations@amazon.com
Thank you

More Related Content

PPTX
Vmware training presentation
PDF
CJ프레시웨이 All-in 클라우드 전환 사례를 통해서 알아보는 Modernization성공 사례-오동규, 메가존 인프라 모더나이제이션 그...
PDF
Service Now discovery
PDF
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
PDF
Lezione 11: Accesso ai RESTful Web Services in Java
PDF
[AWS Dev Day] 앱 현대화 | DevOps 개발자가 되기 위한 쿠버네티스 핵심 활용 예제 알아보기 - 정영준 AWS 솔루션즈 아키...
PDF
Day 1 axway apim-training
PDF
AWS Direct Connect 및 VPN을 이용한 클라우드 아키텍쳐 설계:: Steve Seymour :: AWS Summit Seou...
Vmware training presentation
CJ프레시웨이 All-in 클라우드 전환 사례를 통해서 알아보는 Modernization성공 사례-오동규, 메가존 인프라 모더나이제이션 그...
Service Now discovery
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
Lezione 11: Accesso ai RESTful Web Services in Java
[AWS Dev Day] 앱 현대화 | DevOps 개발자가 되기 위한 쿠버네티스 핵심 활용 예제 알아보기 - 정영준 AWS 솔루션즈 아키...
Day 1 axway apim-training
AWS Direct Connect 및 VPN을 이용한 클라우드 아키텍쳐 설계:: Steve Seymour :: AWS Summit Seou...

What's hot (20)

PDF
금융 분야 마이데이터 (My Data) 산업 도입 방안 및 AWS 활용법 – 고종원 AWS 어카운트 매니저, 양찬욱 KB국민카드 팀장:: ...
PDF
AWS Summit Seoul 2023 | 다중 계정 및 하이브리드 환경에서 안전한 IAM 체계 만들기
PDF
Building Event Driven (Micro)services with Apache Kafka
PPTX
Microservices with event source and CQRS
PDF
004_Config_WhseStructure_and_Master_Data.pdf
PDF
금융 회사를 위한 클라우드 이용 가이드 – 신은수 AWS 솔루션즈 아키텍트, 김호영 AWS 정책협력 담당:: AWS Cloud Week ...
PDF
IDC 서버 몽땅 AWS로 이전하기 위한 5가지 방법 - 윤석찬 (AWS 테크에반젤리스트)
PDF
비즈니스 혁신 가속화와 효과적 규정 준수를 위한 AWS ISMS 소개::신종회::AWS Summit Seoul 2018
PPTX
vSAN architecture components
PDF
Best Practices to Administer, Operate, and Monitor an SAP HANA System
PDF
[금융 고객을 위한 re:Invent 2023 re:Cap Event] 04_금융사가 알아야 할 reInvent 20...
PPTX
AWS Lambda
PDF
AWS Systems manager 2019
PPTX
Using Camunda on Kubernetes through Operators
PPTX
AWS 12월 웨비나 │성공적인 마이그레이션을 위한 클라우드 아키텍처 및 운영 고도화
PDF
VMware Cloud on AWS POC HCX デプロイガイド
PPTX
AWS VS AZURE VS GCP.pptx
PDF
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
PDF
Modernizing COBOL Applications with CA GEN
PDF
고객 경험을 통한 AWS 클라우드 이전을 위한 지름길 - 김효정 (AWS 솔루션즈 아키텍트)
금융 분야 마이데이터 (My Data) 산업 도입 방안 및 AWS 활용법 – 고종원 AWS 어카운트 매니저, 양찬욱 KB국민카드 팀장:: ...
AWS Summit Seoul 2023 | 다중 계정 및 하이브리드 환경에서 안전한 IAM 체계 만들기
Building Event Driven (Micro)services with Apache Kafka
Microservices with event source and CQRS
004_Config_WhseStructure_and_Master_Data.pdf
금융 회사를 위한 클라우드 이용 가이드 – 신은수 AWS 솔루션즈 아키텍트, 김호영 AWS 정책협력 담당:: AWS Cloud Week ...
IDC 서버 몽땅 AWS로 이전하기 위한 5가지 방법 - 윤석찬 (AWS 테크에반젤리스트)
비즈니스 혁신 가속화와 효과적 규정 준수를 위한 AWS ISMS 소개::신종회::AWS Summit Seoul 2018
vSAN architecture components
Best Practices to Administer, Operate, and Monitor an SAP HANA System
[금융 고객을 위한 re:Invent 2023 re:Cap Event] 04_금융사가 알아야 할 reInvent 20...
AWS Lambda
AWS Systems manager 2019
Using Camunda on Kubernetes through Operators
AWS 12월 웨비나 │성공적인 마이그레이션을 위한 클라우드 아키텍처 및 운영 고도화
VMware Cloud on AWS POC HCX デプロイガイド
AWS VS AZURE VS GCP.pptx
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
Modernizing COBOL Applications with CA GEN
고객 경험을 통한 AWS 클라우드 이전을 위한 지름길 - 김효정 (AWS 솔루션즈 아키텍트)
Ad

More from Gianluca Hotz (20)

PPTX
Multitenancy con SQL Server e Azure SQL Database
PPTX
Microsoft SQL Server PaaS (Platform as a Service)
PPTX
SQL Server 2022 Programmability & Performance
PDF
SQL Server 2022 Intelligent Query Processing
PDF
Le novità di SQL Server 2022
PDF
IaaS and PaaS relational databases in the cloud
PDF
Data Integrity with SQL Database Ledger
PDF
Azure SQL Database Ledger
PDF
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
PDF
SQL Server in AWS
PDF
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
PDF
Azure SQL Database Ledger
PDF
SQL Server Modern Query Processing
PDF
SQL Server in AWS
PDF
SQL Server Failover Cluster Instances con Azure Managed Disks
PDF
SQL Server Back to Basics: Sicurezza
PDF
SQL Server Failover Cluster Instances con Amazon FSx in AWS
PDF
SQL Server Data Virtualization with polybase
PDF
SQL Server Data Virtualization with Polybase
PDF
SQL Server Modern Query Processing
Multitenancy con SQL Server e Azure SQL Database
Microsoft SQL Server PaaS (Platform as a Service)
SQL Server 2022 Programmability & Performance
SQL Server 2022 Intelligent Query Processing
Le novità di SQL Server 2022
IaaS and PaaS relational databases in the cloud
Data Integrity with SQL Database Ledger
Azure SQL Database Ledger
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
SQL Server in AWS
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Azure SQL Database Ledger
SQL Server Modern Query Processing
SQL Server in AWS
SQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Back to Basics: Sicurezza
SQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with Polybase
SQL Server Modern Query Processing
Ad

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Encapsulation theory and applications.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Electronic commerce courselecture one. Pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Modernizing your data center with Dell and AMD
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Understanding_Digital_Forensics_Presentation.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Encapsulation theory and applications.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Electronic commerce courselecture one. Pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Modernizing your data center with Dell and AMD
20250228 LYD VKU AI Blended-Learning.pptx
Empathic Computing: Creating Shared Understanding
Unlocking AI with Model Context Protocol (MCP)
Review of recent advances in non-invasive hemoglobin estimation
MYSQL Presentation for SQL database connectivity
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Dropbox Q2 2025 Financial Results & Investor Presentation
Digital-Transformation-Roadmap-for-Companies.pptx

Best Practices for Running Microsoft SQL Server on AWS

  • 1. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Baris Furtinalar Microsoft Specialist Solutions Architect AWS Best Practices for Running Microsoft SQL Server on AWS Gianluca Hotz Microsoft SQL Server MVP UGISS
  • 2. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Agenda • Where can I run SQL Server on AWS? • Amazon RDS for SQL Server • Optimizing Performance for SQL Server on EC2 • High Availability Best Practices for SQL Servers on AWS • Migrating SQL Server to EC2 • Q&A
  • 3. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Where can I run my SQL Server workloads on AWS? Amazon Relational Database Service (Amazon RDS) Managed service with up to 128 vCPU, 4TBRAM, and 16 TB storage Amazon Elastic Compute Cloud (Amazon EC2) Self-managed virtual machine with up to 448 vCPU, 24TB RAM, and 400-TB storage
  • 4. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Amazon RDS for SQL Server SQL Server on Amazon EC2 Customer managed AWS managed Power, HVAC, net OS Install/Maintenance OS Patching DBMS Install/Maintenance DBMS Patching Database Backups High Availability Scaling Power, HVAC, net OS Install/Maintenance OS Patching DBMS Install/Maintenance DBMS Patching Database Backups High Availability Scaling • Consider RDS first • Focus on business value tasks • High-level tuning asks • Schema optimization • No in-house database expertise • Need full control over DB instance • Backups • Replication • Clustering • Options that are not available in RDS Options for Deploying SQL Server on AWS
  • 5. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS SQL Server Features at a Glance 2012 – 2019 Versions Supported: Editions Supported: High Availability: Encryption: Authentication: Backups: Maintenance: Express, Web, Standard, Enterprise All All AWS-managed TDE, Column-level, Always Encrypted, TLS, EBS encryption Self-managed; AlwaysOn, Mirroring… Windows & SQL Authentication AWS- managed Self-managed AWS- managed Self-managed Amazon RDS Amazon EC2 BI Stack: SSIS, SSRS, SSAS (tabular) All
  • 6. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Amazon RDS with SQL Server
  • 7. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Amazon RDS: Hassle-free flexibility • Instance type selection: • t3 instances for lower cost • m5/m5d instances • r5/z1d/x1e instances for more RAM • EBS volume type selection: • GP2 volumes for lower cost • IO1 volumes for I/O intensive, critical workloads
  • 8. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Compute and Storage Scaling Scale Compute to Handle Increased Load Up to 128 vCPUs 4TiB of RAM Scale Storage for Larger Data Sets Scalable EBS storage up to 16TiB Scale Down to Control Costs As little as 4 vCPU and 16 GiB of RAM
  • 9. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Automated backups, Snapshots and Native Backups • Backup and restore directly to and from S3 bucket • Supports Compression • Only full & diff backups (no t-log) • Full, diff & t-log restores • Multi-file backup/restore Amazon RDS SQL Server Amazon S3 IAM SQL Server *.bak
  • 10. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Amazon RDS Multi-AZ SQL Server Region A VPC Availability Zone 1 Availability Zone 2 Private subnet Private subnet Synchronous commit Automatic failover Amazon RDS primary Amazon RDS secondary • Always On AG (Basic AG for Standard) for 2016, 2017 & 2019 • DB Mirroring for 2012 and 2014 • Synchronous Secondary hot stand-by • Automatic & Manual Failover • No read traffic
  • 11. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Read scale-out with Amazon RDS • 2016+ Enterprise Edition feature • Up to 5 asynchronous read replicas • In-region • Promotion • Separate end-point
  • 12. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Amazon RDS Enhanced Monitoring Overview: • OS Level Monitoring Metrics – 26 system and per process metrics • Metrics delivered to CloudWatch Logs • Up to 1 second granularity Compared to CloudWatch Metrics: • Agent based metrics collections • There can be differences with CloudWatch metrics due to collection source (hypervisor vs. agent) – eg. CPU
  • 13. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Performance Insights for RDS SQL Server
  • 14. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS SQL Server on Amazon EC2 SQL Server
  • 15. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS SQL Server on Amazon EC2 • How to start Spin up an EC2 instance and install from customer media (BYOL) Spin up an EC2 instance that includes SQL in the Amazon Machine Instance (AMI) • Self-Managed SQL Server • Security, patching & updates • Backups • High Availability • Full SQL Server sysadmin privileges SQL Server
  • 16. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Optimizing Performance for SQL Server on EC2
  • 17. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Amazon EC2: Purpose-built computing Current instance families and generation Family/usage M5, M5a, M5zn General purpose compute T2, T3 Burstable performance C5, C5n, C5a,C4 Compute optimized X1, X1E, R5, R5d, R5a, Z1d Memory optimized P2, G3, F1 Accelerated computing I3, I3en Storage optimized (I/O) H1, D2 Storage optimized (Density) (4.5GHz) (4.0GHz)
  • 18. © 2021, Amazon Web Services, Inc. or its Affiliates. 16,000 Get the maximum EBS performance on Amazon EC2 GP3 General Purpose SSD 99.8% - 99.9% 1 GiB - 16 TiB 16,000 1,000 MiB/s Max IOPS per volume (16 KiB I/O) Max throughput per volume Amazon EC2 Max EBS Bandwidth 10,000Mbps Maximum IOPS 43,333 R5b.4xlarge 16,000 GP3 Durability Size (Min-Max) Total IOPS=32,000
  • 19. © 2021, Amazon Web Services, Inc. or its Affiliates. 64,000 Get the maximum EBS performance on Amazon EC2 IO2 Provisioned IOPS SSD 99.999 % 4 GiB - 16 TiB 64,000 1,000 MiB/s Max IOPS per volume (16 KiB I/O) Max throughput per volume 64,000 IO2 Durability Size (Min-Max) Total IOPS=128,000 Amazon EC2 Max EBS Bandwidth 30,000Mbps Maximum IOPS 130,000 R5b.12xlarge
  • 20. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Amazon EBS io2 Block Express Volumes IO2 Block Express IO2 Block Express • 256.000 IOPS per volume • 4000 MB/s throughput per vikume • 64 TiB per volume • 99.999% durability • Available with Amazon EC2 R5b instances • Supports standard io2 features
  • 21. © 2021, Amazon Web Services, Inc. or its Affiliates. Place tempdb in EC2 Instance Store Amazon EC2 What is instance storage? • Some instance types come with direct attached disk-based storage • SSD • NVMe SSD • Included in the hourly cost • Data on instance storage does not persist a user- initiated instance stop/start or hardware failure • Fast disk I/O without going over the network • Traffic does not count towards EBS IOPS z1d.12xlarge 2 x 900 NVMe SSD
  • 22. © 2021, Amazon Web Services, Inc. or its Affiliates. Place tempdb in EC2 Instance Store Amazon EC2 What is instance storage? • Some instance types come with direct attached disk-based storage • SSD • NVMe SSD • Included in the hourly cost • Data on instance storage does not persist a user- initiated instance stop/start or hardware failure • Fast disk I/O without going over the network • Traffic does not count towards EBS IOPS z1d.12xlarge 2 x 900 NVMe SSD Disk Mirroring
  • 23. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Region Amazon FSx for Windows File Server fs-0123456789.example.com Amazon FSx for Windows File Server Amazon FSx for Windows File Server SQL DB instance CREATE DATABASE [DBonFSx] ON PRIMARY ( name = N’DBonFSx_data’, filename = N’fs-0123456789.example.comDBDBonFSx_data.mdf’, size = 8192kb, maxsize = unlimited,filegrowth = 1024kb ) log ON ( name = N'DBonFSx_log’, filename =N‘fs-0123456789.example.comDBDBonFSx_log.ldf’, size = 1024kb, maxsize = 2048gb, filegrowth = 10%) GO
  • 24. © 2021, Amazon Web Services, Inc. or its Affiliates. Optimize your disk layout or file distribution Data Files Log Files Tempdb Data Files Tempdb Log Files Backup Files Random Access Sequential Access Random Access Sequential Access Sequential Access .mdf .ndf .ndf .ldf .ldf .ldf .mdf .ndf .ndf .ldf .ldf .ldf .bak
  • 25. © 2021, Amazon Web Services, Inc. or its Affiliates. Optimize your disk layout or file distribution GP3/IO2 GP3/IO2 GP3/IO2 Amazon EC2 Instance SQL Server Amazon EBS File distribution ST1/SC1 Database File Group bak/trn Instance Store Volumes SQL Data Files Tran. Log Files Backup Files TempDB Data/Log Files
  • 26. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS High Availability Best Practices for SQL Server on EC2
  • 27. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS SQL Server HA/DR on EC2 • Windows clusters can span Availability Zones or regions • Mirroring • AlwaysOn Availability Groups • Transaction Log Shipping • SQL Failover Cluster Instance
  • 28. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Always On AG Multi-AZ Always On Availability Group • SQL Server: • Database-level HA solution • Manual adding logins, SQL Agent jobs, certificates and other SQL Server instance level objects to all secondary • Data/Transactions replicated through SQL Server • Infrastructure: • Shared-nothing configuration • Storage configured and managed outside of WSFC • Flexibility and granularity of storage configuration and maintenance • Limited SQL resources managed by WSFC AWS Cloud VPC Private subnet Private subnet Private subnet Availability Zone A Availability Zone B Availability Zone C Private subnet Active Directory DC1 Private subnet Active Directory DC2 File Share Witness 1st SQL Replica 2nd SQL Replica Sync Mode Auto Failover 10.0.10.0/24 10.0.20.0/24 10.0.30.0/24 10.0.40.0/24 10.0.50.0/24
  • 29. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Always On AG Multi-AZ Always On Availability Group • Best Practices: • Multi AZ setup • Use File Share Witness • MultiSubnetFailover = Yes • Connect to Listener • RegisterAllProvidersIP = Yes • Change default HostRecordTTL • SQL Native Client Providers AWS Cloud VPC Private subnet Private subnet Private subnet Availability Zone A Availability Zone B Availability Zone C Private subnet Active Directory DC1 Private subnet Active Directory DC2 File Share Witness 1st SQL Replica 2nd SQL Replica Sync Mode Auto Failover 10.0.10.0/24 10.0.20.0/24 10.0.30.0/24 10.0.40.0/24 10.0.50.0/24
  • 30. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Always On AG Multi-Region Always On Availability Group AWS Cloud VPC Private subnet Private subnet Private subnet Availability Zone A Availability Zone B Availability Zone C Private subnet Active Directory DC1 Private subnet Active Directory DC2 File Share Witness 1st SQL Replica 2nd SQL Replica Sync Mode Auto Failover 10.0.10.0/24 10.0.20.0/24 10.0.30.0/24 10.0.40.0/24 10.0.50.0/24 AWS Cloud VPC Private subnet Availability Zone A Private subnet Active Directory DC3 3rd SQL Replica 10.1.10.0/24 10.1.20.0/24 Async Mode Manual Failover Peering connection AWS Transit Gateway
  • 31. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS SQL FCI with Amazon FSx for Windows File Server AWS Cloud VPC Availability Zone A Availability Zone B Private subnet Active Directory DC1 Private subnet Active Directory DC2 10.0.30.0/24 10.0.40.0/24 Shared Storage Private subnet Private subnet 1st SQL Node 2nd SQL Node 10.0.10.0/24 10.0.20.0/24 Amazon FSx Amazon FSx • SQL Server: • Instance-level HA solution • Logins, SQL Agent jobs, certificates and other SQL Server instance level objects are in-tact after failover • Infrastructure: • Clustered disk resource via SMB and continuously available shares (CAFS) • AWS managed SMB file system • Storage and Network traffic using the same network pipe • Managed storage configuration and maintenance • Very limited control over file system configuration (e.g. 4k vs. 64k allocation unit)
  • 32. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS SQL FCI with Amazon FSx for NetApp ONTAP AWS Cloud VPC Availability Zone A Availability Zone B Private subnet Private subnet 1st SQL Node 2nd SQL Node 10.0.10.0/24 10.0.20.0/24 iSCSI/SMB Primary Standby • Amazon FSx for NetApp ONTAP includes all of ONTAP’s storage efficiency and cost-savings features • High-performance SSD storage • NetApp ONTAP offers multiple throughput capacity
  • 33. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Migrating SQL Server to AWS
  • 34. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS Backup & Restore SQL Server’s native backup functionality AWS Database Migration Service Minimize downtime during migrations, migrate between different DB platforms 1 3 2 SQL Always On Availability Group Asynchronous-commit mode, distributed AGs (SQL Server 2016+)
  • 35. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SQL SERVER ON AWS migrations@amazon.com Thank you