© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Julius SacramentoSenior Solutions Architect
Microsoft Platform Team
4/23/20
SQL Server on AWS
Thursday, 4/23/2020
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS Global Infrastructure
23 Geographical Regions, 73 Availability Zones, 216 POPs
* Available to select AWS customers who request access. Customers wishing to use the Asia Pacific (Osaka) Local Region should speak with their sales representative.
North America• 6 Regions
• 25 Availability Zones
• 44 Edge Network locations
• 2 Regional Edge Cache locations
Europe / Middle East / Africa• 7 Regions
• 21 Availability Zones
• 39 Edge Network locations
• 2 Regional Edge Cache locations.
Asia Pacific• 6 Regions
• 20 Availability Zones
• 1 Local Region
• 34 Edge Network locations and
• 5 Regional Edge Cache locations.
South America• 1 Region
• 3 Availability Zones
• 4 Edge Network locations
• 1 Regional Edge Cache location
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS Regions are comprised of multiple AZs for high availability, high scalability, and
high fault tolerance. Applications and data are replicated in real time and consistent
in the different AZs
AWS Region Design
AWS Availability Zone (AZ)
A Region is a physical location in the
world where we have multiple Availability
Zones.
Availability Zones consist of one or more discrete data
centers, each with redundant power, networking, and
connectivity, housed in separate facilities.
AZ
AZ
AZ AZ
Transit
Transit
Datacenter
Datacenter
Datacenter
AWS Region
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Common Database Considerations
In-house Applications
Deeper skillset
typically required
Documentation LOE
Black box risk
Complex lines of
ownership
....and many more
ISV / 3rd Party Applications
Can help augment
premium db features
Minimal DB control
Licensing inflexibility
Vendor dependent
….and many more
Business Critical Applications
Non-Critical Applications
Licensing / Cost Considerations
Performance Requirements
Security and Compliance
HA/DR architecture
and SLAs
Where to encryption
Plug all points of failure
Licensing impacts
….and many more
Dev, QA, read-only for
reporting workloads
Uptime/HA/DR SLAs
HA/DR architecture
Is there an instance
stacking opportunity
….and many more
Will I become vendor
locked?
Overuse of SQL EE
Cost of HA / DR
Consider blend of BYOL
/ LI and spot instances
….and many more
Resource bound: CPU,
Mem, network, storage
Storage design
Query latency SLAs
Auto scale needs
….and many more
User access model
Certifications required
for compliance
Separation of duties
Encryption requirements
....and many more
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Common Data Categories and Use Cases
Relational
Referential integrity
ACID transactions
Schema-on-write
USE CASES:
-Lift and shift
-ERP
-CRM
-Finance
Amazon RDS
Key-value
High throughput
Low-latency reads
and writes
endless scale
USE CASES:
-Real time bidding
-Shopping cart
-Social networking
-Product catalog
-Customer preferences
Amazon DynamoDB
Document
Store documents
Quickly access
querying on any
attribute
USE CASES:
-Content management
-Personalization
-Mobile
Amazon DocumentDB
In-memory
Query by key
with microsecond
latency
USE CASES:
-Leaderboards
-Real time analytics
-Caching
Amazon Elasticache
Graph
Quickly and easily
create relationships
between data
Easily navigate
complex data based
on their relationships
USE CASES:
-Fraud detection
-Social networking-Recommendation engine
Amazon Neptune
Time-series
Collect, store,
and process data
sequenced by time
USE CASES:
-IoT applications
-Event tracking
Amazon Timestream
Ledger
Complete, immutable,
and verifiable history
of all changes to
application data
USE CASES:
-System of record
-Supply chain
-Health care
-Registrations
-Financial
Amazon QLDB
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Where can I run my SQL Server workloads on AWS?
Amazon Relational Database Service
(Amazon RDS)
Amazon Elastic Compute Cloud
(Amazon EC2)
Managed service with up to 96 vCPU, 488 -GB RAM, and 16-TB storage
Self-managed virtual machine with up to 128 vCPU, 4-TB RAM, and 400-TB storage
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon RDS for SQL Server SQL Server on Amazon EC2
Power, HVAC, net
OS Install/Maintenance
OS Patching
DBMS Install/Maintenance
DBMS Patching
Database Backups
High Availability
Scaling
AWS managed Customer managed
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
• Schema optimization
• No in-house DB expertise
• Auto Host Replacement
• Multi-AZ Always On Support
• Need full DB control
• Replication
• Clustering
• Read Replicas
• Multi-Region AGs
• Distributed AGs
• RDS Options not available
• SQL Component Services:- Integration Services
- Analysis Services
- Reporting Services
- Data Quality Services
- Master Data Services
Options for Deploying SQL Server on AWS
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
SQL Server Features at a Glance
2012, 2014, 2016, 2017Versions Supported:
Editions Supported:
High Availability:
Encryption:
Authentication:
Backups:
Maintenance:
Express, Web, Standard, Enterprise
All
All
AWS-managed with DBM or AlwaysOn
Support
Encrypted Storage using AWS KMS (all editions); TDE Support
Self-managed; AlwaysOn, Mirroring…
Windows & SQL Authentication
Managed Automated Backups Maintenance Plans & 3rd Party Tools
Automated Software Patching Self-managed
Amazon RDS Amazon EC2
License Included Only License Included -or- Bring Your Own LicenseLicensing Options:
Currently Unsupported SSIS, SSAS, SSRS, MDS, DQSSQL Component Services:
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Multi-AZ SQL Server on Amazon RDS
Availability Zone 1
Private Subnet
Availability Zone 2
Private Subnet
Synchronous Commit
Automatic Failover
AWS Region
Amazon
RDS
Primary
Amazon
RDS
SecondaryManaged Service
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Microsoft SQL Server DatabaseEnterprise-grade fault tolerance solution for production databases using
Multi-AZ Deployments
Automatic Failover
Synchronous replication
Inexpensive & enabled with a few clicks
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Common Questions For
RDS SQL Server
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Monitoring Options
Amazon CloudWatch metrics & alarms
Upload DB logs directly to CloudWatch Logs
Enhanced Monitoring for Amazon RDS
• Access to over 50 CPU, memory, file system, and disk I/O metrics
• As low as 1-second intervals
Integration with third-party monitoring tools
How do I monitor my Amazon RDS database?
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
DB load
• Average active sessions
Identifies database bottlenecks
• Easy
• Powerful
• Top SQL/most intensive queries
Identifies source of bottlenecks
Enables problem discovery
Adjustable timeframe
• Hour, day, week, and longer
Introducing Amazon RDS Performance Insights
How do I improve database performance?
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
RDS uses Simple Notification service (SNS) to receive
notification when an event occurs
Notifications can be:
• Email, text message, or call to an HTTP endpoint
Six different source types:
• DB instance, DB parameter group, DB security group, DB snapshot, DB
cluster, DB cluster snapshot
17 different event categories:
• Availability, backup, deletion, configuration change, etc.
How do I know when service events happen?
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Advanced EC2 Options
for SQL Server
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon EC2: Flexible Compute Options
Current Instance Families and Generation Family/Usage
M5, M5d General Purpose Compute
T2,T3 Burstable Performance
C5, C5d Compute Optimized
X1, X1E, R5,R5d,z1dMemory
Optimized
P3, G3, F1 Accelerated Computing
I3,i3enStorage Optimized
(I/O)
D2Storage Optimized
(Density)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
License Optimization with Optimize CPUs
• Control active vCPUs and Hyper-Threading
status when launching new EC2 instances
• Reduce the number of SQL Server licenses
*Sample licensing example only
Instance Type Total vCPUs Active vCPUs with
Optimize CPUs
SQL Server license
savings
r5.4xlarge 16 8 50%
r5.8xlarge 32 8 75%
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Multi-AZ AlwaysOn Availability Group
Availability Zone 1
Private Subnet
EC2
Primary Replica
Availability Zone 2
Private Subnet
EC2
SecondaryReplica
Synchronous Commit
Automatic Failover
AWS Region
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Multi-Region AlwaysOn Availability Group
Availability Zone 1
Private Subnet
EC2
Primary
Replica
Primary: 10.0.2.100
WSFC: 10.0.2.101
AG Listener: 10.0.2.102
AWS Region A
Availability Zone 2
Private Subnet
EC2
Secondary
Replica
Primary: 10.0.3.100
WSFC: 10.0.3.101
AG Listener: 10.0.3.102
Availability Zone 1
Private Subnet
EC2
Secondary
Replica
Primary: 10.1.2.100
WSFC: 10.1.2.101
AG Listener: 10.1.2.102
Synchronous Commit
Automatic Failover
AWS Region B
Asynchronous Commit
Manual Failover
Cross Region
Peering
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Generates Amazon CloudWatch Events when it detects a problem, so that you can be notified.
• Provides a summary of what’s really happening with the application.
• You get an overview of the type of problem, severity, probable source of the problem, and additional insights with potential next steps.
• Identifies database bottlenecks
Introducing Amazon Application Insights for .NET and SQL Server
In the example on the left, the SQL Server transaction
log was full due to a missing or broken back up.
• To remediate this issue, you run a SQL Server
backup using AWS Systems Manager Automation.
https://aws.amazon.com/blogs/mt/get-visibility-into-application-health-with-amazon-cloudwatch-application-
insights-for-net-and-sql-server/
Please refer the blog post below for more details on
Application Insights
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AlwaysON and Shared-Nothing
WSFC
AWS CloudAvailability Zone a
Availability Zone b
DB
files
• 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
DB
files
AlwaysON
• 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
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Failover Cluster Instances and Storage Spaces Direct
(S2D)
WSFC
AWS CloudAvailability Zone a
Availability Zone b
SOFS
S2D
DB
files
• SQL Server:• Instance-level HA solution
• Logins, SQL Agent jobs, certificates and
other SQL Server instance level objects are
in-tact after failover
• Infrastructure:• Hyper-converged configuration
• Storage and SQL resources managed by
WSFC
• Support and familiarity with S2D, in addition
to SQL, is required
• Storage configuration and maintenance
done through S2D Pool
• Block-level replication through S2D
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Failover Cluster Instances and Amazon FSx (SMB)
WSFC
AWS CloudAvailability Zone a
Availability Zone b
FSx (SMB)
DB
files
• 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
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• Extended Support ends July 9, 2019 must upgrade DB Engine
• Upgrade to SQL Server 2012, 2014, 2016, or 2017 Requires SQL Server 2008 SP4 / SQL Server 2008 R2 SP3
• Understand DB Compatibility Level Dependencies Set your database combability level to 100
Upgrade compatibility level, only if supported and necessary
• New home – RDS for SQL Server and SQL Server on EC2
• Migration options Mirroring or Log Shipping?
Amazon DMS or Backup and Restore?
Ongoing Change Data Capture from a SQL Server Source
Migrating SQL Server 2008 / 2008 R2
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Here to help you build