Eric Moreau - Samedi SQL - Backup dans Azure et BD hybrides
-
Upload
msdevmtl -
Category
Technology
-
view
118 -
download
0
Transcript of Eric Moreau - Samedi SQL - Backup dans Azure et BD hybrides
Solutions hybrides, Disaster Recovery et Backup avec SQL Server 2014 et AzureEric Moreau, MVP, Moer inc.
www.emoreau.com - [email protected]
2015-02-07
Why Do We Need Cloud DR for SQL Server?
• An event can cause on-premises SQL Server to become unavailable
‐ Temporarily (e.g. gateway failure)
‐ Permanently (e.g. flooding)
• A disaster recovery site is expensive
‐ Site rent + maintenance
‐ Hardware
‐ Ops
3
Characteristic of Cloud DR for SQL Server
• Deploy one or more secondary replicas for on-premises SQL Server
‐ Replicas continuously synchronize
• At best region: West US, East US, East Asia, Southeast Asia, North Europe, West Europe
‐ Political considerations
‐ Latency
• Low TCO
‐ VM and storage
5
Backup to Windows Azure
Windows Azure
storage
WA
Win
do
ws
Azu
re
Blo
bs
• On-site/off-site storage costs
• Device management costsB
ox
• XDrives limited to 1 terabyte
• Max 16 drives
• Manage drives and policy
• Near “bottomless” storage
• Off-site, geo-redundant
• No provisioning
• No device management
• Media safety (decay-free)
• Remote accessibility
Backup to Windows Azure
WA
Win
do
ws
Azu
re
Blo
bs
• Backing up to Azure is new to SQL
2014
• Taking a backup is easy
• Right-click your database
• Select Tasks
• Select Back Up …
Backup to Windows Azure
• Ensure the file name has a
.bak extension
• Otherwise, you will get
trouble restoring it!
• Set your credential
• Set the correct container
Backup to Windows Azure
• Open the Options tab
• You can set the
compression
• my tests = about 7-1
• You can set the
encryption
Deploy DB to Windows Azure
Win
do
ws
Azu
re
Blo
bs
• To deploy a database to Windows
Azure:
• Right-click the database
• Select Tasks
• Select Deploy Database to
Windows Azure SQL Database
• Notice that a similar wizard exists to
deploy to a VM
• Now that you have a database in
Azure
• You can use your local SSMS to
connect to it
• Connect to server
• Ensure your IP address is trusted
in the Azure management console
Deploy DB to Windows Azure
SQL Server Data Files in Windows Azure
• Ability to move data & log files in Windows
Azure Storage, while keeping the compute
node of SQL Server on-premise
• Transparent Data Encryption (TDE) is supported
• No application changes required
• Centralized copy of data and log files
• Enjoy unlimited storage capacity in Azure
Storage (built in HA, SLA, geo-DR)
• Secure because TDE encryption key can be stored
on-premise
• Restore database is simply an attach operation
Overview
Benefits• Near-bottomless storage
• Offsite, geo-redundant
• No provisioning
• No device management
• Media safety (decay-free)
• Remote accessibility
Details• Can persist data, log files, or both
• Works with backup to Windows Azure
• FileStream currently not supported
• Failover clustering not supported
• AlwaysOn availability groups supported
Windows Azure VM
On-premises box
Windows Azure
StorageDB3
DB6DB6DB5DB4
DB3DB2DB1Native
support for
SQL Server
database files
stored as
Windows
Azure blobs
Scenarios
Windows Azure
Storage
Node2
Node1
DB1
DB1
DB1
Migrate Database to another
machine
Basic Disaster Recovery
Separation of Compute and
Storage
For Azure VM, expand drive and
size of Xdrive
Better together: IaaS VM per
minute billing
SQL Data Files in Windows Azure
WA
Win
do
ws
Azu
re
Blo
bs
• Updated August 2014 (V6 Preview 3)
• First thing to do is to generate a secret…
• Download and install Azure Storage Explorer from CodePlex
http://blogs.msdn.com/b/igorpag/archive/2013/10/23/create-a-sql-server-2014-database-directly-on-azure-blob-storage-with-sqlxi.aspx
SQL Data Files in Windows Azure
WA
Win
do
ws
Azu
re
Blo
bs
• Run the Azure Storage
Explorer
• Connect to your account
• Select the container that
will contains your data files
• Click Security
• Go to Policies
• Enter values as shown
• Click Save Policies
• Click Close
SQL Data Files in Windows Azure
WA
Win
do
ws
Azu
re
Blo
bs
• Click on Security again
• Open Signatures
• Select your policy
• Click Generate Signature
• Click Copy to Clipboard
SQL Data Files in Windows Azure
WA
Win
do
ws
Azu
re
Blo
bs
• Create the credential in SSMS
• Starts with https
• Full path to your storage
• Shared Access Signature is MANDATORY
• Copy your secret (starting with sr to the end)
SQL Data Files in Windows Azure
WA
Win
do
ws
Azu
re
Blo
bs
• Create a table – nothing different
• And use it!