SQLSaturday #413 - Denmark 2015
SQLSaturday #413 - Denmark 2015
Putting Your Head in the Cloud
Working with SQL Azure
David Postlethwaite
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Say thank you to our Sponsors :
https://upload.wikimedia.org/wikipedia/commons/6/6f/Kroll_Ontrack_nowe_logo_2011.png
http://sqlday.pl/wp-content/uploads/2015/01/profisee-e1429703147720.png
https://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Microsoft_logo_(2012).svg/2000px-Microsoft_logo_(2012).svg.png
http://static.wixstatic.com/media/8b2c2c_11cc3c8918e04b4d8b652e020ded1179.png_srb_p_364_143_75_22_0.50_1.20_0.00_png_srb
https://pinpointprod.blob.core.windows.net/pinpointassets/2cad74fdd3a74f2ad3162b41354e8521152769b0cb461950c74230314c238ab8
d60
https://www.pagerduty.com/assets/Red-Gate-Logo-Png.png
https://www.marketbeat.com/logos/violin-memory-inc-logo.jpg
https://www.sqlpowerhouse.com/img/logo.png
http://www.dansk-dlf.dk/partners/10/dlflogo.jpg
SQLSaturday #413 - Denmark 2015
About Me
David Postlethwaite
Liverpool Victoria LV=
SQL and Oracle DBA
MCSE 2012 Data Platform
MCITP 2008, 2005
Oracle OCA
25 years IT Experience
6 years as DBA
david@clunyweb.co.uk
Blog: gethynellis.com
3  |
19/09/2015
David Postlethwaite
3  |
SQLSaturday #413 - Denmark 2015
Who has Used Azure SQL DB?
Tried it once
Evaluating
Running Production Systems
4  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Introduction
Putting Your Head in the Cloud
Monitoring and Alerting
Connecting from SSMS
Linked Server from local to Azure
SQL Agent Options -  Scheduler (x2) and Automation
Creating Database from BACPAC
Azure Data Sync
Firewall Rules
Azure Server Roles
Backing up and Restoring
Replication
Auditing and Security
Scheduling Exports
Web Management Portal
5  |
19/09/2015
David Postlethwaite
5  |
SQLSaturday #413 - Denmark 2015
Demo Windows Azure
http://azure.Microsoft.com
6  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Which Web Portal do you use?
The current one                     or              the new one  ?
7  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Windows Azure Management Portal
8  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Create Storage Account
9  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
SQL Database Monitor
10  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Connecting to SQL Azure – Firewall Rules
11  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Using SSMS
Limited GUI with SSMS 2012 or SSMS 2014 RTM
Need to write code
We can create database.
Need the azure syntax
SSMS 2014 SP1 gives better support
SSMS 2016 has more support especially for v12
Can’t use “USE”
12  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Linked Servers
Need to create ODBC DSN
System Server Native Client 11
Linked Server
Microsoft OLE DB Provider for ODBC Drivers
Azure stored procedure you must enable RPC
13  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
 SQL Agent
14  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Azure Mobile Services Scheduler
15  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Azure Automation
16  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Azure Scheduler
17  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
DACPAC and BACPAC
SSMS 2012+
DACPAC Extract Data Tier Application - schema
BACPAC Export Data Tier Application – schema + data
Azure currently only supports BACPAC
Validates the schema before creating the file
Save to local disk
Copy BACPAC to Azure storage for Import from the ManagementPortal
Or
Export straight to new database on Azure Server
18  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Creating DACPAC and BACPAC
19  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Azure Data Sync (Preview)
20  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
SQL Azure Security
IP Security
Commands to manage firewall rules
Sp_set_database_firewall_rule
Select * from sys.database_rules
Select * from sys.firewall_rules;
Login Security
SQL logins only. No AD authentication
Internal Security
Must explicitly give access to other Azure apps
21  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
SQL Azure Security
22  |
19/09/2015
David Postlethwaite
Internet
Internet
Yes
Client IP address in
Server Level Firewall Rules
No
No
Server Level Firewall Rules
Server Level Firewall Rules
Database Level Firewall Rules
Database Level Firewall Rules
Client IP address in
Database Level Firewall Rules
Login Name and Password
Login Name and Password
Access to any database
Access to specific database
Yes
Login Name and Password
Login Name and Password
https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQpejqxOJS5cwtNDyjuob45LozE76J0tiamt4HSuPYJr-eJQlpONg
Access from Azure
Access from Azure
Yes
No
SQLSaturday #413 - Denmark 2015
Server Roles
Not the Same as local SQL
server-level principal account
Loginmanager
dbmanager
23  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
SQL Database Scale
24  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Service Tiers and Performance Levels
25  |
28/02/2015
David Postlethwaite
Basic
Standard
Premium
Uptime SLA
99.95%
Database SizeLimit
2 GB
250 GB
500 GB
Power
5 DTU
S0: 10 DTUS1: 20 DTU
S2: 50 DTU
S3:100 DTU **
P1: 100 DTUP2: 200 DTUP3: 800 DTU
Benchmark
Transaction Rate
16,600/hour
(~4.5/second)
S0:    521/minuteS1:    934/minute
S2:  2570/minute
P1:  105/secondP2:  228/secondP3:  735/second
Approximate
Price /month *
€4
  S0:  €12
  S1:  €23
  S2:  €56
  S3:  €112
 P1:   €347
 P2:   €693
 P3:   €2771
*   Prices as at 23/06/2015
** S3 v12 only
SQLSaturday #413 - Denmark 2015
SQL Database Configure - Backups
26  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Geo-Replication
27  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
SQL Database Restore
28  |
19/09/2015
David Postlethwaite
 
Basic
Standard
Premium
Any restore pointwithin the past 7 days
Any restore pointwithin the past 14 days
Any restore pointwithin the past 35 days
ERT* < 12 hours
RPO† < 1 hour
Note: Pre-v12 server RPO† < 24 hours
ERT* < 12 hours
RPO†< 1 hour
Note: Pre-v12 server RPO† < 24 hours
ERT* < 12 hours
RPO† < 1 hour
Note: Pre-v12 server RPO† < 24 hours
Not available
ERT* < 30 seconds
RPO† < 5 seconds
Note:Pre-v12 server ERT* < 2 hoursPre-v12 server RPO† < 30 minutes
ERT* < 30 seconds
RPO† < 5 seconds
Note:Pre-v12 server ERT* < 2 hoursPre-v12 server RPO† < 30 minutes
Not available
Not available
ERT* < 30 seconds
RPO† < 5 seconds
Note:Pre-v12 server ERT* < 2 hoursPre-v12 server RPO† < 5 minutes
* Estimated Recovery Time (ERT) - The estimated duration for the database to be fully functional after a restore/failover request.
† Recovery Point Objective (RPO) - The amount of most recent data changes (time interval) the application could lose after recovery.
SQLSaturday #413 - Denmark 2015
SQL Database Auditing and Security
29  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
How Many Ways to Create a Database?
+New Basic / Custom / Import
Restore
Copy
Create from Export
Direct from SSMS
30  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Create a Database from Existing…
31  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Upgrade v11 to v12
Must use the new portal
32  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Azure Web Management Portal
Web based SSMS like tool
GUI for database, tables, views procedures
No GUI for managing users
Can run Queries
Can view execution plans
At the time of writing there is only a web portal for v11 databases.
33  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Clustered Index
In a V11 database tables must have a clustered index
It is still possible to create a table without one
But you can’t use it
If you get your clustered index wrong you can’t drop it
34  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Connect to Master Database in Azure Portal
35  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Grammar
36  |
19/09/2015
David Postlethwaite
– short for premises
– proposition or assumption
– a building or property
Prem
Premise
Premises
SQLSaturday #413 - Denmark 2015
Free E-Book
Sign up at
Watch My Beginner’s Guide
Watch this again
37  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Any Questions
Conclusion
Hopefully you now ready to start creating your Azure Databases
Q & A
david@clunyweb.co.uk
Blog: gethynellis.com
38  |
19/09/2015
David Postlethwaite
SQLSaturday #413 - Denmark 2015
Say thank you to our Sponsors :
https://upload.wikimedia.org/wikipedia/commons/6/6f/Kroll_Ontrack_nowe_logo_2011.png
http://sqlday.pl/wp-content/uploads/2015/01/profisee-e1429703147720.png
https://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Microsoft_logo_(2012).svg/2000px-Microsoft_logo_(2012).svg.png
http://static.wixstatic.com/media/8b2c2c_11cc3c8918e04b4d8b652e020ded1179.png_srb_p_364_143_75_22_0.50_1.20_0.00_png_srb
https://pinpointprod.blob.core.windows.net/pinpointassets/2cad74fdd3a74f2ad3162b41354e8521152769b0cb461950c74230314c238ab8
d60
https://www.pagerduty.com/assets/Red-Gate-Logo-Png.png
https://www.marketbeat.com/logos/violin-memory-inc-logo.jpg
https://www.sqlpowerhouse.com/img/logo.png
http://www.dansk-dlf.dk/partners/10/dlflogo.jpg
SQLSaturday #413 - Denmark 2015
Stick around for RAFFLE and the AFTER EVENT!
All our volunteers and organisers do not get paid fororganizing this event – If you see them, please:
Give them a hug
Shake their hand
Say thank you
Spread the word
Get involved yourself
Don’t forget to thank the sponsors for their support
Thank the speakers for donating their time, energy andexpenses