Microsoft released SQL Azure more than two years ago - that's enough time for testing (I hope!). So, are you ready to move your data to the Cloud? If you’re considering a business (i.e. a production environment) in the Cloud, you need to think about methods for backing up your data, a backup plan for your data and, eventually, restoring with Red Gate Cloud Services. In this session, you’ll see the differences, functionality, restrictions, and opportunities in SQL Azure and On-Premise SQL Server 2008/2008 R2/2012. We’ll consider topics such as how to be prepared for backup and restore, and which parts of a cloud environment are most important: keys, triggers, indexes, prices, security, service level agreements, etc.
4. ABOUT ME
•Leader of Polish SQL Server User Group
•Microsoft CertifiedTrainer(SharePoint, SQL Server, Security, Azure)
•SQL Server MVP (five years)
•MVP Mentor Program Member
•consultant, security& licensingauditor
•activeblogger, influencer, technicalwriter
•last9 yearslivingin Data Processing Center
•last14 yearsbanking and ICT
•NOW goingintoIndependent Consultancy
•frequentlyspeaker atseveralconferences: 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 TerminologyCommunity/ translationsfor Wndows7/8 and Visual Studio 2010/2012
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 4
5. AGENDA
•PART ONE: Plan
Plan, Compability,
•PART TWO: Backup
Backup,Restore,
Synchronize, Schedule
•PART TWO: Cloud
Tools
•APPENDIX: additionallinks
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 5
7. SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 7
8. PART ONE: AzureShortIntroduction
•Windows Azure Compute: Virtualized compute environment based on Windows ServerStorage: Durable, scalable, & available storageManagement: 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 busAccess Control: Rules-driven, claims-based access control
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 8
10. Data Centersfor AzurePlatform
North America
US Central -Iowa
US East -Virginia
US East 2 -Virginia
US GovIowa -Iowa
US GovVirginia -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
SouthAmerica(preview)
Brasil-Sao Paulo,
Some datacenters have servers grouped inside containers -each containing
1800-2500 servers.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 10
11. Security Requirementsfor AzurePlatform
AsaServiceProviderMicrosofthasanobligationtopassingtheseveralrulesforsecurity:
•ISO/IEC27001:2005
•SAS70Type1andII
Alsotheypassing(continuisly)severaldatasecuringaudits:
•PCIDSS
•SOXcompliance
•HIPAAcompliance
AndofcourserequirementsforDataCenters:
•Physical security of the data centers (locks, cameras, biometric devices, card readers, alarms)
•Firewalls, application gateways and IDS to protect the network
•Access Control Lists (ACLs) applied to virtual local area networks (VLANs) and applications
•Authentication and authorization of persons or processes that request access to data
•Hardening of the servers and operating system instances
•Redundant internal and external DNS infrastructure with restricted write access
•Securing of virtual machine objects
•Securing of static and dynamic storage containers
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 11
12. Security Requirementsfor AzurePlatform
•ISO/IEC 27001:2005 Audit and Certification
ISOScope:ThefollowingAzurefeaturesareinscopeforthecurrentISOaudit:CloudServices(includingFabricandRDFE),Storage(Tables,Blobs,Queues), VirtualMachines(includingwithSQLServer),VirtualNetwork,TrafficManager,WebSites,BizTalkServices,MediaServices,MobileServices,ServiceBus, Workflow,Multi-FactorAuthentication,ActiveDirectory,RightManagementService,SQLDatabase,andHDInsight.ThisincludestheInformationSecurityManagementSystem(ISMS)forAzure,encompassinginfrastructure,development,operations,andsupportforthesefeatures.AlsoincludedarePowerBIforOffice365andPowerQueryService.
•SOC 1 and SOC 2 SSAE 16/ISAE 3402 Attestations
Scope:ThefollowingAzurefeaturesareinscopeforthecurrentSOC1Type2andSOC2Type2attestations:CloudServices(includesstatelessWeb,andWorkerroles),Storage(Tables,Blobs,Queues),VirtualMachines(includespersistentvirtualmachinesforusewithsupportedoperatingsystems)andVirtualNetwork(includesTrafficManager).
•United Kingdom G-Cloud Impact Level 2 Accreditation
Scope:ThefollowingAzurefeaturesareinscopefortheIL2accreditation:VirtualMachines,CloudServices,Storage(Tables,Blobs,Queues,Drives),andVirtualNetwork.
•CloudSecurityAllianceCloudControlsMatrix
•FederalRiskandAuthorizationManagementProgram(FedRAMP)
•PaymentCardIndustry(PCI)DataSecurityStandards(DSS)Level1
•HIPAABusinessAssociateAgreement(BAA)
•FamilyEducationalRightsandPrivacyAct(FERPA)
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 12
13. PART ONE: Virtual Machines
Virtual Machines
Launch Windows Server and Linux in minutes
•Scale from 1 to 1000s of VM Instances
•Built-in Virtual Networking, Load Balancing
•Leverage Hybrid Consistency with On-Premises
•Microsoft SQL Server and SharePoint Server
•Oracle, MySQL, Redis, MongoDB
•Save money with per-minute billing
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 13
14. PART ONE: HDInsight
HDInsight
Our 100% Apache Hadoop-based service in the cloud
•Scale to petabytes on demand
•Process unstructured and semi-structured data
•Develop in Java, .NET, and more
•No hardware to buy or maintain
•Pay only for what you use
•Spin up a Hadoop cluster in minutes
•Visualize your Hadoop data in Excel
•Easily integrate on-premises Hadoop clusters
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 14
15. PART ONE: Machine Learning
Machine LearningPREVIEW
Powerful cloud-based predictive analytics
•Designed for new and experienced users
•Proven algorithms from MS Research, Xbox and Bing
•First class support for the open source language R
•Seamless connection to HDInsightfor big data solutions
•Deploy models to production in minutes
•Pay only for what you use. No hardware or software to buy.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 15
16. Shared Environment
Hardware Boundary
Hardware Boundary
Hardware Boundary
Hardware Boundary
B
C
D
A
A
B
B
C
C
D
D
A
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 16
17. PART ONE: SQL Azurefewdaysago
We want to work with SQL Azure (oops SQL Database)
•Size doesmatter?
•Personal: 1GB, 5GB
•Business: 10GB, 20GB, 30GB, 40GB, 50GB, 100GB, 150GB (3x50)
•“Private”: less than 100 MB ($4.995 / month)
•Version doesmatter?
•10.25 my firstexperience, but afterJuly 2011 Service Release…
•11.0.9214.51 now> closeto 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.
error msg 40544:
The database has reached its size quota. Partition or delete data, drop indexes, or consult the documentation for possible resolutions.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 17
18. PART ONE: SQL Azurenow
•Size doesmatter?
•Personal: 1GB, 5GB
•Business: 10GB, 20GB, 30GB, 40GB, 50GB, 100GB, 150GB (3x50)
•“Private”: less than 100 MB ($4.995 / month)
•Size doesmatter!
•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
WhatisDTU
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.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 18
19. PART ONE: SQL Azureand DTU
Service Tier/Performance Level
DTU
MAX DB Size
MaxWorkerThreads
MaxSessions
Benchmark Transaction Rate
Predictability
Basic
5
2 GB
30
300
16,600 transactions per hour
Good
Standard/S0
10
250 GB
60
600
521 transactions
per minute
Better
Standard/S1
20
250 GB
90
900
934 transactions
per minute
Better
Standard/S2
50
250 GB
120
1,200
2,570 transactions per minute
Better
Premium/P1
100
500 GB
200
2,400
105 transactions
per second
Best
Premium/P2
200
500 GB
400
4,800
228 transactions per second
Best
Premium/P3
800
500 GB
1,600
19,200
735 transactions
per second
Best
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 19
20. PART ONE: SQL AzureCollation
•Collationdoes it matter?
•default database collation used by Microsoft Azure SQL Database is SQL_LATIN1_GENERAL_CP1_CI_AS, where LATIN1_GENERAL is English (United States), CP1 is code page 1252, CI is case-insensitive, and AS is accent-sensitive
SQL_Latin1_General_CP1_CI_AS
•When using an on-premiseSQL Server, you can set collations at server, database, column, and expression levels.
•Microsoft Azure SQL Database does not allow setting the collation at the server level.
•To use the non-default collation with Microsoft Azure SQL Database, set the collation with the Create Database Collate option, or at the column level or the expression level.
•SQL Database does not support the Collate option with the Alter Database command.
•By default, in SQL Database, temporary data will have the same collation as the database
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 20
21. PART ONE: Users
•Naming, Logins, Users
•Admin, administrator, guest, root, sa
•Data Migration Support
•Youcanuse:
•SQL Server 2008 Integration Services (SSIS)
•The bulkcopyutility(BCP.exe)
•System.Data.SqlClient.SqlBulkCopyclass
•Scripts thatuseINSERT statementsto loaddata intothe database
•SQL Data Compare from Red Gate
•Youcan'tuse:
•The RESTORE statement.
•Attachinga databaseto the SQL Database server.
•No SQL Server Agent (almost)
•No SQL Server jobs
•No SQL Server Browser
•No Cross Database queries
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 21
22. PART ONE: Indexes
Indexes, of courseindexes
•You MUST use CLUSTERED INDEX with your (Azure)SQL Database.
•Heap tables are not supportes, so You MUST create CLUSTERED INDEX before INSERT will be executed
error msg 40054:
Tables without a clustered index are not supported in this version of SQL Server.Create a clustered index and try again.
CREATETABLESource(IdintNOTNULLIDENTITY, [Name]nvarchar(max),
CONSTRAINT[PK_Source]PRIMARYKEYCLUSTERED
(
[Id]ASC
))
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 22
23. PART ONE: SQL Database
Closed connections to the service… by the service
Becauseof multi-tenant:
•Excessive resource usage
•Connections that have been idle for 30 minutes or longer (Program assuming your connection is going to fail)
•Failover because of server failures
errors:
40197, 40501, 40544, 40549, 40550,
40551, 40552, 40553, 40613
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 23
24. Sample of SQL Compability
In Scope for v1
•Constants
•Constraints
•Cursors
•Index management and rebuilding indexes
•Local temporary tables
•Reserved keywords
•Stored procedures
•Statistics management
•Transactions
•Triggers
•Tables, joins, and table variables
•Transact-SQL language elements such as
•Create/drop databases
•Create/alter/drop tables
•Create/alter/drop users and logins
•and so on.
•User-defined functions
•Views
Out of Scope for v1
•Common Language Runtime (CLR)
•Database file placement
•Database mirroring
•Distributed queries
•Distributed transactions
•Filegroup management
•Global temporary tables
•Spatial data and indexes
•SQL Server configuration options
•SQL Server Service Broker
•System tables
•Trace Flags
•Physical server or catalog DDL and views
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 24
25. SQLServer 2005 {9.0} NON-Compability
•Common Language Runtime (CLR) and CLR User-Defined Types
•Database Mirroring
•Service Broker
•Table Partitioning
•Typed XML and XML indexing is not supported. The XML data type is supported by SQL Azure.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 25
26. SQL Server 2008 {10.0} NON-Compability
•Change Data Capture
•Data Auditing
•Data Compression
•Extended Events
•External Key Management / Extensible Key Management
•FILESTREAM Data
•Integrated Full-Text Search
•Large User-Defined Aggregates (UDAs)
•Large User-Defined Types (UDTs)
•Performance Data Collection (Data Collector)
•Policy-Based Management
•Resource Governor
•SQL Server Replication
•Transparent Data Encryption
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 26
27. SQL Server 2008 R2 {10.50} NON-Compability
•SQL Server Utility
•SQL Server PowerShell Provider
•Master Data Services
SQL Server Management Studio
does not support Windows Azure SQL Database in versions prior to
SQL Server 2008 R2
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 27
28. Connection Model
When writing applications for Windows Azure SQL Database, you can use the following drivers and libraries:
•.NET Framework Data Provider for SQL Server (System.Data.SqlClient) from the .NET Framework 3.5 Service Pack 1 or later.
•Entity Framework from the .NET Framework 3.5 Service Pack 1 or later.
•SQL Server 2008 R2 Native Client ODBC driver. SQL Server 2008 Native Client ODBC driver is also supported, but has less functionality.
•SQL Server 2008 Driver for PHP version 1.1 or later.
•An updated version of SQL Server JDBC Driver 3.0 that supports SQL Database.
•Windows Azure SQL Database supports tabular data stream (TDS) protocol client version 7.3 or later. Earlier versions of TDS protocol are not supported.
•Connecting to Windows Azure SQL Database by using OLE DB or ADO is not supported
•Support for ASP.NET controls
•Clients connect directly to a database
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 28
29. Security Model
•Uses regular SQL security model
•Authenticate logins, map to users and roles
•Authorize users and roles to SQL objects
•Support for standard SQL Authlogins
•Username + password
•AD Federation, WLID–Windows Live ID, etcas alternate authentication protocols
[admin, administrator, guest, root, sa] Security model is 100% compatible with on-premise SQL
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 29
30. Scenarios for V1
•Departmental Applications
‒Simple application built by individual or department
‒Need simple deployment, self-management, IT: “Empowerment and Governance”
•Web Applications
‒Small business or startup that uses the cloud as their IT
‒Simple deployment, self-management, scale on demand
•ISV
‒ISV hosting software on behalf of customer
‒Multi-tenant support for billing and isolation
•Data Hub (Shortly After V1)
‒Sharing and aggregating of data across tiers and across enterprises
‒Centralized place for data, high scale, sync with existing data sources
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 30
31. PART ONE: SQL Database
Point of Difference
On-premise SQL Server
Windows Azure SQL Database
Where you manage server-level security
TheSecurityfolder in SQL Server Management Studio'sObjectExplorer
Themasterdatabase
Server-level security role for creating logins
securityadminfixed server role
loginmanagerdatabase role in the master database
Commands for managing logins
CREATE LOGIN
CREATE LOGIN
ALTER LOGIN
ALTER LOGIN
DROP LOGIN
DROP LOGIN
(There are some parameter limitations and you must be connected to themasterdatabase)
View that shows all logins
sys.syslogins(sys.sql_loginsfor SQL Server authentication logins)
sys.sql_logins
(You must be connected to themasterdatabase)
Server-level role for creating databases
dbcreatorfixed database role
dbmanagerdatabase role in the master database
Command for creating a database
CREATE DATABASE
CREATE DATABASE
(There are some parameter limitations and you must be connected to themasterdatabase)
Dropping databases
DROP DATABASE
DROP DATABASE
If a user is in thedbmanagerrole, they have permission toDROPany database, regardless of which user originally created it.
View that lists all databases
sys.databases
sys.databases
(view)
(You must be connected to themasterdatabase)
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 31
32. PART ONE: SQL Database Federations
•One or more tables within a database are split by row and portioned across multiple databases (federationmembers)/sharding/
•Afederationis a collection of database partitions that are:
•defined by a federation distribution scheme, known as thefederation scheme.
•federation scheme defines afederation distribution key,
(which determines the distribution of data to partitions within the federation)
•federation distribution key must be an INT, BIGINT, UNIQUEIDENTIFIER, or VARBINARY
•only one federation scheme and one federation distribution key for a federation.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 32
33. PART ONE: SQL Database scaleup/down
•Scale up and out
•10K records > 1DB >> INSERT, INSERT > 10M records
•10K records > 10K max / DB >> INSERT, INSERT >> 100DB each 10K
•Partitioning:
•Horizontal / per row
•Vertical/ per column
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 33
34. 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 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 34
36. Backup Strategy
WhatisBackup?
WhatisStrategy?
Willwe needthis?
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 36
37. ITS ONLY ONE: BE PREPARED
Backups
•abouttypeof backup ( simplerm/ fullrm)
•aboutplace for storedbackup data
•aboutbackup window
•aboutprocedureusedfor backup
•aboutbackup tools
•aboutbackup of „backup logs”
•about estimated time for executing backup
•about REAL TIME of executing backup
BEST PRACTICE FOR SURVIVING DISASTER
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 37
38. In the request,backup,should include the followinginformation: • Informationabout theoperating systemandapplication versionforonline backupand installedupdates forthese components•a filebackuppolicy, in particular: anumber ofversionsof a filestoredthe storage timeofthe nextversion of the filethe frequency ofexecutionofsuchincrementalbackupswith the proposalof their implementation•OnlineBackupPolicythe storage timeofa fullbackupwithstorage timesuchan incrementalbackupthetimeof transactionlog filesthe frequency ofexecutionofa fullbackupwith the proposaldeadline for itsimplementationthe frequency ofexecutionofthe transactionlogbackup• Informationabout treesdirectories /filesthatshould be omittedorincludedduringbackuptasks(include /exclude list) •Number and type/ modelof physical processors, • Does thenodewill use theconnection to theSANtoimplementbackup
BACKUP > extractfrom SOP*
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 38
39. This registercontains information abouta backupplanimplemented.
•Backupfile space:
•numberofversions of a filestored in abackup
•numberof daysthat are keptmoreversions of a file
•numberofversionsof a filestored in thebackupsystemafter its removalfrom client device
•numberofdays thatwill storethe latest version ofthe deletedfilefrom the client device
•numberofdaysthatwill bestored inthe archive
•OnlineBackup:
•numberofbackupsstored infullbackup
•numberofincrementalbackups/diff/ fullstored in thebackup
•frequencyof transactionlogbackupsstored in thebackup (for databases)
•numberof days thebackupsto be storedon-linebackupsystem
•The listof nodesdefined in the systembackup:
•Domain|Node name|IP address ofthe node
•The list of definedbackuptasks(calledschedule)
•name of the task(schedule) |execution time
•a period of atwhichthe task isrepeated
BACKUP (registry) > extractfrom SOP*
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to
Backup, to Cloud
39
41. Best practicesby BrentOzar
SQL Server Backup Best Practices|
Written on October 17, 2007 by Brent Ozarin 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 NetBackupand 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.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 41
42. ITS ONLY ONE: BE PREPARED
Restore
•abouttypeof backup ( simplerm/ fullrm)
•aboutplace for storedbackup data
•aboutthe proceduresof recovery
•aboutestimatedtimefor recovery
•aboutREAL TIME for recovery
•abouttoolsfor recovery
•aboutCorporateBackup Manager
•aboutpasswordfor accessto library
BEST PRACTICE FOR SURVIVING DISASTER
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 42
43. Register for Recovery/Restore/ReplacementTests
This registercontains information aboutthe testsand replacementof part or allof the environment.It consistsof the followingfields:
•the date of commencementand completionofthe recoverytest
•clientfor which thetestwas performedrecoverytest
•serversinvolvedin testingand replacement
•extent of testingand replacement
•person/ personsperforming therecoverytest
•person on theclientsideacceptsthe correctness ofthe recoverytest
•subsequentto the recoverytest
RESTORE > extractfrom SOP*
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 43
44. PART TWO: 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:
•fulldatabase 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.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 44
45. PART TWO: Azure SQL Database Backup and Restore
BackupstorageisthestorageassociatedwithyourautomateddatabasebackupsthatareusedforPointinTimeRestoreandGeo-Restore.AzureSQLDatabaseprovidesupto200%ofyourmaximumprovisioneddatabasestorageofbackupstorageatnoadditionalcost.
Forexample,ifyouhaveadatabaseintheStandardservicetierwithaprovisionedsizeof250GB,youwillbeprovidedwith500GBofbackupstorageatnoadditionalcharge.
PointinTimeRestoreisdesignedtorecoveradatabasetoaspecificpointintimewithinthebackupretentionperiodsupportedbytheservicetierofthedatabase.Restoringcreatesanewdatabasewiththesameservicetierthatwasinuseatthechosenrestorepointandthelowestperformancelevelsupportedbythattier.
Forexample,ifyourestoreadatabasewhichwassettoPremiumatthespecifiedrestorepointintime,thenewdatabasewillalsobeaPremiumdatabaseandtheperformancelevelissettoP1
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 45
46. PART TWO: Azure SQL Database Backup and Restore
Service Tier
Geo-Restore
Self-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 usingsys.dm_operation_status.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 46
47. PART TWO: SQL Server Backup and Restore with Windows Azure Blob Storage Service
•SQLServerbackupstoandrestoringfromtheWindowsAzureBlobstorageservice.ItalsoprovidesasummaryofthebenefitsofusingtheWindowsAzureBlobservicetostoreSQLServerbackups.
•SQLServersupportsstoringbackupstotheWindowsAzureBlobstorageserviceinthefollowingways:
•ManageyourbackupstoWindowsAzure:UsingthesamemethodsusedtobackuptoDISKandTAPE, youcannowbackuptoWindowsAzurestoragebySpecifyingURLasthebackupdestination.Youcanusethisfeaturetomanuallybackuporconfigureyourownbackupstrategylikeyouwouldforalocalstorageorotheroff-siteoptions.ThisfeatureisalsoreferredtoasSQLServerBackuptoURL.Formoreinformation, seeSQLServerBackuptoURL.ThisfeatureisavailableinSQLServer2012SP1CU2orlater.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 47
48. PART TWO: SQL Server Backup and Restore with Windows Azure Blob Storage Service
BenefitsofUsingtheWindowsAzureBlobServiceforSQLServerBackups
•Flexible,reliable,andlimitlessoff-sitestorage:
StoringyourbackupsonWindowsAzureBlobservicecanbeaconvenient,flexible,andeasytoaccessoff-siteoption.Creatingoff- sitestorageforyourSQLServerbackupscanbeaseasyasmodifyingyourexistingscripts/jobsBychoosingtogeoreplicatetheBlobstorageyouhaveanextralayerofprotectionintheeventofadisasterthatcouldaffectthewholeregion.Inaddition,backupsareavailablefromanywhereandatanytimeandcaneasilybeaccessedforrestores.
•BackupArchive:
TheWindowsAzureBlobStorageserviceoffersabetteralternativetotheoftenusedtapeoptiontoarchivebackups.Tapestoragemightrequirephysicaltransportationtoanoff-sitefacilityandmeasurestoprotectthemedia.StoringyourbackupsinWindowsAzureBlobStorageprovidesaninstant,highlyavailable,andadurablearchivingoption.
•Nooverheadofhardwaremanagement:
ThereisnooverheadofhardwaremanagementwithWindowsAzureservices.WindowsAzureservicesmanagethehardwareandprovidegeo-replicationforredundancyandprotectionagainsthardwarefailures.
•CostBenefits:
Payonlyfortheservicethatisused.Canbecost-effectiveasanoff-siteandbackuparchiveoption.SeetheWindowsAzureBillingConsiderationssectionformoreinformationandlinks.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 48
49. PART TWO: SQL Server Backup and Restore with Windows Azure Blob Storage Service
BenefitsofUsingtheWindowsAzureBlobServiceforSQLServerBackups
•CurrentlyforinstancesofSQLServerrunninginaWindowsAzureVirtualMachine,backinguptoWindowsAzureBlobstorageservicescanbedonebycreatingattacheddisks.
However,thereisalimittothenumberofdisksyoucanattachtoaWindowsAzureVirtualMachine.Thislimitis16disksforanextralargeinstanceandfewerforsmallerinstances.ByenablingadirectbackuptoWindowsAzureBlobStorage, youcanbypassthe16disklimit.
•Inaddition,thebackupfilewhichnowisstoredintheWindowsAzureBlobstorageserviceisdirectlyavailabletoeitheranon-premisesSQLServeroranotherSQLServerrunninginaWindowsAzureVirtualMachine,withouttheneedfordatabaseattach/detachordownloadingandattachingtheVHD.
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 49
51. PART THREE: RedGateCloudServices
•What is Cloud Services from RedGate?
•Suite of tools to help managing cloud services
•Came out of SQL Azure Backup
•Launched in Feb2012–continually developing
•Contain different, but integrated features
•Set up SQL Azure backup/restore
•Back up/Restoreyour Blob storage
•Back up/RestoreAzure table
•Flexible scheduling
•Receive automated emails after each job
•Quickly review your job
•Control how your SQL Azure backups are named
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 51
52. PART THREE: CloudServices
•What is Cloud Services from RedGate?
•Suite of tools to help managing cloud services
•Came out of SQL Azure Backup
•Launched in Feb2012–continually developing
•Contain different, but integrated features
•Set up SQL Azure backup/restore
•Back up/Restoreyour Blob storage
•Back up/RestoreAzure table
•Flexible scheduling
•Receive automated emails after each job
•Quickly review your job
•Control how your SQL Azure backups are named
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 52
53. PART THREE: Backup and Restore
•Backup to Azure Blob Storage or Amazon S3
•Format is a .bacpac
•Zip file containing xml schema and jsondata
•Permissions needed for a transactional backup
•dbmanagerand dbo
•( CREATE DATABASE x AS COPY OF y)
•To export to bacpacfile
•dbo
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 53
57. Most ImportantArticle(in my privateopinion)
http://bit.ly/WIHlDL
Authors:Conor Cunningham,Tobias Ternström,Silvano Coriani,Ewan Fairweather
Contributing Author:Ralph Squillace
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 61
58. 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 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 62
59. APPENDIX: additionallinks
•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 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 63
60. CONTACT:
•MAIL: KoprowskiT@windowslive.com
•MSG: KoprowskiT@windowslive.com
•TWITTER/FACEBOOK/LINKEDIN: KoprowskiT
SLIDES FROM SESSION:
•SQL Relay2014 Page: https://www.sqlsaturday.com/311/schedule.aspx
•SlideShareProfile: http://www.slideshare.net/Anorak
BLOGS:
•ITPRO Anorak’sVision: http://itblogs.pl/notbeautifulanymore/[PL/EN]
•Volume LicensingSpecialites: http://koprowskit.eu/licensing/[PL]
•My MVP Blog: http://koprowskit.eu/geek/[EN/ES/PL]
AFTER SESSION
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 64
61. ThankYouVeryMuch
Q & A
SQL Relay 2014 | Bristol Oct 15th | KoprowskiT - from Plan, to Backup, to Cloud 65