SlideShare una empresa de Scribd logo
1 de 82
Azure SQL
more or/and less than SQL Server
Rafał Hryniewski
@r_hryniewski
fb.me/hryniewskinet
.NET Dev
Blogger
Speaker
Community leader
https://hryniewski.net
rafal@hryniewski.net
Azure SQL
more or/and less than SQL Server
IOPS - input/output operations per second
DTU – Database Transaction Unit
IaaS, PaaS, SaaS – Infrastructure/Platform/Software as a Service
Glossary
Database possibilities in Azure
And anything on VM or in a
container
Lets focus on MS SQL
MS SQL Options in Azure
 SQL Server on VM
 SQL Server on container
 Site-to-site VPN with any physical machine (or other hybrid solution)
 Azure SQL
Azure SQL
 Released in 2010
 Database in PaaS model
 Based on most recent, stable SQL Server Enterprise version
 Available in DTU or vCore based pricing and scaling
 Not fully compatible with SQL Server…
 …unless it’s Azure SQL Database Managed Instance, then it’s almost 100%
compatible.
 Lots of out of the box stuff
Various Azure SQL Options
Various Azure SQL Options
Resource
group
Server
Database
Resource group
Azure’s logical container
Azure SQL Server
•Connection data
•Admin credentials
Database
Data
Billing
Service tier
Billing
Configuration
Two pricing/scaling models
DTU Model
 DTU – Data Transaction Unit
 DTU – CPU, memory, I/O and transaction log I/O in one metric
 3 Tiers – Basic, Standard, Premium
 Simple, effortless model.
DTU Tiers comparison
Basic:
 99,99% Uptime SLA
 7 days backup retention
 5 ms read latency
 10 ms write latency
 Up to 2GB storage
 2.5 IOPS per DTU
Standard:
• 35 days backup retention
• Columnstore indexing support
from S3 tier
• Up to 1TB storage
Premium:
 2 ms read/write latency
 Columnstore indexing support
 In-memory OLTP support
 48 IOPS per DTU
vCore Model
 Recommended scaling model
 More control upon resources during scaling
 General Purpose, Business critical and Hyperscale (preview) service tiers
 You’ll be billed for – service tier + no. of vCores and memory + hardware
generation
vCore Model - Choices
 Service Tier
 Hardware generation
 vCores amount (memory is strictly bound to it)
 Storage amount
vCore Model – Service Tiers
General Purpose:
 Premium remote storage (like
VMs)
 500 IOPS per vCore (7000
max)
 1 replica
Business Critical:
 Local SSD Storage
 5000 IOPS per vCore (200 000
max)
 3 replicas, 1 read-scale replica
 Build in support for Availability
Zones
 In-memory OLTP support
vCore Model – Hardware Generation
Gen 4:
 Up to 24 cores
 Based on Intel E5-2673 v3
(Haswell) 2.4 GHz processor
 Based on physical processor
 7 GB memory per vCore
 SSD storage
Gen 5:
 Up to 80 cores
 Based on Intel E5-2673 v4
(Broadwell) 2.3 GHz Processor
 Based on logical processor
 5.1 GB memory per vCore
 eNVM SSD storage (faster)
Can I migrate DTU model to vCore?
DTU -> vCore
 In standard tier each 100 DTU requires 1 General Purpose vCore
 In premium tier each 125 DTU requires 1 Business Critical vCore
Cool stuff
Firewall
Firewall - rules
 Each rule is IP range whitelist
 Rules can be created only by
 Server level rules can be managed with T-SQL, CLI, Powershell or REST
 Databasel level rules can be managed only with T-SQL
Scaling vertically
Scaling up – DTU model
Scaling up – vCore model
Scaling Up
 Minimum downtime
 Sadly, no autoscaling
 Still, it’s effortless...
 ...and there are some workarounds that makes autoscale possible
Scalling horizontaly and replication
Georeplication
Georeplication
 Creates readable replicas (secondaries)
 Manual failover
 Less than 1 minute downtime
 Each transaction is replicated to secondary after commiting to primary (Always
On)
Georeplication
Failover groups
 Defines two listeners read-only and read-write
 Automatic or manual failover
 Need to set grace period for data loss starting from 1 hour
Failover groups
Replication and read-scale out
 Basically read-only replicas for load balancing read-only database traffic
 Available in Premium (DTU) or Business Critical (vCore) Service Tiers
 All it takes is use of ApplicationIntent in Connection String ie:
Server=tcp:<serverName>.database.windows.net;D
atabase=<db>;ApplicationIntent=ReadOnly;User
ID=<login>;Password=<password>;
Recovering database
Auto backup and point-in-time recovery
 Automated backup with 7-35 days retention
 Stored in included Read-access geo-redundant storage (RA-GRS)
 It’s included in price!
Auto backup and point-in-time recovery
 Can be used to restore database from ANY point in time in retention period (on
the same server)
 Can be used to restore deleted db on same server
 Can be used to restore db to other geographic region (in same subscription)
 If server will be deleted – it won’t be possible to perform recovery
Up to ten years with long term backup retention
Long Term Backup Retention
 Backup retention up to 10 years
 Restoring DB is possible from
PowerShell or Azure CLI
 Read-access geo-redundant
storage
 Not available for Managed
Instaces (yet)
 Storage of your own choosing
Monitoring
Monitoring
 Fully integrated with Azure Monitor
 Easy access from portal
 With some other integrations can be used to develop some kind of autoscale
Automatic Performance Tuning
Automatic Performance Tuning
 3 independently toggled options – CREATE INDEX, DROP INDEX and FORCE
LAST GOOD PLAN
 When turned off – you can implement recomendations manually
 Gets smarter with time
Advanced data security
Data discovery and classification
Vulnerability Assesment
Threat detection
Advanced data security
 Set of monitoring and mitigation tools integrated with Azure Security Center
 Can detect some of most common vulnerabilities early and give some guidelines
for fixing them
 Gets smarter over time
 Can be used to monitor environments 24/7 and notify you when something
suspicious happen
Do we need a DBA?
A little bonus – you can integrate with...
 Logic Apps
 Data factory
 Stream Analytics
 Power BI
 Azure Search
 And more!
So... It’s better than SQL Server?
Most of the times eveything just works
Unless we try to do cross database query
Well, cross database queries are possible
but not so simple anymore
1. Read my blog post about this here :
https://hryniewski.net/2018/01/25/querying-external-databases-in-azure-sql/
2. Create master key
3. Create database scoped credential
4. Create external data source
5. Create external table
6. Query some shit
Many features related to master database
Many features regarding master database
 If it touches server level – it’s probably not available
 If it touches OS level – it’s probably not available
 If it touches filesystem - yep, it’s probably not available
 Databases in Azure SQL are separate, highly isolated beings – that’s why
So, forget about...
 Always On Availability Group (but you have other stuff for that)
 BACKUP command (but you have automated backups)
 Database mail (you can try using logic app)
 Server level triggers (yuck)
 Other than primary file group
 Service broker (there are better services for that)
 Profiler (it’s obsolete anyway)
 Windows authentication
You may also need to remodel your db if
you’re using some not supported syntax
So beware if you’re using
 LOGINS (you’ll ned to switch to USERS)
 CLR (entirelly not supported)
 USE statement
 Events, query notifications etc.
 In-memory OLTP (available only in higher service tiers)
 Column store indexes (available only in higher service tiers)
Gotchas
CREATE DATABASE – Creates S0 database (can be expensive if used for
development)
Gotchas
If you’re migrating from SQL Server 2005 or lower – be aware that 100 is the
minimum compatibility level that’s supported
Gotchas
Workloads that made physical server slightly warmed up can use 100% of your
resources easily and freeze your application for a long time.
Is migration of SQL Server to PaaS hard?
Migration 101
Migration 101 (very, very short version)
 Download Data Migration Assistant from the title
 Use VNET with VPN or Express Route to OnPrem
 Set up your network ruless to allow for traffic
 Perform compatibility assesment
 Create and configure Azure Database Migration Service
 Create and configure migration project
 Run
 Go home.
Questions?
It’s not better. It’s not worse. It’s different.
Grab a beer, try it when you sober up.
@r_hryniewskifb.me/hryniewskinet

Más contenido relacionado

La actualidad más candente

Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars Platzdasch
Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars PlatzdaschAzure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars Platzdasch
Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars PlatzdaschLars Platzdasch
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesAmazon Web Services
 
Azure virtual machines & Terraform
Azure virtual machines  & Terraform Azure virtual machines  & Terraform
Azure virtual machines & Terraform Juan Jose Gazzola
 
Benefity Oracle Cloudu (3/4): Compute
Benefity Oracle Cloudu (3/4): ComputeBenefity Oracle Cloudu (3/4): Compute
Benefity Oracle Cloudu (3/4): ComputeMarketingArrowECS_CZ
 
PostgreSQL on Amazon RDS
PostgreSQL on Amazon RDSPostgreSQL on Amazon RDS
PostgreSQL on Amazon RDSPGConf APAC
 
Disaster Recovery Planning using Azure Site Recovery
Disaster Recovery Planning using Azure Site RecoveryDisaster Recovery Planning using Azure Site Recovery
Disaster Recovery Planning using Azure Site RecoveryNitin Agarwal
 
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBeganKoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBeganTobias Koprowski
 
When Disaster Strikes
When Disaster StrikesWhen Disaster Strikes
When Disaster StrikesAidan Finn
 
Oracle Cloud Infrastructure – Storage
Oracle Cloud Infrastructure – StorageOracle Cloud Infrastructure – Storage
Oracle Cloud Infrastructure – StorageMarketingArrowECS_CZ
 
Migrate Oracle database to Amazon RDS
Migrate Oracle database to Amazon RDSMigrate Oracle database to Amazon RDS
Migrate Oracle database to Amazon RDSJesus Guzman
 
Lesson 1 configuring
Lesson 1   configuringLesson 1   configuring
Lesson 1 configuringRam Kedem
 
Windows Azure Blob Storage
Windows Azure Blob StorageWindows Azure Blob Storage
Windows Azure Blob Storageylew15
 
Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and dockerBob Ward
 
SQL Server Cluster Presentation
SQL Server Cluster PresentationSQL Server Cluster Presentation
SQL Server Cluster Presentationwebhostingguy
 
Provisioning and automating high availability postgres on aws ec2 (1)
Provisioning and automating high availability postgres on aws ec2 (1)Provisioning and automating high availability postgres on aws ec2 (1)
Provisioning and automating high availability postgres on aws ec2 (1)Payal Singh
 
How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...Adeline Wong
 
Amazon (AWS) Aurora
Amazon (AWS) AuroraAmazon (AWS) Aurora
Amazon (AWS) AuroraPGConf APAC
 
Enhancements that will make your sql database roar sp1 edition sql bits 2017
Enhancements that will make your sql database roar sp1 edition sql bits 2017Enhancements that will make your sql database roar sp1 edition sql bits 2017
Enhancements that will make your sql database roar sp1 edition sql bits 2017Bob Ward
 

La actualidad más candente (20)

Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars Platzdasch
Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars PlatzdaschAzure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars Platzdasch
Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars Platzdasch
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instances
 
Windows Azure Storage – Architecture View
Windows Azure Storage – Architecture ViewWindows Azure Storage – Architecture View
Windows Azure Storage – Architecture View
 
Azure virtual machines & Terraform
Azure virtual machines  & Terraform Azure virtual machines  & Terraform
Azure virtual machines & Terraform
 
Benefity Oracle Cloudu (3/4): Compute
Benefity Oracle Cloudu (3/4): ComputeBenefity Oracle Cloudu (3/4): Compute
Benefity Oracle Cloudu (3/4): Compute
 
PostgreSQL on Amazon RDS
PostgreSQL on Amazon RDSPostgreSQL on Amazon RDS
PostgreSQL on Amazon RDS
 
Disaster Recovery Planning using Azure Site Recovery
Disaster Recovery Planning using Azure Site RecoveryDisaster Recovery Planning using Azure Site Recovery
Disaster Recovery Planning using Azure Site Recovery
 
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBeganKoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
 
When Disaster Strikes
When Disaster StrikesWhen Disaster Strikes
When Disaster Strikes
 
IaaS for DBAs in Azure
IaaS for DBAs in AzureIaaS for DBAs in Azure
IaaS for DBAs in Azure
 
Oracle Cloud Infrastructure – Storage
Oracle Cloud Infrastructure – StorageOracle Cloud Infrastructure – Storage
Oracle Cloud Infrastructure – Storage
 
Migrate Oracle database to Amazon RDS
Migrate Oracle database to Amazon RDSMigrate Oracle database to Amazon RDS
Migrate Oracle database to Amazon RDS
 
Lesson 1 configuring
Lesson 1   configuringLesson 1   configuring
Lesson 1 configuring
 
Windows Azure Blob Storage
Windows Azure Blob StorageWindows Azure Blob Storage
Windows Azure Blob Storage
 
Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and docker
 
SQL Server Cluster Presentation
SQL Server Cluster PresentationSQL Server Cluster Presentation
SQL Server Cluster Presentation
 
Provisioning and automating high availability postgres on aws ec2 (1)
Provisioning and automating high availability postgres on aws ec2 (1)Provisioning and automating high availability postgres on aws ec2 (1)
Provisioning and automating high availability postgres on aws ec2 (1)
 
How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
How to backup Oracle Database to Dropbox, Windows Azure, Amazon S3, and local...
 
Amazon (AWS) Aurora
Amazon (AWS) AuroraAmazon (AWS) Aurora
Amazon (AWS) Aurora
 
Enhancements that will make your sql database roar sp1 edition sql bits 2017
Enhancements that will make your sql database roar sp1 edition sql bits 2017Enhancements that will make your sql database roar sp1 edition sql bits 2017
Enhancements that will make your sql database roar sp1 edition sql bits 2017
 

Similar a Azure SQL - more or/and less than SQL Server

Azure Data platform
Azure Data platformAzure Data platform
Azure Data platformMostafa
 
Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019Jovan Popovic
 
GWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformGWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformMarcelo Paiva
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseJames Serra
 
Microsoft Azure Offerings and New Services
Microsoft Azure Offerings and New Services Microsoft Azure Offerings and New Services
Microsoft Azure Offerings and New Services Mohamed Tawfik
 
Migrate or modernize your database applications using Azure SQL Database Mana...
Migrate or modernize your database applications using Azure SQL Database Mana...Migrate or modernize your database applications using Azure SQL Database Mana...
Migrate or modernize your database applications using Azure SQL Database Mana...ALI ANWAR, OCP®
 
02_DP_300T00A_Plan_implement.pptx
02_DP_300T00A_Plan_implement.pptx02_DP_300T00A_Plan_implement.pptx
02_DP_300T00A_Plan_implement.pptxKareemBullard1
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBob Ward
 
Implement SQL Server on an Azure VM
Implement SQL Server on an Azure VMImplement SQL Server on an Azure VM
Implement SQL Server on an Azure VMJames Serra
 
Azure Virtual Machines Deployment Scenarios
Azure Virtual Machines Deployment ScenariosAzure Virtual Machines Deployment Scenarios
Azure Virtual Machines Deployment ScenariosBrian Benz
 
JoTechies - Azure SQL DB
JoTechies - Azure SQL DBJoTechies - Azure SQL DB
JoTechies - Azure SQL DBJoTechies
 
Taking SharePoint to the Cloud
Taking SharePoint to the CloudTaking SharePoint to the Cloud
Taking SharePoint to the CloudAaron Saikovski
 
Building your first sql server cluster
Building your first sql server clusterBuilding your first sql server cluster
Building your first sql server clusterJoseph D'Antoni
 
I/O & virtualization performance with a search engine based on an xml databa...
 I/O & virtualization performance with a search engine based on an xml databa... I/O & virtualization performance with a search engine based on an xml databa...
I/O & virtualization performance with a search engine based on an xml databa...lucenerevolution
 
Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014Brian Benz
 
07_DP_300T00A_HA_Disaster_Recovery.pptx
07_DP_300T00A_HA_Disaster_Recovery.pptx07_DP_300T00A_HA_Disaster_Recovery.pptx
07_DP_300T00A_HA_Disaster_Recovery.pptxKareemBullard1
 
VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld
 
Azure SQL Database
Azure SQL DatabaseAzure SQL Database
Azure SQL Databaserockplace
 

Similar a Azure SQL - more or/and less than SQL Server (20)

Azure Data platform
Azure Data platformAzure Data platform
Azure Data platform
 
Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019
 
GWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformGWAB 2015 - Data Plaraform
GWAB 2015 - Data Plaraform
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
 
Microsoft Azure Offerings and New Services
Microsoft Azure Offerings and New Services Microsoft Azure Offerings and New Services
Microsoft Azure Offerings and New Services
 
Migrate or modernize your database applications using Azure SQL Database Mana...
Migrate or modernize your database applications using Azure SQL Database Mana...Migrate or modernize your database applications using Azure SQL Database Mana...
Migrate or modernize your database applications using Azure SQL Database Mana...
 
02_DP_300T00A_Plan_implement.pptx
02_DP_300T00A_Plan_implement.pptx02_DP_300T00A_Plan_implement.pptx
02_DP_300T00A_Plan_implement.pptx
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and docker
 
Implement SQL Server on an Azure VM
Implement SQL Server on an Azure VMImplement SQL Server on an Azure VM
Implement SQL Server on an Azure VM
 
Azure Virtual Machines Deployment Scenarios
Azure Virtual Machines Deployment ScenariosAzure Virtual Machines Deployment Scenarios
Azure Virtual Machines Deployment Scenarios
 
JoTechies - Azure SQL DB
JoTechies - Azure SQL DBJoTechies - Azure SQL DB
JoTechies - Azure SQL DB
 
Taking SharePoint to the Cloud
Taking SharePoint to the CloudTaking SharePoint to the Cloud
Taking SharePoint to the Cloud
 
Building your first sql server cluster
Building your first sql server clusterBuilding your first sql server cluster
Building your first sql server cluster
 
Sql Azure
Sql AzureSql Azure
Sql Azure
 
I/O & virtualization performance with a search engine based on an xml databa...
 I/O & virtualization performance with a search engine based on an xml databa... I/O & virtualization performance with a search engine based on an xml databa...
I/O & virtualization performance with a search engine based on an xml databa...
 
Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014
 
07_DP_300T00A_HA_Disaster_Recovery.pptx
07_DP_300T00A_HA_Disaster_Recovery.pptx07_DP_300T00A_HA_Disaster_Recovery.pptx
07_DP_300T00A_HA_Disaster_Recovery.pptx
 
VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right
 
Optimiser votre infrastructure SQL Server avec Azure
Optimiser votre infrastructure SQL Server avec AzureOptimiser votre infrastructure SQL Server avec Azure
Optimiser votre infrastructure SQL Server avec Azure
 
Azure SQL Database
Azure SQL DatabaseAzure SQL Database
Azure SQL Database
 

Más de Rafał Hryniewski

DevSecOps - security all the way
DevSecOps - security all the wayDevSecOps - security all the way
DevSecOps - security all the wayRafał Hryniewski
 
DevSecOps - Security all the way
DevSecOps - Security all the wayDevSecOps - Security all the way
DevSecOps - Security all the wayRafał Hryniewski
 
Large scale, distributed and reliable messaging with Kafka
Large scale, distributed and reliable messaging with KafkaLarge scale, distributed and reliable messaging with Kafka
Large scale, distributed and reliable messaging with KafkaRafał Hryniewski
 
Meet Gremlin – your guide through graphs in Cosmos DB
Meet Gremlin – your guide through graphs in Cosmos DBMeet Gremlin – your guide through graphs in Cosmos DB
Meet Gremlin – your guide through graphs in Cosmos DBRafał Hryniewski
 
Shit happens – achieve extensibility, modularity and loosely coupled architec...
Shit happens – achieve extensibility, modularity and loosely coupled architec...Shit happens – achieve extensibility, modularity and loosely coupled architec...
Shit happens – achieve extensibility, modularity and loosely coupled architec...Rafał Hryniewski
 
Public speaking - why am I doing this to myself and why you should too?
Public speaking - why am I doing this to myself and why you should too?Public speaking - why am I doing this to myself and why you should too?
Public speaking - why am I doing this to myself and why you should too?Rafał Hryniewski
 
Essential security measures in ASP.NET MVC
Essential security measures in ASP.NET MVC Essential security measures in ASP.NET MVC
Essential security measures in ASP.NET MVC Rafał Hryniewski
 
ORM – The tip of an iceberg
ORM – The tip of an icebergORM – The tip of an iceberg
ORM – The tip of an icebergRafał Hryniewski
 
Quick trip around the Cosmos - Things every astronaut supposed to know
Quick trip around the Cosmos - Things every astronaut supposed to knowQuick trip around the Cosmos - Things every astronaut supposed to know
Quick trip around the Cosmos - Things every astronaut supposed to knowRafał Hryniewski
 

Más de Rafał Hryniewski (17)

Azure messaging
Azure messagingAzure messaging
Azure messaging
 
Azure developer
Azure developerAzure developer
Azure developer
 
Great webapis
Great webapisGreat webapis
Great webapis
 
DevSecOps - security all the way
DevSecOps - security all the wayDevSecOps - security all the way
DevSecOps - security all the way
 
DevSecOps - Security all the way
DevSecOps - Security all the wayDevSecOps - Security all the way
DevSecOps - Security all the way
 
Anchor modeling
Anchor modelingAnchor modeling
Anchor modeling
 
Large scale, distributed and reliable messaging with Kafka
Large scale, distributed and reliable messaging with KafkaLarge scale, distributed and reliable messaging with Kafka
Large scale, distributed and reliable messaging with Kafka
 
Meet Gremlin – your guide through graphs in Cosmos DB
Meet Gremlin – your guide through graphs in Cosmos DBMeet Gremlin – your guide through graphs in Cosmos DB
Meet Gremlin – your guide through graphs in Cosmos DB
 
Shit happens – achieve extensibility, modularity and loosely coupled architec...
Shit happens – achieve extensibility, modularity and loosely coupled architec...Shit happens – achieve extensibility, modularity and loosely coupled architec...
Shit happens – achieve extensibility, modularity and loosely coupled architec...
 
Web app security essentials
Web app security essentialsWeb app security essentials
Web app security essentials
 
Public speaking - why am I doing this to myself and why you should too?
Public speaking - why am I doing this to myself and why you should too?Public speaking - why am I doing this to myself and why you should too?
Public speaking - why am I doing this to myself and why you should too?
 
Blazor
BlazorBlazor
Blazor
 
Shodan
ShodanShodan
Shodan
 
Essential security measures in ASP.NET MVC
Essential security measures in ASP.NET MVC Essential security measures in ASP.NET MVC
Essential security measures in ASP.NET MVC
 
.NET, Alexa and me
.NET, Alexa and me.NET, Alexa and me
.NET, Alexa and me
 
ORM – The tip of an iceberg
ORM – The tip of an icebergORM – The tip of an iceberg
ORM – The tip of an iceberg
 
Quick trip around the Cosmos - Things every astronaut supposed to know
Quick trip around the Cosmos - Things every astronaut supposed to knowQuick trip around the Cosmos - Things every astronaut supposed to know
Quick trip around the Cosmos - Things every astronaut supposed to know
 

Último

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Último (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Azure SQL - more or/and less than SQL Server

  • 1.
  • 2. Azure SQL more or/and less than SQL Server
  • 4.
  • 5. Azure SQL more or/and less than SQL Server
  • 6. IOPS - input/output operations per second DTU – Database Transaction Unit IaaS, PaaS, SaaS – Infrastructure/Platform/Software as a Service Glossary
  • 7. Database possibilities in Azure And anything on VM or in a container
  • 8. Lets focus on MS SQL
  • 9. MS SQL Options in Azure  SQL Server on VM  SQL Server on container  Site-to-site VPN with any physical machine (or other hybrid solution)  Azure SQL
  • 10.
  • 11. Azure SQL  Released in 2010  Database in PaaS model  Based on most recent, stable SQL Server Enterprise version  Available in DTU or vCore based pricing and scaling  Not fully compatible with SQL Server…  …unless it’s Azure SQL Database Managed Instance, then it’s almost 100% compatible.  Lots of out of the box stuff
  • 12.
  • 13. Various Azure SQL Options
  • 14. Various Azure SQL Options
  • 16. Resource group Azure’s logical container Azure SQL Server •Connection data •Admin credentials Database Data Billing Service tier Billing Configuration
  • 18. DTU Model  DTU – Data Transaction Unit  DTU – CPU, memory, I/O and transaction log I/O in one metric  3 Tiers – Basic, Standard, Premium  Simple, effortless model.
  • 19. DTU Tiers comparison Basic:  99,99% Uptime SLA  7 days backup retention  5 ms read latency  10 ms write latency  Up to 2GB storage  2.5 IOPS per DTU Standard: • 35 days backup retention • Columnstore indexing support from S3 tier • Up to 1TB storage
  • 20. Premium:  2 ms read/write latency  Columnstore indexing support  In-memory OLTP support  48 IOPS per DTU
  • 21. vCore Model  Recommended scaling model  More control upon resources during scaling  General Purpose, Business critical and Hyperscale (preview) service tiers  You’ll be billed for – service tier + no. of vCores and memory + hardware generation
  • 22. vCore Model - Choices  Service Tier  Hardware generation  vCores amount (memory is strictly bound to it)  Storage amount
  • 23. vCore Model – Service Tiers General Purpose:  Premium remote storage (like VMs)  500 IOPS per vCore (7000 max)  1 replica Business Critical:  Local SSD Storage  5000 IOPS per vCore (200 000 max)  3 replicas, 1 read-scale replica  Build in support for Availability Zones  In-memory OLTP support
  • 24. vCore Model – Hardware Generation Gen 4:  Up to 24 cores  Based on Intel E5-2673 v3 (Haswell) 2.4 GHz processor  Based on physical processor  7 GB memory per vCore  SSD storage Gen 5:  Up to 80 cores  Based on Intel E5-2673 v4 (Broadwell) 2.3 GHz Processor  Based on logical processor  5.1 GB memory per vCore  eNVM SSD storage (faster)
  • 25. Can I migrate DTU model to vCore?
  • 26.
  • 27. DTU -> vCore  In standard tier each 100 DTU requires 1 General Purpose vCore  In premium tier each 125 DTU requires 1 Business Critical vCore
  • 30.
  • 31. Firewall - rules  Each rule is IP range whitelist  Rules can be created only by  Server level rules can be managed with T-SQL, CLI, Powershell or REST  Databasel level rules can be managed only with T-SQL
  • 33. Scaling up – DTU model
  • 34. Scaling up – vCore model
  • 35. Scaling Up  Minimum downtime  Sadly, no autoscaling  Still, it’s effortless...  ...and there are some workarounds that makes autoscale possible
  • 38. Georeplication  Creates readable replicas (secondaries)  Manual failover  Less than 1 minute downtime  Each transaction is replicated to secondary after commiting to primary (Always On)
  • 40. Failover groups  Defines two listeners read-only and read-write  Automatic or manual failover  Need to set grace period for data loss starting from 1 hour
  • 41.
  • 43. Replication and read-scale out  Basically read-only replicas for load balancing read-only database traffic  Available in Premium (DTU) or Business Critical (vCore) Service Tiers  All it takes is use of ApplicationIntent in Connection String ie: Server=tcp:<serverName>.database.windows.net;D atabase=<db>;ApplicationIntent=ReadOnly;User ID=<login>;Password=<password>;
  • 44.
  • 46. Auto backup and point-in-time recovery  Automated backup with 7-35 days retention  Stored in included Read-access geo-redundant storage (RA-GRS)  It’s included in price!
  • 47. Auto backup and point-in-time recovery  Can be used to restore database from ANY point in time in retention period (on the same server)  Can be used to restore deleted db on same server  Can be used to restore db to other geographic region (in same subscription)  If server will be deleted – it won’t be possible to perform recovery
  • 48. Up to ten years with long term backup retention
  • 49. Long Term Backup Retention  Backup retention up to 10 years  Restoring DB is possible from PowerShell or Azure CLI  Read-access geo-redundant storage  Not available for Managed Instaces (yet)  Storage of your own choosing
  • 51. Monitoring  Fully integrated with Azure Monitor  Easy access from portal  With some other integrations can be used to develop some kind of autoscale
  • 53.
  • 54. Automatic Performance Tuning  3 independently toggled options – CREATE INDEX, DROP INDEX and FORCE LAST GOOD PLAN  When turned off – you can implement recomendations manually  Gets smarter with time
  • 56. Data discovery and classification
  • 59. Advanced data security  Set of monitoring and mitigation tools integrated with Azure Security Center  Can detect some of most common vulnerabilities early and give some guidelines for fixing them  Gets smarter over time  Can be used to monitor environments 24/7 and notify you when something suspicious happen
  • 60. Do we need a DBA?
  • 61.
  • 62. A little bonus – you can integrate with...  Logic Apps  Data factory  Stream Analytics  Power BI  Azure Search  And more!
  • 63. So... It’s better than SQL Server?
  • 64.
  • 65. Most of the times eveything just works
  • 66. Unless we try to do cross database query
  • 67. Well, cross database queries are possible but not so simple anymore 1. Read my blog post about this here : https://hryniewski.net/2018/01/25/querying-external-databases-in-azure-sql/ 2. Create master key 3. Create database scoped credential 4. Create external data source 5. Create external table 6. Query some shit
  • 68. Many features related to master database
  • 69. Many features regarding master database  If it touches server level – it’s probably not available  If it touches OS level – it’s probably not available  If it touches filesystem - yep, it’s probably not available  Databases in Azure SQL are separate, highly isolated beings – that’s why
  • 70. So, forget about...  Always On Availability Group (but you have other stuff for that)  BACKUP command (but you have automated backups)  Database mail (you can try using logic app)  Server level triggers (yuck)  Other than primary file group  Service broker (there are better services for that)  Profiler (it’s obsolete anyway)  Windows authentication
  • 71.
  • 72. You may also need to remodel your db if you’re using some not supported syntax
  • 73. So beware if you’re using  LOGINS (you’ll ned to switch to USERS)  CLR (entirelly not supported)  USE statement  Events, query notifications etc.  In-memory OLTP (available only in higher service tiers)  Column store indexes (available only in higher service tiers)
  • 74. Gotchas CREATE DATABASE – Creates S0 database (can be expensive if used for development)
  • 75. Gotchas If you’re migrating from SQL Server 2005 or lower – be aware that 100 is the minimum compatibility level that’s supported
  • 76. Gotchas Workloads that made physical server slightly warmed up can use 100% of your resources easily and freeze your application for a long time.
  • 77. Is migration of SQL Server to PaaS hard?
  • 79. Migration 101 (very, very short version)  Download Data Migration Assistant from the title  Use VNET with VPN or Express Route to OnPrem  Set up your network ruless to allow for traffic  Perform compatibility assesment  Create and configure Azure Database Migration Service  Create and configure migration project  Run  Go home.
  • 80.
  • 82. It’s not better. It’s not worse. It’s different. Grab a beer, try it when you sober up. @r_hryniewskifb.me/hryniewskinet