Running SQL Server on AWS | John McCormack | DataGrillen 2019

YOU CAN RUN SQL SERVER IN AWS?
JOHN MCCORMACK | DATAGRILLEN | JUNE 2019
In this session, I aim to show the different ways of running SQL
Server on AWS. I will show the differences between running as
a managed service (RDS) and running SQL Server on virtual
machines (EC2).
YOU CAN RUN SQL SERVER IN AWS?
JOHN MCCORMACK | DATAGRILLEN | JUNE 2019
In this session, I aim to show the different ways of running SQL
Server on AWS. I will show the differences between running as
a managed service (RDS) and running SQL Server on virtual
machines (EC2).
INTRODUCTION
• John McCormack
• DBA since 2012
• MCSE Data Management and Analytics
• AWS Certified Cloud Solutions Architect - Associate
• Initially focussed on SQL Server, now working with various cloud technologies.
• RDS, EMR, ElasticSearch, Athena, S3
• Azure SQL DB, IAAS
• https://johnmccormack.it
• @actualjohn
3
TERMINOLOGY
• AWS – Amazon Web Services (Cloud computing company)
• Region – A geographic area comprising of 2 or more AZs
• Availability Zone (AZ) – A data centre within a region, providing options for HA/DR
• EC2 – VM within AWS (Windows or Linux)
• EBS – Block storage in AWS
• S3 – Object storage based in AWS (think dropbox)
• Bucket – Folder within S3. Name is globally unique
• RDS – Relational Database Service. Managed database instances. Various RDBMSs
offered including SQL Server, MySQL, Postgressql, Oracle, MariaDB and Aurora.
4
2 WAYS TO RUN SQL SERVER IN AWS
Administration Effort
Azure SQL DB
RDS
Azure Managed
Instance
EC2
Azure VM
• RDS
• Managed instance
• Less admin, less control
• EC2
• VM in the cloud
• More admin, more control
Control
5
RDS VS EC2
FEATURE EC2 RDS
Use SSMS ✔ ✔
Use database as source or target for SSIS ✔ ✔
Full control over the instance ✔
Automated backups ✔
Automated patching ✔
Always On Availability groups ✔ (kind of)
6
RDS VS EC2
FEATURE EC2 RDS
AWS-managed Multi AZ deployment ✔
Log Shipping ✔
Replication ✔
Database mail ✔
Bulk Insert ✔
FILESTREAM ✔
7
RDS VS EC2
Shared responsibility
model
RDS EC2
HA/DR HA/DR
Database backups Database backups
SQL Server patching SQL Server patching
Installing SQL Server Installing SQL Server
OS patching OS patching
Network Network
Power Power
Physical Security Physical Security
AWS Responsibility Customer Responsibility 8
LETS TALK LICENSING
• Express edition is the only license free edition
• No developer
• License included in instance cost
• Enterprise, Standard & Web
RDS
• You can use developer edition for non prod
workloads
• BYOL or License included
• No software assurance = Dedicated host
EC2
9
BACKUP / RESTORE – RDS
• Automated backups
• Set your own retention period
• Take ad-hoc snapshots
• Kept in your S3 bucket until deleted by user
• Snapshots can be shared between accounts
• Accounts is similar to subscriptions in Azure so sometimes used for
restoring prod to dev or test environments
• Point in time restores (within 5 minutes)
• You can restore to a new RDS instance
10
BACKUP / RESTORE – EC2
S3 offers cross-region bucket replication and
versioning !
You pay for all versions so look at setting a ‘lifecycle policy’
Back up to S3 to save money
(EBS way more expensive than S3)
Directly with 3rd party tools (LiteSpeed / CloudBerry)
Copy from EBS to S3
Backup directly to file system
(EBS)
EBS offers automatic redundancy and encryption
You are responsible for your own backups
and restores
Just like on-premises
11
MONITORING
• CloudWatch
• Near real time info
• View multiple instances
at once
• Trigger alerts
• 3rd party tools
• sp_whoisactive
• Sentry One
• Grafana
12
DEEP DIVE INTO RDS
• Versions and Editions
• Instance types
• Storage types
• HA/DR
• Security
• Encryption
• Parameter groups
13
DEEP DIVE INTO RDS – VERSIONS/EDITIONS
• Express
• Web
• Standard
• Enterprise
• 2012 – 2017
• SQL Server 2008 R2 was removed from options on 1st June 2019.
• AWS Warned customers: Upgrade existing instances before June 1,
2019, to avoid automatic upgrade. 14
DEEP DIVE INTO RDS – INSTANCE TYPES
T2
Burstable Performance
Lowest Cost
M4 / M5
General Purpose
M5 Latest Generation
R3 / R4
Memory Optimized
R4 Latest Generation
• t2.micro
• 1 vCPU
• 1 GiB RAM
• m5.xlarge
• 4 vCPU
• 16 GiB RAM
• r4.xlarge
• 4 vCPU
• 30.5 GiB RAM 15
DEEP DIVE INTO RDS – STORAGE
ALL EDITIONS
Magnetic *
Min: 200 GiB Enterprise/Standard editions, 20 GiB Web/Express
Max: 1 TiB all editions
General Purpose (SSD)
Min: 200 GiB Enterprise/Standard editions, 20 GiB Web/Express
Max: 16 TiB all editions
Provisioned IOPS (SSD)
Min: 200 GiB Enterprise/Standard editions, 100 GiB Web/Express
Max: 16 TiB all editions
* Backwards compatibility only - Before Jan 2017
16
DEEP DIVE INTO RDS – HA/DR
• Pick a time to suit your business
• Just tell AWS you want to go Multi-AZ
Automatic Multi-AZ
deployment
Manual failovers if you want
to test
• No manual intervention needed.
During automatic failover,
any fault with original primary
is fixed for you
• Automatically chosen depending on version and edition
• No readable secondary with AGs
Technology used is Mirroring
or
Always On Availability Groups
17
DEEP DIVE INTO RDS – SECURITY
• Network Security
• VPC
• Security Groups
• Publicly accessible
• Choose your port
• Database security
• SQL Logins
• Master user & others
• Active Directory
18
DEEP DIVE INTO RDS – ENCRYPTION
• In-Transit (SSL Support)
• You can use SSL to encrypt connections between your apps and RDS instance
• You can force all connections to use SSL
• Supported in all regions and for all editions
• At Rest
• Transparent Data Encryption (TDE)
• Available in Enterprise Edition
• Simply enable encryption at set up for all other editions (except express)
19
DEEP DIVE INTO RDS – PARAMETER GROUPS
• Parameter groups allow you to change settings above and beyond
your level of access to the instance.
• i.e Something requiring sysadmin or securityadmin role
• Examples
• Some trace flags e.g. 1204, 4199
• Cost threshold for parallelism
• Optimize for ad hoc workloads
• Changes to parameter groups apply to all instances using the group
20
CLI &
POWERSHELL
• The key to cloud automation is scripting. AWS
supports CLI and Powershell to save you from
too many clunky manual process.
• Examples
• aws rds restore-db-instance-from-db-
snapshot --db-instance-identifier restored-
test-instance --db-snapshot-identifier test-
instance-snap
• Restore-RDSDBInstanceFromDBSnapshot -
DBInstanceIdentifier restored-test-instance
-DBSnapshotIdentifier test-instance-snap
21
PRE MIGRATION PLANNING – MOVING DATA
TB / GB Scale
Direct ConnectSnowball / Edge
PB Scale
• 50 / 80 / 100 TB per device
• Can use multiple
• Transfers in 1 week
• Dedicated connection
• 1Gbps - 10Gbps
22
S3 Accelerated Transfer
• CloudFront edge Locations
• Distance ∝ improvement
GB / MB Scale
23
EDGE LOCATIONS
©
https://aws.amazon.com/cloudfront/features/#Amazon_CloudFront_Infra
BACKUPS - HAVE YOU SEEN THE SNOWMOBILE
Exabyte Scale
24
PRE MIGRATION PLANNING
25
TASK
Create full inventory
Identify features used (What version / edition do we need)
Do you have licenses to take to the cloud?
What are your high availability / disaster recovery requirements
Can you purge unwanted data
What are your team’s capabilities
MIGRATION STRATEGIES & TOOLS
METHOD EC2 RDS
Backup / Restore ✔ ✔
Database Migration Service and Schema Conversion Tool ✔ ✔
Log Shipping ✔
Transactional Replication ✔
Snowball ✔ ✔
26
DEMO
27
THANK YOU
If you want to find out more, go here:
• https://johnmccormack.it/
28
FAQS
• How long do AWS keep your backups?
• 7 days default, can be increased up to 35 days
• Can I bring my own license to RDS?
• No
• Can I scale up in place?
• Yes
• How can I set up database mail?
• Linked server to EC2 or on-prem 29
OTHER TECHNOLOGIES
• ATHENA
• Create Schema
• Create databases / tables / views
• They are not materialized
• Query with SQL in console or JDBC connection
• Use GLUE for ETL
• Partition and compress to save money
30
DEEP DIVE INTO RDS – INSTANCE TYPES
Source:
SQL Server Edition 2017 and 2016 Support
Range
2014, 2012, and 2008 R2
Support Range
Enterprise Edition Up to r4.16xlarge
or m5.24xlarge
Up to r4.8xlarge
or m5.24xlarge
Standard Edition Up to r4.16xlarge
or m5.24xlarge
Up to r4.8xlarge
or m5.24xlarge
Web Edition Up to t2.medium
or r4.2xlarge
or m5.4xlarge
Up to t2.medium
or r4.2xlarge
or m5.4xlarge
Express Edition t2.micro
or t2.medium
t2.micro
or t2.medium
31
1 of 31

Recommended

AWS and VMware: How to Architect and Manage Hybrid Environments by
AWS and VMware: How to Architect and Manage Hybrid EnvironmentsAWS and VMware: How to Architect and Manage Hybrid Environments
AWS and VMware: How to Architect and Manage Hybrid EnvironmentsRightScale
2.2K views31 slides
AWS re:Invent 2016: Managing and Supporting the Windows Platform on AWS (GPSS... by
AWS re:Invent 2016: Managing and Supporting the Windows Platform on AWS (GPSS...AWS re:Invent 2016: Managing and Supporting the Windows Platform on AWS (GPSS...
AWS re:Invent 2016: Managing and Supporting the Windows Platform on AWS (GPSS...Amazon Web Services
650 views29 slides
Building a Hybrid Cloud with AWS and VMware vSphere by
Building a Hybrid Cloud with AWS and VMware vSphereBuilding a Hybrid Cloud with AWS and VMware vSphere
Building a Hybrid Cloud with AWS and VMware vSphereBuurst
694 views18 slides
AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration... by
AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...
AWS re:Invent 2016: Netflix: Container Scheduling, Execution, and Integration...Amazon Web Services
3.3K views61 slides
How to Design for High Availability & Scale with AWS by
How to Design for High Availability & Scale with AWSHow to Design for High Availability & Scale with AWS
How to Design for High Availability & Scale with AWSBlazeclan Technologies Private Limited
10K views41 slides
(ENT201) New Generation Hybrid Architectures with Suncorp, NetApp, and AWS | ... by
(ENT201) New Generation Hybrid Architectures with Suncorp, NetApp, and AWS | ...(ENT201) New Generation Hybrid Architectures with Suncorp, NetApp, and AWS | ...
(ENT201) New Generation Hybrid Architectures with Suncorp, NetApp, and AWS | ...Amazon Web Services
3.6K views23 slides

More Related Content

What's hot

AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ... by
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...Amazon Web Services
570 views37 slides
Amazon EFS by
Amazon EFSAmazon EFS
Amazon EFSAmazon Web Services
1.2K views47 slides
AWS Enterprise Day | Hybrid IT with AWS: Best of Both Worlds by
AWS Enterprise Day | Hybrid IT with AWS: Best of Both WorldsAWS Enterprise Day | Hybrid IT with AWS: Best of Both Worlds
AWS Enterprise Day | Hybrid IT with AWS: Best of Both WorldsAmazon Web Services
3.2K views79 slides
AWS Webcast - How to Migrate On-premise NAS Storage to Cloud NAS Storage by
AWS Webcast - How to Migrate On-premise NAS Storage to Cloud NAS StorageAWS Webcast - How to Migrate On-premise NAS Storage to Cloud NAS Storage
AWS Webcast - How to Migrate On-premise NAS Storage to Cloud NAS StorageAmazon Web Services
4.2K views31 slides
How a National Transportation Software Provider Migrated a Mission-Critical T... by
How a National Transportation Software Provider Migrated a Mission-Critical T...How a National Transportation Software Provider Migrated a Mission-Critical T...
How a National Transportation Software Provider Migrated a Mission-Critical T...Amazon Web Services
637 views35 slides
Advanced data migration techniques for Amazon RDS by
Advanced data migration techniques for Amazon RDSAdvanced data migration techniques for Amazon RDS
Advanced data migration techniques for Amazon RDSTom Laszewski
14.9K views52 slides

What's hot(20)

AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ... by Amazon Web Services
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
AWS Enterprise Day | Hybrid IT with AWS: Best of Both Worlds by Amazon Web Services
AWS Enterprise Day | Hybrid IT with AWS: Best of Both WorldsAWS Enterprise Day | Hybrid IT with AWS: Best of Both Worlds
AWS Enterprise Day | Hybrid IT with AWS: Best of Both Worlds
Amazon Web Services3.2K views
AWS Webcast - How to Migrate On-premise NAS Storage to Cloud NAS Storage by Amazon Web Services
AWS Webcast - How to Migrate On-premise NAS Storage to Cloud NAS StorageAWS Webcast - How to Migrate On-premise NAS Storage to Cloud NAS Storage
AWS Webcast - How to Migrate On-premise NAS Storage to Cloud NAS Storage
Amazon Web Services4.2K views
How a National Transportation Software Provider Migrated a Mission-Critical T... by Amazon Web Services
How a National Transportation Software Provider Migrated a Mission-Critical T...How a National Transportation Software Provider Migrated a Mission-Critical T...
How a National Transportation Software Provider Migrated a Mission-Critical T...
Advanced data migration techniques for Amazon RDS by Tom Laszewski
Advanced data migration techniques for Amazon RDSAdvanced data migration techniques for Amazon RDS
Advanced data migration techniques for Amazon RDS
Tom Laszewski14.9K views
Deploying in the Cloud: Why and How by Matt Small
Deploying in the Cloud: Why and HowDeploying in the Cloud: Why and How
Deploying in the Cloud: Why and How
Matt Small832 views
Module 1 cloud computing by krnaween
Module 1   cloud computingModule 1   cloud computing
Module 1 cloud computing
krnaween166 views
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302) by Amazon Web Services
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity Options by Amazon Web Services
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity OptionsCreating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS by RightScale
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaSAWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS
RightScale3K views
(DAT303) Oracle on AWS and Amazon RDS: Secure, Fast, and Scalable by Amazon Web Services
(DAT303) Oracle on AWS and Amazon RDS: Secure, Fast, and Scalable(DAT303) Oracle on AWS and Amazon RDS: Secure, Fast, and Scalable
(DAT303) Oracle on AWS and Amazon RDS: Secure, Fast, and Scalable
Amazon Web Services3.7K views
AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual... by Amazon Web Services
AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...
AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...
AWS re:Invent 2016: Design, Deploy, and Optimize Microsoft SharePoint on AWS ... by Amazon Web Services
AWS re:Invent 2016: Design, Deploy, and Optimize Microsoft SharePoint on AWS ...AWS re:Invent 2016: Design, Deploy, and Optimize Microsoft SharePoint on AWS ...
AWS re:Invent 2016: Design, Deploy, and Optimize Microsoft SharePoint on AWS ...
Amazon Web Services3.6K views
AWS re:Invent 2016: Reinventing Disaster Recovery Leveraging AWS Cloud Infras... by Amazon Web Services
AWS re:Invent 2016: Reinventing Disaster Recovery Leveraging AWS Cloud Infras...AWS re:Invent 2016: Reinventing Disaster Recovery Leveraging AWS Cloud Infras...
AWS re:Invent 2016: Reinventing Disaster Recovery Leveraging AWS Cloud Infras...
Amazon Web Services1.5K views
AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration by Amazon Web Services
AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration  AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration
AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration
Amazon Web Services6.8K views
AWS re:Invent 2016: Deep Learning, 3D Content Rendering, and Massively Parall... by Amazon Web Services
AWS re:Invent 2016: Deep Learning, 3D Content Rendering, and Massively Parall...AWS re:Invent 2016: Deep Learning, 3D Content Rendering, and Massively Parall...
AWS re:Invent 2016: Deep Learning, 3D Content Rendering, and Massively Parall...
Amazon Web Services1.9K views
(ENT205) AWS and VMware: How to Architect and Manage Hybrid Environments | AW... by Amazon Web Services
(ENT205) AWS and VMware: How to Architect and Manage Hybrid Environments | AW...(ENT205) AWS and VMware: How to Architect and Manage Hybrid Environments | AW...
(ENT205) AWS and VMware: How to Architect and Manage Hybrid Environments | AW...
Amazon Web Services1.8K views
Hybrid cloud sample architectures by Jarek Sokolnicki
Hybrid cloud sample architecturesHybrid cloud sample architectures
Hybrid cloud sample architectures
Jarek Sokolnicki1.9K views

Similar to Running SQL Server on AWS | John McCormack | DataGrillen 2019

ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa... by
ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...
ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...Amazon Web Services
574 views35 slides
Data Scotland 2019: You can run SQL Server on AWS by
Data Scotland 2019: You can run SQL Server on AWSData Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWSJohn McCormack
389 views30 slides
AWS Webcast - Migrating to RDS Oracle by
AWS Webcast - Migrating to RDS OracleAWS Webcast - Migrating to RDS Oracle
AWS Webcast - Migrating to RDS OracleAmazon Web Services
2.7K views25 slides
Migrating Your Databases to AWS Deep Dive on Amazon RDS and AWS by
Migrating Your Databases to AWS Deep Dive on Amazon RDS and AWSMigrating Your Databases to AWS Deep Dive on Amazon RDS and AWS
Migrating Your Databases to AWS Deep Dive on Amazon RDS and AWSKristana Kane
326 views69 slides
What's New in Amazon RDS for Open-Source & Commercial Databases by
What's New in Amazon RDS for Open-Source & Commercial DatabasesWhat's New in Amazon RDS for Open-Source & Commercial Databases
What's New in Amazon RDS for Open-Source & Commercial DatabasesAmazon Web Services
830 views38 slides
Amazon Relational Database Service (Amazon RDS) by
Amazon Relational Database Service (Amazon RDS)Amazon Relational Database Service (Amazon RDS)
Amazon Relational Database Service (Amazon RDS)Amazon Web Services
6.5K views52 slides

Similar to Running SQL Server on AWS | John McCormack | DataGrillen 2019(20)

ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa... by Amazon Web Services
ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...
ENT305 Migrating Your Databases to AWS: Deep Dive on Amazon Relational Databa...
Data Scotland 2019: You can run SQL Server on AWS by John McCormack
Data Scotland 2019: You can run SQL Server on AWSData Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWS
John McCormack389 views
Migrating Your Databases to AWS Deep Dive on Amazon RDS and AWS by Kristana Kane
Migrating Your Databases to AWS Deep Dive on Amazon RDS and AWSMigrating Your Databases to AWS Deep Dive on Amazon RDS and AWS
Migrating Your Databases to AWS Deep Dive on Amazon RDS and AWS
Kristana Kane326 views
What's New in Amazon RDS for Open-Source & Commercial Databases by Amazon Web Services
What's New in Amazon RDS for Open-Source & Commercial DatabasesWhat's New in Amazon RDS for Open-Source & Commercial Databases
What's New in Amazon RDS for Open-Source & Commercial Databases
Amazon Relational Database Service (Amazon RDS) by Amazon Web Services
Amazon Relational Database Service (Amazon RDS)Amazon Relational Database Service (Amazon RDS)
Amazon Relational Database Service (Amazon RDS)
Amazon Web Services6.5K views
[よくわかるAmazon Redshift in 大阪]Amazon Redshift最新情報と導入事例のご紹介 by Amazon Web Services Japan
[よくわかるAmazon Redshift in 大阪]Amazon Redshift最新情報と導入事例のご紹介[よくわかるAmazon Redshift in 大阪]Amazon Redshift最新情報と導入事例のご紹介
[よくわかるAmazon Redshift in 大阪]Amazon Redshift最新情報と導入事例のご紹介
Using Active Directory in AWS by TriNimbus
Using Active Directory in AWSUsing Active Directory in AWS
Using Active Directory in AWS
TriNimbus2.4K views
AWS Certified Cloud Practitioner Course S11-S17 by Neal Davis
AWS Certified Cloud Practitioner Course S11-S17AWS Certified Cloud Practitioner Course S11-S17
AWS Certified Cloud Practitioner Course S11-S17
Neal Davis4.5K views
AWS Webcast - Introduction to RDS Low Admin High Perf DBS by Amazon Web Services
AWS Webcast - Introduction to RDS Low Admin High Perf DBSAWS Webcast - Introduction to RDS Low Admin High Perf DBS
AWS Webcast - Introduction to RDS Low Admin High Perf DBS
Introduction to Amazon Relational Database Service by Amazon Web Services
Introduction to Amazon Relational Database ServiceIntroduction to Amazon Relational Database Service
Introduction to Amazon Relational Database Service
Amazon Web Services2.7K views
AWS Summit Benelux 2013 - Enterprise Applications on AWS by Amazon Web Services
AWS Summit Benelux 2013 - Enterprise Applications on AWSAWS Summit Benelux 2013 - Enterprise Applications on AWS
AWS Summit Benelux 2013 - Enterprise Applications on AWS
Amazon Web Services2.3K views
Using Amazon RDS to Power Enterprise Applications (DAT202) | AWS re:Invent 2013 by Amazon Web Services
Using Amazon RDS to Power Enterprise Applications (DAT202) | AWS re:Invent 2013Using Amazon RDS to Power Enterprise Applications (DAT202) | AWS re:Invent 2013
Using Amazon RDS to Power Enterprise Applications (DAT202) | AWS re:Invent 2013
Amazon Web Services2.8K views
Migrating to Amazon RDS with Database Migration Service by Amazon Web Services
Migrating to Amazon RDS with Database Migration ServiceMigrating to Amazon RDS with Database Migration Service
Migrating to Amazon RDS with Database Migration Service
AWS Webcast - Introduction to Amazon RDS: Low Admin, High Performance Databas... by Amazon Web Services
AWS Webcast - Introduction to Amazon RDS: Low Admin, High Performance Databas...AWS Webcast - Introduction to Amazon RDS: Low Admin, High Performance Databas...
AWS Webcast - Introduction to Amazon RDS: Low Admin, High Performance Databas...
Amazon Web Services2.6K views
Postgres in Amazon RDS by Denish Patel
Postgres in Amazon RDSPostgres in Amazon RDS
Postgres in Amazon RDS
Denish Patel9.7K views
Amazon Web Services - Relational Database Service Meetup by cyrilkhairallah
Amazon Web Services - Relational Database Service MeetupAmazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service Meetup
cyrilkhairallah1.9K views

Recently uploaded

6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf by
6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf
6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf10urkyr34
6 views259 slides
CRM stick or twist workshop by
CRM stick or twist workshopCRM stick or twist workshop
CRM stick or twist workshopinfo828217
12 views16 slides
[DSC Europe 23] Rania Wazir - Opening up the box: the complexity of human int... by
[DSC Europe 23] Rania Wazir - Opening up the box: the complexity of human int...[DSC Europe 23] Rania Wazir - Opening up the box: the complexity of human int...
[DSC Europe 23] Rania Wazir - Opening up the box: the complexity of human int...DataScienceConferenc1
5 views17 slides
[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx by
[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx
[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptxDataScienceConferenc1
5 views21 slides
Lack of communication among family.pptx by
Lack of communication among family.pptxLack of communication among family.pptx
Lack of communication among family.pptxahmed164023
7 views10 slides
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo... by
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...DataScienceConferenc1
6 views77 slides

Recently uploaded(20)

6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf by 10urkyr34
6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf
6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf
10urkyr346 views
CRM stick or twist workshop by info828217
CRM stick or twist workshopCRM stick or twist workshop
CRM stick or twist workshop
info82821712 views
[DSC Europe 23] Rania Wazir - Opening up the box: the complexity of human int... by DataScienceConferenc1
[DSC Europe 23] Rania Wazir - Opening up the box: the complexity of human int...[DSC Europe 23] Rania Wazir - Opening up the box: the complexity of human int...
[DSC Europe 23] Rania Wazir - Opening up the box: the complexity of human int...
[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx by DataScienceConferenc1
[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx
[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx
Lack of communication among family.pptx by ahmed164023
Lack of communication among family.pptxLack of communication among family.pptx
Lack of communication among family.pptx
ahmed1640237 views
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo... by DataScienceConferenc1
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
Dr. Ousmane Badiane-2023 ReSAKSS Conference by AKADEMIYA2063
Dr. Ousmane Badiane-2023 ReSAKSS ConferenceDr. Ousmane Badiane-2023 ReSAKSS Conference
Dr. Ousmane Badiane-2023 ReSAKSS Conference
AKADEMIYA20635 views
PRIVACY AWRE PERSONAL DATA STORAGE by antony420421
PRIVACY AWRE PERSONAL DATA STORAGEPRIVACY AWRE PERSONAL DATA STORAGE
PRIVACY AWRE PERSONAL DATA STORAGE
antony4204217 views
[DSC Europe 23] Luca Morena - From Psychohistory to Curious Machines by DataScienceConferenc1
[DSC Europe 23] Luca Morena - From Psychohistory to Curious Machines[DSC Europe 23] Luca Morena - From Psychohistory to Curious Machines
[DSC Europe 23] Luca Morena - From Psychohistory to Curious Machines
[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ... by DataScienceConferenc1
[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ...[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ...
[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ...
Product Research sample.pdf by AllenSingson
Product Research sample.pdfProduct Research sample.pdf
Product Research sample.pdf
AllenSingson29 views
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx by DataScienceConferenc1
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx
CRIJ4385_Death Penalty_F23.pptx by yvettemm100
CRIJ4385_Death Penalty_F23.pptxCRIJ4385_Death Penalty_F23.pptx
CRIJ4385_Death Penalty_F23.pptx
yvettemm1007 views
Listed Instruments Survey 2022.pptx by secretariat4
Listed Instruments Survey  2022.pptxListed Instruments Survey  2022.pptx
Listed Instruments Survey 2022.pptx
secretariat431 views
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init... by DataScienceConferenc1
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...
[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ... by DataScienceConferenc1
[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...
[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...
Short Story Assignment by Kelly Nguyen by kellynguyen01
Short Story Assignment by Kelly NguyenShort Story Assignment by Kelly Nguyen
Short Story Assignment by Kelly Nguyen
kellynguyen0119 views

Running SQL Server on AWS | John McCormack | DataGrillen 2019

  • 1. YOU CAN RUN SQL SERVER IN AWS? JOHN MCCORMACK | DATAGRILLEN | JUNE 2019 In this session, I aim to show the different ways of running SQL Server on AWS. I will show the differences between running as a managed service (RDS) and running SQL Server on virtual machines (EC2).
  • 2. YOU CAN RUN SQL SERVER IN AWS? JOHN MCCORMACK | DATAGRILLEN | JUNE 2019 In this session, I aim to show the different ways of running SQL Server on AWS. I will show the differences between running as a managed service (RDS) and running SQL Server on virtual machines (EC2).
  • 3. INTRODUCTION • John McCormack • DBA since 2012 • MCSE Data Management and Analytics • AWS Certified Cloud Solutions Architect - Associate • Initially focussed on SQL Server, now working with various cloud technologies. • RDS, EMR, ElasticSearch, Athena, S3 • Azure SQL DB, IAAS • https://johnmccormack.it • @actualjohn 3
  • 4. TERMINOLOGY • AWS – Amazon Web Services (Cloud computing company) • Region – A geographic area comprising of 2 or more AZs • Availability Zone (AZ) – A data centre within a region, providing options for HA/DR • EC2 – VM within AWS (Windows or Linux) • EBS – Block storage in AWS • S3 – Object storage based in AWS (think dropbox) • Bucket – Folder within S3. Name is globally unique • RDS – Relational Database Service. Managed database instances. Various RDBMSs offered including SQL Server, MySQL, Postgressql, Oracle, MariaDB and Aurora. 4
  • 5. 2 WAYS TO RUN SQL SERVER IN AWS Administration Effort Azure SQL DB RDS Azure Managed Instance EC2 Azure VM • RDS • Managed instance • Less admin, less control • EC2 • VM in the cloud • More admin, more control Control 5
  • 6. RDS VS EC2 FEATURE EC2 RDS Use SSMS ✔ ✔ Use database as source or target for SSIS ✔ ✔ Full control over the instance ✔ Automated backups ✔ Automated patching ✔ Always On Availability groups ✔ (kind of) 6
  • 7. RDS VS EC2 FEATURE EC2 RDS AWS-managed Multi AZ deployment ✔ Log Shipping ✔ Replication ✔ Database mail ✔ Bulk Insert ✔ FILESTREAM ✔ 7
  • 8. RDS VS EC2 Shared responsibility model RDS EC2 HA/DR HA/DR Database backups Database backups SQL Server patching SQL Server patching Installing SQL Server Installing SQL Server OS patching OS patching Network Network Power Power Physical Security Physical Security AWS Responsibility Customer Responsibility 8
  • 9. LETS TALK LICENSING • Express edition is the only license free edition • No developer • License included in instance cost • Enterprise, Standard & Web RDS • You can use developer edition for non prod workloads • BYOL or License included • No software assurance = Dedicated host EC2 9
  • 10. BACKUP / RESTORE – RDS • Automated backups • Set your own retention period • Take ad-hoc snapshots • Kept in your S3 bucket until deleted by user • Snapshots can be shared between accounts • Accounts is similar to subscriptions in Azure so sometimes used for restoring prod to dev or test environments • Point in time restores (within 5 minutes) • You can restore to a new RDS instance 10
  • 11. BACKUP / RESTORE – EC2 S3 offers cross-region bucket replication and versioning ! You pay for all versions so look at setting a ‘lifecycle policy’ Back up to S3 to save money (EBS way more expensive than S3) Directly with 3rd party tools (LiteSpeed / CloudBerry) Copy from EBS to S3 Backup directly to file system (EBS) EBS offers automatic redundancy and encryption You are responsible for your own backups and restores Just like on-premises 11
  • 12. MONITORING • CloudWatch • Near real time info • View multiple instances at once • Trigger alerts • 3rd party tools • sp_whoisactive • Sentry One • Grafana 12
  • 13. DEEP DIVE INTO RDS • Versions and Editions • Instance types • Storage types • HA/DR • Security • Encryption • Parameter groups 13
  • 14. DEEP DIVE INTO RDS – VERSIONS/EDITIONS • Express • Web • Standard • Enterprise • 2012 – 2017 • SQL Server 2008 R2 was removed from options on 1st June 2019. • AWS Warned customers: Upgrade existing instances before June 1, 2019, to avoid automatic upgrade. 14
  • 15. DEEP DIVE INTO RDS – INSTANCE TYPES T2 Burstable Performance Lowest Cost M4 / M5 General Purpose M5 Latest Generation R3 / R4 Memory Optimized R4 Latest Generation • t2.micro • 1 vCPU • 1 GiB RAM • m5.xlarge • 4 vCPU • 16 GiB RAM • r4.xlarge • 4 vCPU • 30.5 GiB RAM 15
  • 16. DEEP DIVE INTO RDS – STORAGE ALL EDITIONS Magnetic * Min: 200 GiB Enterprise/Standard editions, 20 GiB Web/Express Max: 1 TiB all editions General Purpose (SSD) Min: 200 GiB Enterprise/Standard editions, 20 GiB Web/Express Max: 16 TiB all editions Provisioned IOPS (SSD) Min: 200 GiB Enterprise/Standard editions, 100 GiB Web/Express Max: 16 TiB all editions * Backwards compatibility only - Before Jan 2017 16
  • 17. DEEP DIVE INTO RDS – HA/DR • Pick a time to suit your business • Just tell AWS you want to go Multi-AZ Automatic Multi-AZ deployment Manual failovers if you want to test • No manual intervention needed. During automatic failover, any fault with original primary is fixed for you • Automatically chosen depending on version and edition • No readable secondary with AGs Technology used is Mirroring or Always On Availability Groups 17
  • 18. DEEP DIVE INTO RDS – SECURITY • Network Security • VPC • Security Groups • Publicly accessible • Choose your port • Database security • SQL Logins • Master user & others • Active Directory 18
  • 19. DEEP DIVE INTO RDS – ENCRYPTION • In-Transit (SSL Support) • You can use SSL to encrypt connections between your apps and RDS instance • You can force all connections to use SSL • Supported in all regions and for all editions • At Rest • Transparent Data Encryption (TDE) • Available in Enterprise Edition • Simply enable encryption at set up for all other editions (except express) 19
  • 20. DEEP DIVE INTO RDS – PARAMETER GROUPS • Parameter groups allow you to change settings above and beyond your level of access to the instance. • i.e Something requiring sysadmin or securityadmin role • Examples • Some trace flags e.g. 1204, 4199 • Cost threshold for parallelism • Optimize for ad hoc workloads • Changes to parameter groups apply to all instances using the group 20
  • 21. CLI & POWERSHELL • The key to cloud automation is scripting. AWS supports CLI and Powershell to save you from too many clunky manual process. • Examples • aws rds restore-db-instance-from-db- snapshot --db-instance-identifier restored- test-instance --db-snapshot-identifier test- instance-snap • Restore-RDSDBInstanceFromDBSnapshot - DBInstanceIdentifier restored-test-instance -DBSnapshotIdentifier test-instance-snap 21
  • 22. PRE MIGRATION PLANNING – MOVING DATA TB / GB Scale Direct ConnectSnowball / Edge PB Scale • 50 / 80 / 100 TB per device • Can use multiple • Transfers in 1 week • Dedicated connection • 1Gbps - 10Gbps 22 S3 Accelerated Transfer • CloudFront edge Locations • Distance ∝ improvement GB / MB Scale
  • 24. BACKUPS - HAVE YOU SEEN THE SNOWMOBILE Exabyte Scale 24
  • 25. PRE MIGRATION PLANNING 25 TASK Create full inventory Identify features used (What version / edition do we need) Do you have licenses to take to the cloud? What are your high availability / disaster recovery requirements Can you purge unwanted data What are your team’s capabilities
  • 26. MIGRATION STRATEGIES & TOOLS METHOD EC2 RDS Backup / Restore ✔ ✔ Database Migration Service and Schema Conversion Tool ✔ ✔ Log Shipping ✔ Transactional Replication ✔ Snowball ✔ ✔ 26
  • 28. THANK YOU If you want to find out more, go here: • https://johnmccormack.it/ 28
  • 29. FAQS • How long do AWS keep your backups? • 7 days default, can be increased up to 35 days • Can I bring my own license to RDS? • No • Can I scale up in place? • Yes • How can I set up database mail? • Linked server to EC2 or on-prem 29
  • 30. OTHER TECHNOLOGIES • ATHENA • Create Schema • Create databases / tables / views • They are not materialized • Query with SQL in console or JDBC connection • Use GLUE for ETL • Partition and compress to save money 30
  • 31. DEEP DIVE INTO RDS – INSTANCE TYPES Source: SQL Server Edition 2017 and 2016 Support Range 2014, 2012, and 2008 R2 Support Range Enterprise Edition Up to r4.16xlarge or m5.24xlarge Up to r4.8xlarge or m5.24xlarge Standard Edition Up to r4.16xlarge or m5.24xlarge Up to r4.8xlarge or m5.24xlarge Web Edition Up to t2.medium or r4.2xlarge or m5.4xlarge Up to t2.medium or r4.2xlarge or m5.4xlarge Express Edition t2.micro or t2.medium t2.micro or t2.medium 31