SlideShare a Scribd company logo
Azure SQL Database
for the
SQL Server DBA
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
https://tinyurl.com/y9opcae5
EVALUATIONS
Ask your
Questions
PRESENTERINFO
1982 I started working with computers
1988 I started my professional career in computers industry
1996 I started working with SQL Server 6.0
1998 I earned my first certification at Microsoft as
Microsoft Certified Solution Developer (3rd in Greece)
1999 I started my career as Microsoft Certified Trainer (MCT) with more than
30.000 hours of training until now!
2010 I became for first time Microsoft MVP on Data Platform
I created the SQL School Greece www.sqlschool.gr
2012 I became MCT Regional Lead by Microsoft Learning Program.
2013 I was certified as MCSE : Data Platform
I was certified as MCSE : Business Intelligence
2016 I was certified as MCSE: Data Management & Analytics
2017 Certified as MCSA : Machine Learning
Recertified as MCSE: Data Management & Analytics
Antonios
Chatzipavlis
Data Solutions
Consultant & Trainer
MVP on Data Platform
MCT, MCSE, MCITP, MCPD, MCSD, MCDBA,
MCSA, MCTS, MCAD, MCP, OCA, ITIL-F
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Μια πηγή ενημέρωσης για την Microsoft Data Platform
προς τους Έλληνες IT Professionals, DBAs, Developers,
Information Workers αλλά και απλούς χομπίστες που
απλά τους αρέσει ο SQL Server.
Help line : help@sqlschool.gr
• Articles about SQL Server
• SQL Server News
• SQL Nights
• Webcasts
• Downloads
• Resources
What we are doing here Follow us in socials
fb/sqlschoolgr
fb/groups/sqlschool
@antoniosch
@sqlschool
yt/c/SqlschoolGr
SQL School Greece group
SELECT KNOWLEDGE
FROM SQL SERVER
Connect with PASS
Sign up for a free membership today at:
pass.org
is the PASS Local Group in Greece
PASS VIRTUAL CHAPTERS
http://www.sqlsaturday.com/731/eventhome.aspx
LET’S START
WHAT IS A ZURE SQL DATABASE?
The service users pay
according to their usage
of the service.
The service is paid by
the hour.
The hourly rate is based
on the highest service
tier selected during that
hour.
Users can scale up or
down on demand
User can create and
destroy environments
on demand
The service provider
manages and owns the
database software.
The service provider
doing common
administration tasks
(backups, HA, OS etc.)
CLOUD FIRST RELEASE MODEL
• The service provides a database engine.
• You can’t restore a SQL Server backup directly to Azure SQL Database.
• You are not the Sysadmin of your server.
• The service provides its own High Availability
• There’s no SQL Agent service.
• System views like sys.dm_exec_requests operate at the database scope, not
server scope like SQL Server.
• There is no Error log file to open, but a system log view instead.
• TDE is an Enterprise feature on SQL Server, available in all tiers on Azure SQL
Database.
• Auditing is an Enterprise feature available in all tiers of Azure SQL Database.
• Azure also has a threat detection service that can alert you if it detects SQL
injection attempts, logins from new locations or other unusual patterns.
A ZURE SQL DATABASE VS. SQL SERVER
DBA’S TASKS AND RESPONSIBILITIES
Classic DBA
• Maintain the Operating System
• Maintain SQL Server
• Setup Backups
• High Availability
• Disaster Recovery
• Performance
• Change Control
• Security
Azure DBA
• Choosing the right service tier
• Test the HADR
• Performance
• Change Control
• Security
• Azure SQL DB offers 3 service tiers:
- Basic (2GB, 7d RTO, 5 DTU)
- Standard (250GB, 35d RTO, 10-100 DTU)
- Premium (1000GB, 35d RTO, 125-4000 DTU,
In-Memory, Columnstore Indexes)
• The service tiers defines:
- Size
- Performance
- Concurrency
- Recovery
- Features
UNDERSTANDING THE SERVICE TIERS
• Performance is measured in DTUs.
- DTU = CPU + Memory + Data IO +
Log IO
• Multiple databases can share
resources through elastic database
pools.
• The service also offers other elastic
database capabilities.
- Elastic DB .NET Library
- Elastic DB Jobs
- Elastic Query
For an initial estimate, there is a DTU Calculator at
http://dtucalculator.azurewebsites.net
HOW DO I KNOW HOW MANY DTUS I NEED TO
MIGRATE MY SQL SERVER DATABASE ON AZURE?
DTU CALCUL ATOR
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
GET TING STARTED
Create an Azure SQL
Database Server
• A server is a logical entity for
grouping databases.
• Pick a Name
• Pick a Region
Create a Database
inside the Server
• Pick a DB Server
• Pick a DB Name
• Pick a Service Tier
PROVISIONING A ZURE SQL DATABASE
• Create a resource > Databases > SQL DatabaseAzure Portal
• New-AzureRmSqlDatabase CmdletPowerShell
• CREATE DATABASE commandT-SQL
PROVISIONING
A ZURE SQL DATABASE
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
CONNECTING TO A DATABASE
SQL Authentication
Individual accounts only.
Multi-server access requires multiple users.
No built-in password expiration.
Azure AD Authentication
Individual and group accounts.
One identity can be granted access to
multiple servers.
Password expiration follows the AAD policy.
CONFIGURING
THE FIREWALL RULES TO
CONNECT TO THE DATABASE
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
• Backups happen automatically as part
of the service
• Retention Period of Backups
- 7 days for Basic tier
- 35 days for Standard tier
- 35 days for Premium tier
• Backups are Geo-Replicated
- Backups are replicated to a paired Azure
region by the service.
- In the event of a region outage, you can
restore your backups to another region.
• Backup Schedule
- Weekly Full Backup
- Hourly Differential Backup
- Every 5 min Transaction Log Backup
BACKUP CAPABILITIES
• In case of Archiving
- Manually export the database to BACPAC and keep
copies on Azure Blob Storage.
• All databases support Point in Time Recovery
with a 12 Hour RTO and 5 minute RPO for the
in-region backups
• Azure provides 2x your max storage size as
included backup storage.
• What happens if you reach this amount of
backup storage?
- Reduce the retention period by contacting Azure
support.
- Pay for extra backup storage billed at the standard
Read-Access Geographically Redundant Storage
rate.
• If you delete a database, you can restore as
long as you’re still inside the retention period.
• If you delete the server, all backups are
deleted with no restore capability.
• Restores can be done to the logical server hosting the database or to another
region.
• Local Restores
- A new database on the same logical server recovered to a specified point in time
- A database on the same logical server recovered to the deletion time
- You cannot overwrite an existing database
- If you want to replace a database with a restored copy, you can rename the original and then rename
the restored database.
• Geo Restores
- A new database on any server on any region up to the latest geo-replicated backup
- Full and differentials are geo-replicated
- Geo-Restores have an 1 hour RPO due to the possible delay in geo-replication.
RESTORE CAPABILITIES
Azure keeps 3 local high available copies
in the server region
In case of region disaster we can use
geo-restore or Azure Database Geo-
Replication
BUILT-IN HIGH
AVAILABILITY
• A component of Azure SQL Database that provides service managed database
replicas that can be used for read-only scale and failover.
• Provides up to four readable database replicas.
- The service does not provide the option for synchronous replication.
- Because the replication is asynchronous, there’s always a risk of data loss due to
network latency.
- If you want to make a session wait until the current log has been completely replicated
you can use the sp_wait_for_database_copy_sync procedure.
• Active Geo-Replication provides a 30 second RTO and 5 second RPO.
• Each active geo-replication secondary is billed at full price.
A ZURE DATABASE GEO-REPLICATION
DATABASE FAILOVER METHODS
PLANNED
• ALTER DATABASE FAILOVER
• Initiated by an administrator
• The system switches to synchronous
mode temporarily to avoid data loss
• The old primary becomes a
secondary and starts syncing
immediately
UNPLANNED
• ALTER DATABASE
FORCE_FAILEOVER_ALLOW_DATA_
LOSS
• Triggered by a real region outage
• The role is changed immediately so
data loss is possible
• When the old primary eventually
comes back, an incremental backup
is taken and it becomes a
secondary
The user configuring Geo-Replication or executing the FAILOVER command must be DBManager on both the primary server and the secondary server.
ACTIVE GEO-REPLICATION
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
• A proper migration methodology will ensure a successful migration project.
• Direct backup restore from SQL Server is not supported.
• Migrating to the service can be done with a variety of tools.
• Short downtime migrations can be done with Transactional Replication.
• Migrating from the service can be done with a BACPAC file export.
MIGRATION TO A ZURE SQL DATABASE
MIGRATION METHODOLOGY
Benefits
Stoppers
Service
Model
Service
Tier
Region
Migration
Tool
MIGRATING TOOLS
Migration Wizard on
SSMS
• All-in-one process
• Big Downtime
• Not suitable for Large
Databases
Transactional Replication
• Multi-step process
• More control in process
• Complex process
• Small Downtime
• Suitable for Large
Databases
• Source must be
• SQL 2012 SP2 CU8
• SQL 2014 SP1 CU3
• SQL 2016
• SQL 2017
Manual Export/Import
• Multi-step process
• More control in process
• Large Downtime
• Suitable for Large
Databases
• if downtime is
acceptable
USING
MIGRATION WIZARD
ON SSMS
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
• Azure Metrics Alerts
• System Views to track performance
• Tuning Tools and Automation
MONITORING A ZURE SQL DATABASE
• Blocked by Firewall
• Failed Connections
• Successful
Connections
A ZURE METRICS ALERTS
• DTU Percentage
• DTU Limit
• DTU Used
• CPU Percentage
• Log IO Percentage
• Data IO Percentage
• Deadlocks
• Sessions Percentage
• Total Database Size
• Database Size
Percentage
• Workers Percentage
• In-Memory OLTP
Storage Percentage
CREATE
A ZURE METRIC ALERT
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
• Resource Usage Views
- Average CPU %
- Average Data IO %
- Average Log Write %
- Average Memory %
• Wait Stats View
PERFORMANCE SYSTEM VIEWS
• Server scope (master)
• Measures in 5 minute intervals
• Retains 14 days of history
• Captures when resource usage changes
sys.resource_stats
• Database scope
• Measures in 15 second intervals
• Retains 1 hour of history
• Captures even with no activity
sys.dm_db_resource_stats
• Performance Overview
• Performance Recommendations
• Query Performance Insights
• Automatic Tuning
A ZURE PERFORMANCE TOOLS
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Thank you
SELECT KNOWLEDGE FROM SQL SERVER
Copyright © 2018 SQLschool.gr. All right reserved.
PRESENTER MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION

More Related Content

What's hot (20)

PDF
Microsoft Azure Security Overview
Alert Logic
 
PDF
Big Data Architecture
Guido Schmutz
 
PDF
Azure Arc Overview from Microsoft
David J Rosenthal
 
PPTX
Microsoft Azure Technical Overview
gjuljo
 
PPTX
Azure data bricks by Eugene Polonichko
Alex Tumanoff
 
PPTX
Implement SQL Server on an Azure VM
James Serra
 
PPTX
Azure DataBricks for Data Engineering by Eugene Polonichko
Dimko Zhluktenko
 
PDF
The Microsoft Well Architected Framework For Data Analytics
Stephanie Locke
 
PPTX
Introducing Azure SQL Database
James Serra
 
PPTX
Aws vs. Azure: 5 Things You Need To Know
Scalr
 
PDF
Cloud Migration Checklist | Microsoft Azure Migration
Intellika
 
PDF
Intro to Neo4j and Graph Databases
Neo4j
 
PPTX
Introduction to Microsoft Azure
Kasun Kodagoda
 
PDF
Introduction to Microsoft Azure Cloud
Dinesh Kumar Wickramasinghe
 
PPTX
Azure storage
Raju Kumar
 
PDF
Azure Digital Twins.pdf
Tomasz Kopacz
 
PPTX
Introducing Azure SQL Data Warehouse
James Serra
 
PDF
Microsoft Azure Fundamentals
Adwait Ullal
 
PPTX
AWS PPT.pptx
GauravSharma164138
 
PDF
AWS EC2
Mahesh Raj
 
Microsoft Azure Security Overview
Alert Logic
 
Big Data Architecture
Guido Schmutz
 
Azure Arc Overview from Microsoft
David J Rosenthal
 
Microsoft Azure Technical Overview
gjuljo
 
Azure data bricks by Eugene Polonichko
Alex Tumanoff
 
Implement SQL Server on an Azure VM
James Serra
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Dimko Zhluktenko
 
The Microsoft Well Architected Framework For Data Analytics
Stephanie Locke
 
Introducing Azure SQL Database
James Serra
 
Aws vs. Azure: 5 Things You Need To Know
Scalr
 
Cloud Migration Checklist | Microsoft Azure Migration
Intellika
 
Intro to Neo4j and Graph Databases
Neo4j
 
Introduction to Microsoft Azure
Kasun Kodagoda
 
Introduction to Microsoft Azure Cloud
Dinesh Kumar Wickramasinghe
 
Azure storage
Raju Kumar
 
Azure Digital Twins.pdf
Tomasz Kopacz
 
Introducing Azure SQL Data Warehouse
James Serra
 
Microsoft Azure Fundamentals
Adwait Ullal
 
AWS PPT.pptx
GauravSharma164138
 
AWS EC2
Mahesh Raj
 

Similar to Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018 (20)

PPTX
JoTechies - Azure SQL DB
JoTechies
 
PPTX
Azure SQL Database & Azure SQL Data Warehouse
Mohamed Tawfik
 
PDF
Be05 introduction to sql azure
DotNetCampus
 
PPTX
01_DP-300T00A-Intro.pptx
KareemBullard1
 
PDF
Azure SQL Database
rockplace
 
PPTX
Azure SQL Managed Instance - SqlBits 2019
Jovan Popovic
 
PDF
A Tour of Azure SQL Databases (NOVA SQL UG 2020)
Timothy McAliley
 
PPTX
SQL Azure DB - BCDR
Harsh Chawla
 
PPTX
Sql connections germany - migration considerations when migrating your on pre...
Charley Hanania
 
PPTX
SQL on Azure
Maximiliano Accotto
 
PPTX
GWAB 2015 - Data Plaraform
Marcelo Paiva
 
PPTX
What's new with Azure Sql Database
Marco Parenzan
 
PPTX
Azure SQL - more or/and less than SQL Server
Rafał Hryniewski
 
PPTX
Intro to Azure SQL database
Steve Knutson
 
PDF
Geek Sync | Successfully Migrating Existing Databases to Azure SQL Database
IDERA Software
 
PDF
A to z for sql azure databases
Antonios Chatzipavlis
 
PPTX
Sql azure bcdr_dp_talks_session
Sourabh Agarwal
 
PPTX
Sql azure dec_2010 Lynn & Ike
Ike Ellis
 
PPTX
Building Cloud Apps using Azure SQL Database
WinWire Technologies Inc
 
PDF
Azure Data services
Rajesh Kolla
 
JoTechies - Azure SQL DB
JoTechies
 
Azure SQL Database & Azure SQL Data Warehouse
Mohamed Tawfik
 
Be05 introduction to sql azure
DotNetCampus
 
01_DP-300T00A-Intro.pptx
KareemBullard1
 
Azure SQL Database
rockplace
 
Azure SQL Managed Instance - SqlBits 2019
Jovan Popovic
 
A Tour of Azure SQL Databases (NOVA SQL UG 2020)
Timothy McAliley
 
SQL Azure DB - BCDR
Harsh Chawla
 
Sql connections germany - migration considerations when migrating your on pre...
Charley Hanania
 
SQL on Azure
Maximiliano Accotto
 
GWAB 2015 - Data Plaraform
Marcelo Paiva
 
What's new with Azure Sql Database
Marco Parenzan
 
Azure SQL - more or/and less than SQL Server
Rafał Hryniewski
 
Intro to Azure SQL database
Steve Knutson
 
Geek Sync | Successfully Migrating Existing Databases to Azure SQL Database
IDERA Software
 
A to z for sql azure databases
Antonios Chatzipavlis
 
Sql azure bcdr_dp_talks_session
Sourabh Agarwal
 
Sql azure dec_2010 Lynn & Ike
Ike Ellis
 
Building Cloud Apps using Azure SQL Database
WinWire Technologies Inc
 
Azure Data services
Rajesh Kolla
 
Ad

More from Antonios Chatzipavlis (20)

PPTX
Data virtualization using polybase
Antonios Chatzipavlis
 
PDF
SQL server Backup Restore Revealed
Antonios Chatzipavlis
 
PDF
Migrate SQL Workloads to Azure
Antonios Chatzipavlis
 
PDF
Machine Learning in SQL Server 2019
Antonios Chatzipavlis
 
PDF
Workload Management in SQL Server 2019
Antonios Chatzipavlis
 
PDF
Loading Data into Azure SQL DW (Synapse Analytics)
Antonios Chatzipavlis
 
PDF
Introduction to DAX Language
Antonios Chatzipavlis
 
PDF
Building diagnostic queries using DMVs and DMFs
Antonios Chatzipavlis
 
PDF
Exploring T-SQL Anti-Patterns
Antonios Chatzipavlis
 
PDF
Designing a modern data warehouse in azure
Antonios Chatzipavlis
 
PDF
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
PDF
Designing a modern data warehouse in azure
Antonios Chatzipavlis
 
PDF
SQLServer Database Structures
Antonios Chatzipavlis
 
PDF
Sqlschool 2017 recap - 2018 plans
Antonios Chatzipavlis
 
PDF
Microsoft SQL Family and GDPR
Antonios Chatzipavlis
 
PDF
Statistics and Indexes Internals
Antonios Chatzipavlis
 
PDF
Introduction to Azure Data Lake
Antonios Chatzipavlis
 
PDF
Azure SQL Data Warehouse
Antonios Chatzipavlis
 
PDF
Introduction to azure document db
Antonios Chatzipavlis
 
PDF
Introduction to Machine Learning on Azure
Antonios Chatzipavlis
 
Data virtualization using polybase
Antonios Chatzipavlis
 
SQL server Backup Restore Revealed
Antonios Chatzipavlis
 
Migrate SQL Workloads to Azure
Antonios Chatzipavlis
 
Machine Learning in SQL Server 2019
Antonios Chatzipavlis
 
Workload Management in SQL Server 2019
Antonios Chatzipavlis
 
Loading Data into Azure SQL DW (Synapse Analytics)
Antonios Chatzipavlis
 
Introduction to DAX Language
Antonios Chatzipavlis
 
Building diagnostic queries using DMVs and DMFs
Antonios Chatzipavlis
 
Exploring T-SQL Anti-Patterns
Antonios Chatzipavlis
 
Designing a modern data warehouse in azure
Antonios Chatzipavlis
 
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
Designing a modern data warehouse in azure
Antonios Chatzipavlis
 
SQLServer Database Structures
Antonios Chatzipavlis
 
Sqlschool 2017 recap - 2018 plans
Antonios Chatzipavlis
 
Microsoft SQL Family and GDPR
Antonios Chatzipavlis
 
Statistics and Indexes Internals
Antonios Chatzipavlis
 
Introduction to Azure Data Lake
Antonios Chatzipavlis
 
Azure SQL Data Warehouse
Antonios Chatzipavlis
 
Introduction to azure document db
Antonios Chatzipavlis
 
Introduction to Machine Learning on Azure
Antonios Chatzipavlis
 
Ad

Recently uploaded (20)

PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 

Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018

  • 1. Azure SQL Database for the SQL Server DBA
  • 5. PRESENTERINFO 1982 I started working with computers 1988 I started my professional career in computers industry 1996 I started working with SQL Server 6.0 1998 I earned my first certification at Microsoft as Microsoft Certified Solution Developer (3rd in Greece) 1999 I started my career as Microsoft Certified Trainer (MCT) with more than 30.000 hours of training until now! 2010 I became for first time Microsoft MVP on Data Platform I created the SQL School Greece www.sqlschool.gr 2012 I became MCT Regional Lead by Microsoft Learning Program. 2013 I was certified as MCSE : Data Platform I was certified as MCSE : Business Intelligence 2016 I was certified as MCSE: Data Management & Analytics 2017 Certified as MCSA : Machine Learning Recertified as MCSE: Data Management & Analytics Antonios Chatzipavlis Data Solutions Consultant & Trainer MVP on Data Platform MCT, MCSE, MCITP, MCPD, MCSD, MCDBA, MCSA, MCTS, MCAD, MCP, OCA, ITIL-F
  • 7. Μια πηγή ενημέρωσης για την Microsoft Data Platform προς τους Έλληνες IT Professionals, DBAs, Developers, Information Workers αλλά και απλούς χομπίστες που απλά τους αρέσει ο SQL Server. Help line : [email protected] • Articles about SQL Server • SQL Server News • SQL Nights • Webcasts • Downloads • Resources What we are doing here Follow us in socials fb/sqlschoolgr fb/groups/sqlschool @antoniosch @sqlschool yt/c/SqlschoolGr SQL School Greece group SELECT KNOWLEDGE FROM SQL SERVER
  • 8. Connect with PASS Sign up for a free membership today at: pass.org is the PASS Local Group in Greece
  • 12. WHAT IS A ZURE SQL DATABASE? The service users pay according to their usage of the service. The service is paid by the hour. The hourly rate is based on the highest service tier selected during that hour. Users can scale up or down on demand User can create and destroy environments on demand The service provider manages and owns the database software. The service provider doing common administration tasks (backups, HA, OS etc.)
  • 14. • The service provides a database engine. • You can’t restore a SQL Server backup directly to Azure SQL Database. • You are not the Sysadmin of your server. • The service provides its own High Availability • There’s no SQL Agent service. • System views like sys.dm_exec_requests operate at the database scope, not server scope like SQL Server. • There is no Error log file to open, but a system log view instead. • TDE is an Enterprise feature on SQL Server, available in all tiers on Azure SQL Database. • Auditing is an Enterprise feature available in all tiers of Azure SQL Database. • Azure also has a threat detection service that can alert you if it detects SQL injection attempts, logins from new locations or other unusual patterns. A ZURE SQL DATABASE VS. SQL SERVER
  • 15. DBA’S TASKS AND RESPONSIBILITIES Classic DBA • Maintain the Operating System • Maintain SQL Server • Setup Backups • High Availability • Disaster Recovery • Performance • Change Control • Security Azure DBA • Choosing the right service tier • Test the HADR • Performance • Change Control • Security
  • 16. • Azure SQL DB offers 3 service tiers: - Basic (2GB, 7d RTO, 5 DTU) - Standard (250GB, 35d RTO, 10-100 DTU) - Premium (1000GB, 35d RTO, 125-4000 DTU, In-Memory, Columnstore Indexes) • The service tiers defines: - Size - Performance - Concurrency - Recovery - Features UNDERSTANDING THE SERVICE TIERS • Performance is measured in DTUs. - DTU = CPU + Memory + Data IO + Log IO • Multiple databases can share resources through elastic database pools. • The service also offers other elastic database capabilities. - Elastic DB .NET Library - Elastic DB Jobs - Elastic Query
  • 17. For an initial estimate, there is a DTU Calculator at http://dtucalculator.azurewebsites.net HOW DO I KNOW HOW MANY DTUS I NEED TO MIGRATE MY SQL SERVER DATABASE ON AZURE?
  • 20. GET TING STARTED Create an Azure SQL Database Server • A server is a logical entity for grouping databases. • Pick a Name • Pick a Region Create a Database inside the Server • Pick a DB Server • Pick a DB Name • Pick a Service Tier
  • 21. PROVISIONING A ZURE SQL DATABASE • Create a resource > Databases > SQL DatabaseAzure Portal • New-AzureRmSqlDatabase CmdletPowerShell • CREATE DATABASE commandT-SQL
  • 24. CONNECTING TO A DATABASE SQL Authentication Individual accounts only. Multi-server access requires multiple users. No built-in password expiration. Azure AD Authentication Individual and group accounts. One identity can be granted access to multiple servers. Password expiration follows the AAD policy.
  • 25. CONFIGURING THE FIREWALL RULES TO CONNECT TO THE DATABASE
  • 27. • Backups happen automatically as part of the service • Retention Period of Backups - 7 days for Basic tier - 35 days for Standard tier - 35 days for Premium tier • Backups are Geo-Replicated - Backups are replicated to a paired Azure region by the service. - In the event of a region outage, you can restore your backups to another region. • Backup Schedule - Weekly Full Backup - Hourly Differential Backup - Every 5 min Transaction Log Backup BACKUP CAPABILITIES • In case of Archiving - Manually export the database to BACPAC and keep copies on Azure Blob Storage. • All databases support Point in Time Recovery with a 12 Hour RTO and 5 minute RPO for the in-region backups • Azure provides 2x your max storage size as included backup storage. • What happens if you reach this amount of backup storage? - Reduce the retention period by contacting Azure support. - Pay for extra backup storage billed at the standard Read-Access Geographically Redundant Storage rate. • If you delete a database, you can restore as long as you’re still inside the retention period. • If you delete the server, all backups are deleted with no restore capability.
  • 28. • Restores can be done to the logical server hosting the database or to another region. • Local Restores - A new database on the same logical server recovered to a specified point in time - A database on the same logical server recovered to the deletion time - You cannot overwrite an existing database - If you want to replace a database with a restored copy, you can rename the original and then rename the restored database. • Geo Restores - A new database on any server on any region up to the latest geo-replicated backup - Full and differentials are geo-replicated - Geo-Restores have an 1 hour RPO due to the possible delay in geo-replication. RESTORE CAPABILITIES
  • 29. Azure keeps 3 local high available copies in the server region In case of region disaster we can use geo-restore or Azure Database Geo- Replication BUILT-IN HIGH AVAILABILITY
  • 30. • A component of Azure SQL Database that provides service managed database replicas that can be used for read-only scale and failover. • Provides up to four readable database replicas. - The service does not provide the option for synchronous replication. - Because the replication is asynchronous, there’s always a risk of data loss due to network latency. - If you want to make a session wait until the current log has been completely replicated you can use the sp_wait_for_database_copy_sync procedure. • Active Geo-Replication provides a 30 second RTO and 5 second RPO. • Each active geo-replication secondary is billed at full price. A ZURE DATABASE GEO-REPLICATION
  • 31. DATABASE FAILOVER METHODS PLANNED • ALTER DATABASE FAILOVER • Initiated by an administrator • The system switches to synchronous mode temporarily to avoid data loss • The old primary becomes a secondary and starts syncing immediately UNPLANNED • ALTER DATABASE FORCE_FAILEOVER_ALLOW_DATA_ LOSS • Triggered by a real region outage • The role is changed immediately so data loss is possible • When the old primary eventually comes back, an incremental backup is taken and it becomes a secondary The user configuring Geo-Replication or executing the FAILOVER command must be DBManager on both the primary server and the secondary server.
  • 34. • A proper migration methodology will ensure a successful migration project. • Direct backup restore from SQL Server is not supported. • Migrating to the service can be done with a variety of tools. • Short downtime migrations can be done with Transactional Replication. • Migrating from the service can be done with a BACPAC file export. MIGRATION TO A ZURE SQL DATABASE
  • 36. MIGRATING TOOLS Migration Wizard on SSMS • All-in-one process • Big Downtime • Not suitable for Large Databases Transactional Replication • Multi-step process • More control in process • Complex process • Small Downtime • Suitable for Large Databases • Source must be • SQL 2012 SP2 CU8 • SQL 2014 SP1 CU3 • SQL 2016 • SQL 2017 Manual Export/Import • Multi-step process • More control in process • Large Downtime • Suitable for Large Databases • if downtime is acceptable
  • 39. • Azure Metrics Alerts • System Views to track performance • Tuning Tools and Automation MONITORING A ZURE SQL DATABASE
  • 40. • Blocked by Firewall • Failed Connections • Successful Connections A ZURE METRICS ALERTS • DTU Percentage • DTU Limit • DTU Used • CPU Percentage • Log IO Percentage • Data IO Percentage • Deadlocks • Sessions Percentage • Total Database Size • Database Size Percentage • Workers Percentage • In-Memory OLTP Storage Percentage
  • 43. • Resource Usage Views - Average CPU % - Average Data IO % - Average Log Write % - Average Memory % • Wait Stats View PERFORMANCE SYSTEM VIEWS • Server scope (master) • Measures in 5 minute intervals • Retains 14 days of history • Captures when resource usage changes sys.resource_stats • Database scope • Measures in 15 second intervals • Retains 1 hour of history • Captures even with no activity sys.dm_db_resource_stats
  • 44. • Performance Overview • Performance Recommendations • Query Performance Insights • Automatic Tuning A ZURE PERFORMANCE TOOLS
  • 50. SELECT KNOWLEDGE FROM SQL SERVER Copyright © 2018 SQLschool.gr. All right reserved. PRESENTER MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION