Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

8 DBA Tasks for Azure SQL

What’s Different from On-Prem

Rie Irish, Sr Program Manager, Microsoft


Own your career with interactive learning built
by community and guided by data experts.
Get involved. Get ahead.

Explore Free online webinar


events
Local user groups
around the world
Connect with the global
data community

your PASS
community
.org

Online special interest Learning on-demand and Get involved


user groups delivered to you
Missed PASS Summit 2019?

Get the Recordings


Download all PASS Summit sessions on Data
Management, Analytics, or Architecture for
only $399 USD

More options available at PASSstuff.com


We are thrilled to say the first ever PASS Virtual Summit will be taking place this November!

We will be launching PASS Summit into a whole new world, and with that comes exciting opportunities with what
we can offer you. We will go beyond simply moving sessions online to fully embracing everything a virtual
environment can offer.

Find out more at PASS.org/summit


Thank you to
our Global
Sponsors and
Supporters
10 DBA Tasks for Azure SQL:
What’s Different from On-Prem
Rie Irish, Senior Program Manager, Microsoft
Rie Irish is a Sr Program Manager with
Microsoft. She is the Program Lead for the
Data Platform MVP Program & manages the
Product Group relationship with the SQL
Community. She is active with PASS and
helps run the Atlanta SQL User Group.

Rie.Irish@microsoft.com

@IrishSQL
@dataplatformMVP

https://www.linkedin.com/in/rie-irish-07834a2/
Today’s Session
What’s different than On-Prem?
• PaaS/IaaS Offerings
• Automatic Updates
• Managing Permissions
• Creating a Server in the Azure Portal
• Deploying a Database in Azure SQL
• Configure Firewall or Private End Points
• Understanding Backups
• Restoring a database
• Job Scheduling/Agent Tasks
• Cost & Budget Management
SQL is the best

Familiarity

Tools

Flexibility
Azure SQL
SQL virtual machines Managed instances Databases

• Resource sharing
• SQL Server and OS • Pre-provision • Hyperscale
• SQL Server between multiple
server access compute resources
surface area storage (up to dbs to price
for migration
• Expansive SQL (vast majority) 100TB) optimize
• Enables cost-
And OS version • Native virtual efficient migration. • Serverless • Simplified
support network compute performance
• Ability to host
• Automated support smaller instances • Fully managed management for
manageability • Fully managed (2Vcore) service multiple dbs
features for SQL service • Fully managed
Server service
Azure SQL

SQL virtual machines Managed instances Databases

https://azure.microsoft.com/en-us/overview/what-is-paas/
What’s left for me to do in Azure SQL?

• Configuring disaster recovery across Azure regions


• Performance tuning—to save your company money.
• Network architecture—make sure your databases
can all talk to each other in secure way
• User Management and Security
• Helping your business derive value from the data
you are storing in the database
• Boring DBA stuff - Jobs, restores, deploys,
migrations, monitoring, etc.
https://joeydantoni.com/2019/11/11/understanding-your-options-for-running-sql-server-on-azure/
Automatic Updates:
Never worry about upgrading an environment
ever again

• No more SQL patching

• No more OS patching

• Same version Query against SQL DB

• Align your apps to compatibility level of your database

• Microsoft has committed to not change the SQL Engine


under a specific compatibility level
What is a planned maintenance event & what can you expect?
FAILOVER RECONNECT RETRY LOGIC FREQUENCY RESOURCE HEALTH

Reconfigurations/ Your Any client On average, 1.7 The Health


failovers generally application production planned History section
complete within must application that maintenance contains the
30 seconds – the reconnect to connects to a cloud events occur downtime
average is 8 the healthy database service each month. reason for each
seconds. copy after should implement event (when
event. a robust available).
connection retry
logic.
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-planned-maintenance
Resource Health
Managing Permissions
• Azure SQL is different than on prem

• Make your admin a group to avoid


single point of failure

• Create users at the scope of an


individual database

*This doesn’t always work if you have devs that are using
SSMS or Azure Data Studio because that will go to
master.

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-manage-logins
Server Admin &
Azure Active Directory
Admin Accounts
Server
Admin

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-manage-logins
Creating a Server &
Deploying a DB from
beginning to end
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-single-database-get-started?tabs=azure-portal
DEMO
Configure Firewall or
Private End Points

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-server-level-firewall-rule
DEMO
Before we talk about restores:
Automatic Backups

Automatic Backups Long Term Retention Backup User Controlled Retention


Full backups weekly, Policy
differential daily, log backups Auditing & Compliance 7 days default at all tiers
every 5 minutes Up to 10 years 1-35 days of additional retention at
Daily & weekly backups are additional cost
automatically uploaded to
geo-redundant Azure Storage
• Point in Time Restore
Restore a Single • Deleted Database Restore
Azure SQL database • Copy Database
• Geo Restore

Automated Backups: Data Exposed https://youtu.be/m45GCf50KD0


DEMO
Recovery Time? It Depends

The size of the database.


The compute size of the database.
The number of transaction logs involved.
The amount of activity that needs to be
replayed to recover to the restore point.
The network bandwidth if the restore is to a
different region.
The number of concurrent restore requests
being processed in the target region.
Job Scheduling/Agent Tasks

Use Transact-SQL (T-SQL) to create and manage Elastic Database Jobs


• Create a credential for job execution
• Create a target group (servers) or target group (pools)
• Exclude an individual database
• Collect data using built in parameters
• Monitor database performance

• https://docs.microsoft.com/en-us/azure/sql-database/elastic-jobs-tsql
Job Scheduling/Agent Tasks

What can you do?


• Deploy a new schema to many DBs
• Monitor DB performance
• View Job Definitions
• Ad Hoc Job Execution
• Schedule Job Execution

• https://docs.microsoft.com/en-us/azure/sql-database/elastic-jobs-tsql
Cost & Budget
Management
DEMO
• Deploy SQL Server 2019:
https://aka.ms/ss19
• Get free SQL Server and Azure training at
https://aka.ms/sqlworkshops
• Compare SQL and Azure at
https://docs.microsoft.com/en-us/azure/sql-
database/sql-database-features
Next Steps & • Learn about SQL and Azure from Channel 9
Data Exposed
Resources • Become an early adopter of Azure SQL
Database Edge
• Free eBook, SQL on Azure Virtual Machines
https://azure.microsoft.com/en-
us/resources/sql-server-azure-virtual-
machines/
Rie.Irish@Microsoft.com

@IrishSQL
@DataPlatformMVP

https://www.linkedin.com/in/rie-irish-07834a2/

http://www.riepedia.net/
This event was sponsored by Microsoft

Learn more about SQL Server 2019 today:


-Get free training: aka.ms/sqlworkshops
-Download the SQL19 eBook: aka.ms/sql19_ebook

You might also like