KoprowskiT_SQLRelay2014#7_Leeds_FromPlanToBackupToCloud
Post on 21-Jun-2015
152 Views
Preview:
DESCRIPTION
Transcript
SQL Server in the Cloud
From Plan, To Backup, To Cloud
Tobiasz Janusz Koprowski | Independent Consultant
Our awesome sponsors
ABOUT ME Member of the Board Polish Information Processing Society
EMEA Vice-Chair of Global IT Community Association
Microsoft Certified Trainer (SharePoint, SQL Server, Security, Azure)
Subject Matter Expert at CQURE
SQL Server MVP (five years)
MVP Mentor Program Member
consultant, security & licensing auditor and trainer
active blogger, influencer, technical writer
last 9 years living in Data Processing Center
last 15 years banking and ICT
NOW going into Independent Consultancy
frequently speaker at several conferences: SQL Server Community Launch, Time for
SharePoint, CodeCamps, InfoMEET, SharePoint Community Launch, CISSP Day, SQL in the
City, InfoTRAMS, SQL Bits, IT Camp, SQL Saturday, CareerCon, Sharepoint & SQL
Connection, Kariera IT, SQL Rally, SQL Relay, InfoTech…
Microsoft Terminology Community / translations for Wndows 7/8 and Visual Studio
2010/2012
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
3
AGENDA
PART ONE: Slide Talks - introduction
plan, compability, features, functionality
PART TWO: Demo Mode
sql server on premise & sql server in cloud
PART THREE: Slide Talks – backup options
backup, plan, options
PART FOUR: Show Time
backup, management
APPENDIX
additional links, q&a
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
4
PART ONE:
slide talks - introduction
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
6PART ONE: Private, IaaS, PaaS
PART ONE: Azure Short Introduction
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
7
• Windows Azure
Compute:
Virtualized compute environment based
on Windows Server
Storage:
Durable, scalable, & available storage
Management:
Automated, model-driven management of the service
• SQL Azure (cloud-based database)
Database:
Relational processing for structured/unstructured data
• App Fabric (.NET services)
Service Bus:
General purpose application bus
Access Control:
Rules-driven, claims-based access control
Data Centers for Azure Platform
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
8
Data Centers for Azure Platform
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
9North America
US Central - Iowa
US East - Virginia
US East 2 - Virginia
US Gov Iowa - Iowa
US Gov Virginia - Virginia
US North Central - Illinois
US South Central - Texas
US West – California
Asia
Asia Pacific East - Hong Kong
Asia Pacific Southeast – Singapore
Europe
North Europe - Dublin, Ireland
West Europe - Amsterdam, Netherlands
Japan
Japan East - Saitama Prefecture
Japan West - Osaka Prefecture
Oceania (announced, coming soon)
Australia - Sydney, New South Wales
Australia - Melbourne, Victoria
South America (preview)
Brasil - Sao Paulo,
Some
datacenters have servers
grouped inside containers -
each containing
1800-2500 servers.
Shared Environment
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
10
Hardware Boundary
Hardware Boundary
Hardware Boundary
Hardware Boundary
BC
D
AA
B
B
C
CD
D
A
PART ONE: SQL Azure few days ago We want to work with SQL Azure (oops SQL Database)
Size does matter?
Personal: 1GB, 5GB
Business: 10GB, 20 GB, 30 GB, 40 GB, 50 GB, 100 GB, 150 GB (3x50)
“Private”: less than 100 MB ($4.995 / month)
Version does matter?
10.25 my first experience, but after July 2011 Service Release…
11.0.9214.51 now > close to SQL Server 2012
Row Versioning-Based Isolation Levels
Both the READ_COMMITTED_SNAPSHOT and ALLOW_SNAPSHOT_ISOLATION database
options are set to ON in Microsoft Azure SQL Database.
Because SET <snapshot_option> in the ALTER DATABASE Transact-SQL statement is not
supported, these database options cannot be changed.
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
11
error msg 40544:The database has reached its size quota. Partition or delete data, drop
indexes, or consult the documentation for possible resolutions.
PART ONE: SQL Azure now
Size does matter?
Personal: 1GB, 5GB
Business: 10GB, 20 GB, 30 GB, 40 GB, 50 GB, 100 GB, 150 GB (3x50)
“Private”: less than 100 MB ($4.995 / month)
Size does matter!
BASIC
size: 100MB, 500MB, 1GB, 2GB
performance: 5DTU
STANDARD
size: 100MB, 500MB, 1GB, 2GB, 5GB, 10GB, 20GB, 30GB, 40GB, 50GB, 100GB, 150GB, 200GB, 250GB
performance: S0 10DTU, S1 20DTU, S2 50DTU
PREMIUM
size: 100MB, 500MB, 1GB, 2GB, 5GB, 10GB, 20GB, 30GB, 40GB, 50GB, 100GB, 150GB, 200GB, 250GB, 500GB
performance: P10 100DTU, P2 200DTU, SP3 800DTU
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
12
What is DTU
DTUs provide a way to describe the relative capacity of a performance level of
Basic, Standard, and Premium databases. DTUs are based on a blended
measure of CPU, memory, reads, and writes.
PART ONE: SQL Azure and DTU
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
13
Service Tier/Performance
LevelDTU MAX DB Size Max Worker Threads Max Sessions
Benchmark Transaction Rate
Predictability
Basic
5 2 GB 30 30016,600 transactions
per hourGood
Standard/S0
10 250 GB 60 600521 transactions
per minuteBetter
Standard/S1
20 250 GB 90 900934 transactions
per minuteBetter
Standard/S2
50 250 GB 120 1,2002,570 transactions
per minuteBetter
Premium/P1
100 500 GB 200 2,400105 transactions
per secondBest
Premium/P2
200 500 GB 400 4,800228 transactions
per secondBest
Premium/P3
800 500 GB 1,600 19,200735 transactions
per secondBest
PART ONE: Adventure with WASD
Adventure…
… of course Adventure Works 2012 for SQL Database
Adventure Works for SQL Server 2012
Release date: March 2012
Adventure Works for SQL Azure
Release date: April 2012
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
14
PART TWO:
demo mode – first step
PART TWO: basic database
sql azure database
sql premise database
portal
management studio
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
16
PART THREE:
slide talks – backup options
Backup Strategy
What is Backup?
What is Strategy?
Will we need this?
18
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
ITS ONLY ONE: BE PREPARED
Backups
about type of backup ( simple rm / full rm)
about place for stored backup data
about backup window
about procedure used for backup
about backup tools
about backup of „backup logs”
about estimated time for executing backup
about REAL TIME of executing backup
BEST PRACTICE FOR SURVIVING DISASTER19
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
In the request, backup, should include the following information:
• Information about the operating system and application version for online backup and
installed updates for these components
• a file backup policy, in particular:
a number of versions of a file stored
the storage time of the next version of the file
the frequency of execution of such incremental backups with the proposal of their
implementation
• Online Backup Policy
the storage time of a full backup with storage time such an incremental backup
the time of transaction log files
the frequency of execution of a full backup with the proposal deadline for
its implementation
the frequency of execution of the transaction log backup
• Information about trees directories / files that should be omitted
or included during backup tasks (include / exclude list)
• Number and type / model of physical processors,
• Does the node will use the connection to the SAN to implement backup
BACKUP > extract from SOP*20
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
This register contains information about a backup plan implemented.
Backup file space:
number of versions of a file stored in a backup
number of days that are kept more versions of a file
number of versions of a file stored in the backup system after its removal from client
device
number of days that will store the latest version of the deleted file from the client
device
number of days that will be stored in the archive
Online Backup:
number of backups stored in full backup
number of incremental backups / diff / full stored in the backup
frequency of transaction log backups stored in the backup (for databases)
number of days the backups to be stored on-line backup system
The list of nodes defined in the system backup:
Domain | Node name | IP address of the node
The list of defined backup tasks (called schedule)
name of the task (schedule) | execution time
a period of at which the task is repeated
BACKUP (registry) > extract from SOP*21
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
Restore Strategy
What is Restore?
What is Strategy?
Will we need this?
22
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
Best practices by Brent Ozar
SQL Server Backup Best Practices |
Written on October 17, 2007 by Brent Ozar in SQL Server
>> http://bit.ly/12oXm4h
I’ve been backing up SQL Servers for almost a decade now, and it’s time to share the lessons I’ve learned.
All of this is my own opinion – your mileage may vary – but I’ll try to explain the reasoning behind the
choices I make. I won’t address log shipping or snapshots this time around.
• Never back up databases to local disk.
• Back up databases to a fileshare, then back the share up to tape.
• Cost justify the network share with lower licensing costs & simpler backups.
• Back up to a different SAN if possible.
• My sweet spot for the backup array is raid 10 SATA.
• Backup agents like NetBackup and Backup Exec mean giving up scheduling control.
• Do regular fire drill rebuilds and restores.
• Build a standalone restore testbed.
• Keep management informed on restore time estimates.
• Trust no one.
23
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
ITS ONLY ONE: BE PREPARED
Restore
about type of backup ( simple rm / full rm)
about place for stored backup data
about the procedures of recovery
about estimated time for recovery
about REAL TIME for recovery
about tools for recovery
about Corporate Backup Manager
about password for access to library
BEST PRACTICE FOR SURVIVING DISASTER24
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
Register for Recovery/Restore/Replacement Tests
This register contains information about the tests and replacement of part or all of the environment. It
consists of the following fields:
the date of commencement and completion of the recovery test
client for which the test was performed recovery test
servers involved in testing and replacement
extent of testing and replacement
person / persons performing the recovery test
person on the client side accepts the correctness of the recovery test
subsequent to the recovery test
RESTORE > extract from SOP*25
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
PART THREE:
Azure SQL Database Backup and Restore
Microsoft Azure SQL Database has built-in backups to support self-service Point in Time Restore and Geo-Restore
for Basic, Standard, and Premium service tiers.
If you have Web or Business Edition databases, you must create your own backup strategy. You can use
database copy or Import and Export services to create copies of the data and export the file to an Microsoft Azure
storage account.
Built-in Automatic Backup in Azure SQL Database >> Azure SQL Database automatically creates backups of every
active database using the following schedule:
full database backup once a week,
differential database backups once a day,
transaction log backups every 5 minutes.
The full and differential backups are replicated across regions to ensure availability of the backups in the event of a
disaster.
26
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
PART THREE:
Azure SQL Database Backup and Restore
Backup storage is the storage associated with your automated database backups that are used for Point in Time
Restore and Geo-Restore. Azure SQL Database provides up to 200% of your maximum provisioned database
storage of backup storage at no additional cost.
For example, if you have a database in the Standard service tier with a provisioned size of 250 GB, you will be
provided with 500 GB of backup storage at no additional charge.
Point in Time Restore is designed to recover a database to a specific point in time within the backup retention period
supported by the service tier of the database. Restoring creates a new database with the same service tier that was in
use at the chosen restore point and the lowest performance level supported by that tier.
For example, if you restore a database which was set to Premium at the specified restore point in time, the new
database will also be a Premium database and the performance level is set to P1
27
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
PART THREE:
Azure SQL Database Backup and Restore
Service Tier Geo-RestoreSelf-Service Point in
Time Restore
Backup Retention
Period
Restore a Deleted
Database
Web Not supported Not supported n/a n/a
Business Not supported Not supported n/a n/a
Basic Supported Supported 7 days √
Standard Supported Supported 14 days √
Premium Supported Supported 35 days √
The time taken to complete a restore depends on the size of the database and the length of the log chain. To get a
good estimate of the restore time, you should periodically test restoring the database.
You can monitor the restore operation using sys.dm_operation_status.
28
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
PART THREE: SQL Server Backup and Restore with
Windows Azure Blob Storage Service SQL Server backups to and restoring from the Windows Azure Blob storage service. It also provides a summary
of the benefits of using the Windows Azure Blob service to store SQL Server backups.
SQL Server supports storing backups to the Windows Azure Blob storage service in the following ways:
Manage your backups to Windows Azure: Using the same methods used to backup to DISK and TAPE, you
can now back up to Windows Azure storage by Specifying URL as the backup destination. You can use this
feature to manually backup or configure your own backup strategy like you would for a local storage or other
off-site options. This feature is also referred to as SQL Server Backup to URL. For more information, see SQL
Server Backup to URL. This feature is available in SQL Server 2012 SP1 CU2 or later.
29
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
PART THREE: SQL Server Backup and Restore with
Windows Azure Blob Storage ServiceBenefits of Using the Windows Azure Blob Service for SQL Server Backups
Flexible, reliable, and limitless off-site storage:
Storing your backups on Windows Azure Blob service can be a convenient, flexible, and easy to access off-site option.
Creating off-site storage for your SQL Server backups can be as easy as modifying your existing scripts/jobsBy choosing
to geo replicate the Blob storage you have an extra layer of protection in the event of a disaster that could affect the
whole region. In addition, backups are available from anywhere and at any time and can easily be accessed for restores.
Backup Archive:
The Windows Azure Blob Storage service offers a better alternative to the often used tape option to archive backups.
Tape storage might require physical transportation to an off-site facility and measures to protect the media. Storing
your backups in Windows Azure Blob Storage provides an instant, highly available, and a durable archiving option.
No overhead of hardware management:
There is no overhead of hardware management with Windows Azure services. Windows Azure services manage the
hardware and provide geo-replication for redundancy and protection against hardware failures.
Cost Benefits:
Pay only for the service that is used. Can be cost-effective as an off-site and backup archive option. See the Windows
Azure Billing Considerations section for more information and links.
30
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
PART THREE: SQL Server Backup and Restore with
Windows Azure Blob Storage Service
Benefits of Using the Windows Azure Blob Service for SQL Server Backups
Currently for instances of SQL Server running in a Windows Azure Virtual Machine,
backing up to Windows Azure Blob storage services can be done by creating attached
disks.
However, there is a limit to the number of disks you can attach to a Windows Azure Virtual Machine. This limit is 16
disks for an extra large instance and fewer for smaller instances. By enabling a direct backup to Windows Azure Blob
Storage, you can bypass the 16 disk limit.
In addition, the backup file which now is stored in the Windows Azure Blob storage
service is directly available to either an on-premises SQL Server or another SQL Server
running in a Windows Azure Virtual Machine, without the need for database
attach/detach or downloading and attaching the VHD.
31
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
PART FOUR:
demo mode – next step
PART TWO: basic database
backup
restore
automation
backup to url
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
33
Don’t Ask Me…
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
35
APPENDIX:
links & demos
Most Important Article (in my private opinion)
http://bit.ly/WIHlDL
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
37
Authors: Conor Cunningham, Tobias Ternström, Silvano Coriani, Ewan Fairweather
Contributing Author: Ralph Squillace
MSDN SQL Database District
Windows Azure SQL Database (formerly SQL Azure) | http://bit.ly/H0Wdfx
What's New in Windows Azure SQL Database (formerly SQL Azure)
Backward Compatibility in Windows Azure SQL Database
Known Issues in Windows Azure SQL Database
Introducing Windows Azure SQL Database
Tutorials
Feedback and Community Information
Windows Azure Platform Management Portal
Windows Azure SQL Database Concepts
Administration
Development
Guidelines and Limitations
Management REST API Reference
Transact-SQL Reference
Errors and Exceptions Reference
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
38
APPENDIX: additional links Red Gate Cloud Ready Services
http://cloudservices.red-gate.com/
General Guidelines and Limitations (Windows Azure SQL Database)
http://bit.ly/11wB6cK
Adventure Works for SQL Database (formerly SQL Azure)
http://bit.ly/125s0W0
Federations: Building Scalable, Elastic, and Multi-tenant Database Solutions
http://bit.ly/ZxzjmQ
http://bit.ly/15GzIEE
Error Messages (Windows Azure SQL Database)
http://bit.ly/17tnQtE
Compare SQL Server with Windows Azure SQL Database
http://bit.ly/15RyB5u
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
39
Just Azure
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
40
http://JustAzure.com
AFTER SESSION
CONTACT:
MAIL: KoprowskiT@windowslive.com
MSG: KoprowskiT@windowslive.com
TWITTER/FACEBOOK/LINKEDIN: KoprowskiT
SLIDES FROM SESSION:
SQL Relay 2014 Page: https://www.sqlsaturday.com/311/schedule.aspx
SlideShare Profile: http://www.slideshare.net/Anorak
BLOGS:
ITPRO Anorak’s Vision: http://itblogs.pl/notbeautifulanymore/ [PL/EN]
Volume Licensing Specialites: http://koprowskit.eu/licensing/ [PL]
My MVP Blog: http://koprowskit.eu/geek/ [EN/ES/PL]
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
41
PLEASE REMEMBER:
Raffle at the End
in main ‚theatre’ auditorium
Feedback on site
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
42
Thank You Very Much
Q & A
SQL Relay 2014 | Leeds Oct 28th | KoprowskiT - SQL Server in the Cloud - from Plan to Backup to CLoud
43
Our awesome sponsors