Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Running SQL Server on AWS | John McCormack | DataGrillen 2019

88 views

Published on

Slides for my presentation: You can SQL Server on AWS?

Presented at DataGrillen conference on 20th June 2019

Published in: Data & Analytics
  • DOWNLOAD FULL eBOOK INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookeBOOK Crime, eeBOOK Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Running SQL Server on AWS | John McCormack | DataGrillen 2019

  1. 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. 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. 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. 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. 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. 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. 7. RDS VS EC2 FEATURE EC2 RDS AWS-managed Multi AZ deployment ✔ Log Shipping ✔ Replication ✔ Database mail ✔ Bulk Insert ✔ FILESTREAM ✔ 7
  8. 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. 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. 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. 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. 12. MONITORING • CloudWatch • Near real time info • View multiple instances at once • Trigger alerts • 3rd party tools • sp_whoisactive • Sentry One • Grafana 12
  13. 13. DEEP DIVE INTO RDS • Versions and Editions • Instance types • Storage types • HA/DR • Security • Encryption • Parameter groups 13
  14. 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. 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. 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. 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. 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. 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. 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. 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. 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
  23. 23. 23 EDGE LOCATIONS © https://aws.amazon.com/cloudfront/features/#Amazon_CloudFront_Infra
  24. 24. BACKUPS - HAVE YOU SEEN THE SNOWMOBILE Exabyte Scale 24
  25. 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. 26. MIGRATION STRATEGIES & TOOLS METHOD EC2 RDS Backup / Restore ✔ ✔ Database Migration Service and Schema Conversion Tool ✔ ✔ Log Shipping ✔ Transactional Replication ✔ Snowball ✔ ✔ 26
  27. 27. DEMO 27
  28. 28. THANK YOU If you want to find out more, go here: • https://johnmccormack.it/ 28
  29. 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. 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. 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

×