Cloud Data Replication with SQL Data Sync

Slides:



Advertisements
Similar presentations
Mecanismos de alta disponibilidad con Microsoft SQL Server 2008 Por: ISC Lenin López Fernández de Lara.
Advertisements

SQL Server Replication
GETTING STARTED WITH AZURE SQL DB Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Business Continuity and DR, A Practical Implementation Mich Talebzadeh, Consultant, Deutsche Bank
Virtual techdays INDIA │ September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft.
Virtual techdays INDIA │ November 2010 SQL Azure Data Sync Shilpa Nirmale │ Associate Manager, Accenture.
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
SharePoint Business Continuity Management with SQL Server AlwaysOn
WMU GNL Automation How to make my IT life easier CHRISTOPHER KEYAERT CONSULTANT AT INOVATIV CLOUD AND DATACENTER MANAGEMENT MVP.
SQL Server Replication By Karthick P.K Technical Lead, Microsoft SQL Server.
SQLTeach Presentation Template Use of this template is mandatory (no exceptions) Please note the orientation of this presentation is landscape (16:10);
IMS 4212: Distributed Databases 1 Dr. Lawrence West, Management Dept., University of Central Florida Distributed Databases Business needs.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
SQL Azure Intro and What’s New Level: Introductory to Intermediate Andy Thiru SQL/BI Developer.
Module 11: Introducing Replication. Overview Introduction to Distributed Data Introduction to SQL Server Replication SQL Server Replication Agents SQL.
Module 5: Implementing Merge Replication. Overview Understanding Merge Replication Architecture Implementing Conflict Resolution Planning and Deploying.
Alwayson Availability Groups
DATABASE REPLICATION DISTRIBUTED DATABASE. O VERVIEW Replication : process of copying and maintaining database object, in multiple database that make.
Forthcoming SQL Azure Services: SQL Azure Data Sync & SQL Azure Reporting Mark Scurrell Lead Program Manager Microsoft.
HyperKVS Group Meeting Oracle Streams Dr. Volker Kuhr.
Migrating Data to SQL Azure Arunraj Chandrasekaran Twitter June 21, 2011.
Entwicklung einer echten „Software-as-a-Service" App Mario Szpuszta Platform Strategy Advisor, Microsoft Corp.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
SQL Server Replication HILARY COTTER SQL SERVER MVP
Putting Your Head in the Cloud Working with SQL Azure David Postlethwaite 19/09/2015David Postlethwaite.
Scaling out and in with Azure SQL DB Elastic Scale DBA-203 Warner Chaves, MCM/MVP, SQLTurbo.com, Pythian.com.
SQL Server as a Cloud Service November 11th 2015 Warner Chaves SQL MVP/MCM.
SQL Server as a Cloud Service April 15th 2016 Warner Chaves Data Platform MVP/SQL Server MCM.
Best Practices for Columnstore Indexes Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Carlos Bossy Quanta Intelligence SQL Server MCTS, MCITP BI CBIP, Data Mining Real-time Data Warehouse and Reporting Solutions.
Use Cases for In-Memory OLTP Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Hybrid SharePoint Search
Energy Management Solution
Mobile Application Solution
Cloud Database Platforms for the SQL DBA
Backups for Azure SQL Databases and SQL Server instances running on Azure Virtual Machines Session on backup to Azure feature (manual and managed) in SQL.
With Temporal Tables and More
Scalable Web Apps Target this solution to brand leaders responsible for customer engagement and roll-out of global marketing campaigns. Implement scenarios.
Real Time Data with Azure and Power BI
Introduction to transactional replication
Navigating the options for Data Redundancy
Disaster Recovery Where to Begin
Lead SQL BankofAmerica Blog: SQLHarry.com
of our Partners and Customers
Migrating SQL Server to Azure the Right Way
Using Microsoft Identity Manger with SharePoint 2016 to fill the User Profile Sync Gap Max Fritz Senior Systems Consultant Now Micro.
Example of a page header
Always On Multi-Site Patterns
Mobile Application Solution
Energy Management Solution
Scalable Web Apps Target this solution to brand leaders responsible for customer engagement and roll-out of global marketing campaigns. Implement scenarios.
Exploring Azure Event Grid
Leverage your on-premise investments with cloud innovation
Synchronizing Data With SQL Azure Using SQL Azure Data Sync
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
Azure SQL Data Warehouse for SQL Server DBAS
Database migrated to Azure SQL DB. Checked.
Multi-Farm, Cross-Continent SharePoint Architecture
Traveling in time with SQL Server 2017
Azure SQL Data Warehouse for SQL Server DBAS
Keep your data in sync between SQL Server and Azure SQL Database
Azure SQL Database - Managing your database on the cloud
Understanding Azure SQL DB Service Tiers
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
Power BI.
Distributed Availability Groups
Microsoft 365 Business Technical Fundamentals Series
Michael Stephenson Microsoft MVP - Azure
The Database World of Azure
Presentation transcript:

Cloud Data Replication with SQL Data Sync October 2017 Warner Chaves SQL MCM/ Data Platform MVP

Bio DBA and Consultant for 11 years Previously L3 DBA at HP in Costa Rica, now Principal Consultant at Pythian in Ottawa, Ontario. Microsoft Data Platform MVP. Twitter: @warchav Blog: Sqlturbo.com Email: warner@sqlturbo.com Company: Pythian.com

Agenda Objective: cover the capabilities of SQL Data Sync for Azure based data replication We will go over: Architecture Difference with SQL Server Replication Use Case Scenarios Demos

Pre-requisites Sql Server experience. Azure SQL Database experience.

What is SQL Data Sync? Microsoft Azure Service Built on top of Azure SQL Database Syncs data bi-directionally between Azure SQL Db or SQL Server Cloud based replication

Architecture Azure Region Sync Database Hub Database Sync Group Sync Direction Sync Database Hub Database Sync Group Member: SQL Server On-Premises

Sync Group The Sync Schema describes which data is being synchronized. The Sync Direction can be Hub to Member or Member to Hub, or both. The Sync Interval is how often synchronization occurs. The Conflict Resolution Policy is a group level policy, which can be Hub wins or Member wins.

Database Topology The Hub Database must be an Azure SQL Database. The member databases can be either SQL Databases or SQL Server databases (cloud or on-prem). The Sync Database contains the metadata and log for Data Sync. The Sync Database has to be an Azure SQL Database located in the same region as the Hub Database. Synchronization happens between Hub and member(s) (5 minutes minimum).

Implementation Tracking data changes: it is done with insert, update, and delete triggers. The changes are recorded in a side table in the user database. Synchronizing data: the Hub syncs with each member individually. Changes from the Hub are downloaded to the member and then changes from the member are uploaded to the Hub. Resolving conflicts: Data Sync provides two options for conflict resolution, Hub wins or Member wins. If you select Hub wins, the changes in the hub always overwrite changes in the member. If you select Member wins, the changes in the member overwrite changes in the hub. If there's more than one member, the final value depends on which member syncs first.

DEMO: Setting up Data Sync

What are the Use Cases?

Recommended Scenarios Hybrid Data Footprint: clients that have some data on-prem on SQL and some in Azure SQL Db and need to sync some of it. Distributed Database Application: when one application is split on multiple databases in the cloud but they all reference some common data. Global cloud based replication: keeping databases synced across Azure regions for a subset of their data.

Not Recommended For Disaster Recovery: since data sync works on an individual table level, DR is usually the whole database and there are more efficient ways to do that. Read-Scale: same as the DR scenario, plus the latency on Data Sync might not make it acceptable for read scalability. ETL: it is not an ETL solution since there are no transformation capabilities. Migration from on-prem to Azure: there are other tools for this as well.

Master-Slaves Configuration

Example: Primary in Azure, Slaves in Azure and On-Premises Azure Region Sync Direction Sync Database Member: SQL Server On-Premises Hub Database (Primary) Sync Group Slave Azure Database

Example: Primary On-Premises, Slaves in Azure Azure Region Member: SQL Server On-Premises (Primary) Sync Direction Sync Database Hub Database Sync Group Azure Region Slave Azure Database

Multi-Master Configuration

Example: Read-Write in Azure and On-Premises Azure Region Sync Direction Sync Database Hub Database Sync Group Member: SQL Server On-Premises

Example: Read-Write on both SQL Servers, Azure used for Hub to coordinate Azure Region Sync Direction Sync Database Hub Database Sync Group Member: SQL Server On-Premises Member: SQL Server On-Premises

Careful: watch out for circular references! Sync Group Sync Group Azure Region Azure Region Member: SQL Server On-Premises Sync Database Hub Database Sync Database Hub Database Member: SQL Server On-Premises

Multi-Master There is no complex conflict resolution, either Hub Wins or Member Wins. For bigger safety, recommended to add a column to differentiate origin to the schema. There is no circular reference detection, it’s up to you to setup a valid topology. Don’t Go Crazy!

SQL Replication vs SQL Data Sync SQL Server Replication SQL Data Sync Reads from transaction log Uses scheduled agents Complex conflict detection and handling Can be continuous Supports DDL SQL Server only for publishing Uses table triggers Runs as a cloud service Simple conflict detection and handling 5 minute minimum No DDL support Can publish from SQL Server or Azure SQL Db.

Service Cost The sync service is free right now until it goes GA You pay for the Sync database depending on tier. For Production use, start with at least S0. If you add Hubs in different regions, your cost will go up since you will need another Sync database for that Hub.

Monitoring You can use the PowerShell cmdlets to roll your own monitoring. You can integrate the Data Sync log with Azure Monitor Log Analytics through a scheduled runbook.

DEMO: Data Sync in Action

Recap Data replication scenarios are requiring a cloud component more often. SQL Data Sync comes as a “SQL replication light” alternative using Azure SQL Db. It’s not fit for all use cases, definitely analyze before moving forward. It enables some interesting scenarios in terms of geographic sync and distributed applications.

Questions?

Thanks!!