[Windows Azure] Getting Started with Windows Azure SQL Data Sync
Getting Started with Windows Azure SQL Data Sync
In this tutorial, you learn the fundamentals of Windows Azure SQL Data Sync using the Windows Azure (Preview) portal.
This tutorial assumes minimal prior experience with SQL Server and Windows Azure SQL Database. In this tutorial, you create a hybrid (SQL Server and SQL Database instances) sync group fully configured and synchronizing on the schedule you set.
Table of Contents
- Step 1: Connect to the Windows Azure SQL Database
- Step 2: Add a Client Agent ()
- Step 3: Register a SQL Server database with the Client Agent
- Step 4: Create a Sync Group
- Step 5: Define the data to sync
- Step 6: Configure your sync group
Step 1: Connect to the Windows Azure SQL Database
Sign in to the Management Portal.
Click SQL DATABASES in the left pane.
Click SYNC at the bottom of the page. When you click SYNC, a list appears showing the things you can add – New Sync Group and New Sync Agent.
To launch the New SQL Data Sync Agent wizard, click New Sync Agent.
If you haven't added an agent before, click download it here.
Step 2: Add a Client Agent
This step is required only if you are going to have an on-premises SQL Server database included in your sync group. You can skip to Step 4: Create a sync group if your sync group has only SQL Database instances.
Step 2a: Install the required software
Be sure that you have the following installed on the computer you install the Client Agent.
.NET Framework 4.0
You can install .NET Framework 4.0 from here.
Microsoft SQL Server 2008 R2 SP1 System CLR Types (x86)
You can install the Microsoft SQL Server 2008 R2 SP1 System CLR Types (x86) from here
Microsoft SQL Server 2008 R2 SP1 Shared Management Objects (x86)
You can install the Microsoft SQL Server 2008 R2 SP1 Shared Management Objects (x86) from here
Step 2b: Install a new Client Agent
Follow the instruction at Install a Client Agent (SQL Data Sync) to install the agent.
Step 2c: Finish the New SQL Data Sync Agent wizard
- Return to the New SQL Data Sync Agent wizard.
- Give the agent a meaningful name.
- From the dropdown, select the REGION (data center) to host this agent.
- From the dropdown, select the SUBSCRIPTION to host this agent.
- Click the right-arrow.
Step 3: Register a SQL Server database with the Client Agent
After the Client Agent is installed, register every on-premises SQL Server database that you intend to include in a sync group with the agent. To register a database with the agent, follow the instructions at Register a SQL Server Database with a Client Agent.
Step 4: Create a sync group
Step 4a: Start the New Sync Group wizard
- Return to the Management Portal.
- Click SQL DATABASES.
- Click ADD SYNC at the bottom of the page then select New Sync Group from the drawer.
Step 4b: Enter the basic settings
- Enter a meaningful name for the sync group.
- From the dropdown, select the REGION (Data Center) to host this sync group.
- Click the right-arrow.
Step 4c: Define the sync hub
- From the dropdown, select the SQL Database instance to serve as the sync group hub.
- Enter the credentials for this SQL Database instance – HUB USERNAME and HUB PASSWORD.
- Wait for SQL Data Sync to confirm the USERNAME and PASSWORD. A green check mark appears to the right of the PASSWORD when the credentials are confirmed.
From the dropdown, select the CONFLICT RESOLUTION policy.
Hub Wins – any change written to the hub database is written to the reference databases, overwriting changes in the same reference database record. Functionally, this means that the first change written to the hub is propagated to the other databases.
Client Wins – changes written to the hub are overwritten by changes in reference databases. Functionally, this means that the last change written to the hub is the one kept and propagated to the other databases.
Click the right-arrow.
Step 4d: Add a reference database
Repeat this step for each additional database you want to add to the sync group.
From the dropdown, select the database to add.
Databases in the dropdown include both SQL Server databases that have been registered with the agent and SQL Database instances.
- Enter credentials for this database – USERNAME and PASSWORD.
From the dropdown, select the SYNC DIRECTION for this database.
Bi-directional – changes in the reference database are written to the hub database, and changes to the hub database are written to the reference database.
Sync from the Hub - The database receives updates from the Hub. It does not send changes to the Hub.
Sync to the Hub - The database sends updates to the Hub. Changes in the Hub are not written to this database.
To finish creating the sync group, click the check mark in the lower right of the wizard. Wait for the SQL Data Sync to confirm the credentials. A green check indicates that the credentials are confirmed.
Click the check mark a second time. This returns you to the SYNC page under SQL Databases. This sync group is now listed with your other sync groups and agents.
Step 5: Define the data to sync
Windows Azure SQL Data Sync allows you to select tables and columns to synchronize. If you also want to filter a column so that only rows with specific values (such as, Age>=65) are synchronized, use the SQL Data Sync portal at Windows Azure and the documentation at Select the Tables, Columns, and Rows to Synchronize to define the data to sync.
- Return to the Management Portal.
- Click SQL DATABASES.
- Click the SYNC tab.
- Click the name of this sync group.
- Click the SYNC RULES tab.
- Select the database you want to provide the sync group schema.
- Click the right-arrow.
- Click REFRESH SCHEMA.
- For each table in the database, select the columns to include in the synchronizations.
- Columns with unsupported data types cannot be selected.
- If no columns in a table are selected, the table is not included in the sync group.
- To select/unselect all the tables, click SELECT at the bottom of the screen.
- Click SAVE, then wait for the sync group to finish provisioning.
- To return to the Data Sync landing page, click the back-arrow in the upper left of the screen (above the sync group’s name).
Step 6: Configure your sync group
You can always synchronize a sync group by clicking SYNC at the bottom of the Data Sync landing page. If you want a sync group to synchronize on a schedule, you configure the sync group.
- Return to the Management Portal.
- Click SQL DATABASES.
- Click the SYNC tab.
- Click the name of this sync group.
- Click the CONFIGURE tab.
- AUTOMATIC SYNC
- To configure the sync group to sync on a set frequency, click ON. You can still sync on demand by clicking SYNC.
- Click OFF to configure the sync group to sync only when you click SYNC.
- SYNC FREQUENCY
- If AUTOMATIC SYNC is ON, set the synchronization frequency. The frequency must be between 5 Minutes and 1 Month.
- Click SAVE.
Congratulations. You have created a sync group that includes both a SQL Database instance and a SQL Server database.
Next Steps
For additional information on SQL Database and SQL Data Sync see:
- [Sign up for the Premium Offer for SQL Database] (../sign-up-for-sql-database-premium/)
- SQL Data Sync (WA Portal)
- Getting Started with Windows Azure SQL Database
- SQL Server Database Lifecycle
[Windows Azure] Getting Started with Windows Azure SQL Data Sync的更多相关文章
- [Windows Azure] Getting Started with Windows Azure SQL Database
In this tutorial you will learn the fundamentals of Windows Azure SQL Database administration using ...
- [AWS vs Azure] 云计算里AWS和Azure的探究(1)
转自:http://www.cnblogs.com/hotcan/archive/2013/01/31/2886794.html 云计算里AWS和Azure的探究(1) 全球领先的云的计算平台主要有两 ...
- [Windows Azure] How to Create and Configure SQL Database
How to Create and Configure SQL Database In this topic, you'll step through logical server creation ...
- [Windows Azure] Development Considerations in Windows Azure SQL Database
Development Considerations in Windows Azure SQL Database 3 out of 5 rated this helpful - Rate this t ...
- [转]Azure 表存储和 Windows Azure SQL Database - 比较与对照
本文转自:https://msdn.microsoft.com/library/azure/jj553018 更新时间: 2014年10月 作者:Valery Mizonov 和 Seth Manhe ...
- Windows Azure HandBook (3) 浅谈Azure安全性
<Windows Azure Platform 系列文章目录> 2015年3月5日-6日,参加了上海的Azure University活动.作为桌长与微软合作伙伴交流了Azure相关的技术 ...
- Windows Azure Virtual Network (10) 使用Azure Access Control List(ACL)设置客户端访问权限
<Windows Azure Platform 系列文章目录> 本文介绍的是国内由世纪互联运维的China Azure. 我们在创建完Windows Azure Virtual Machi ...
- 使用 Azure PowerShell 管理 Azure 虚拟网络和 Windows 虚拟机
Azure 虚拟机使用 Azure 网络进行内部和外部网络通信. 本教程介绍了如何在虚拟网络中创建多个虚拟机 (VM),以及如何在虚拟机之间配置网络连接. 你将学习如何执行以下操作: 创建虚拟网络 创 ...
- Windows Azure Storage (19) 再谈Azure Block Blob和Page Blob
<Windows Azure Platform 系列文章目录> 请读者在参考本文之前,预习相关背景知识:Windows Azure Storage (1) Windows Azure St ...
随机推荐
- pycharm安装提示 module 'pip' has no attribute 'main'
问题描述: 环境: windows10 pycharm2016.2.3 //在最先版本的pycharm就没问题,可能还需要升级pip版本 python3.6 pip安装模块,提示 Attribute ...
- 高密度WIFI部署要点
1. 划分AP组,分组带宽控制 根据区域的人数密集程度划分不同的AP组,并进行优化策略调整,分组分权限进行带宽控制,以确保单用户的2.4G带宽不低于1M,5G用户不低于2M2. 相邻AP错开信道 超高 ...
- Light OJ 1406 Assassin`s Creed 状态压缩DP+强连通缩点+最小路径覆盖
题目来源:Light OJ 1406 Assassin`s Creed 题意:有向图 派出最少的人经过全部的城市 而且每一个人不能走别人走过的地方 思路:最少的的人能够走全然图 明显是最小路径覆盖问题 ...
- 关于Bigdecimal比较大小
java中对bigdimical比较大小一般用的是bigdemical的compareTo方法: int a = bigdemical.compareTo(bigdemical2);a = 1,表示b ...
- 如果没有 Android 世界会是什么样子?
2005年谷歌从安迪·鲁宾(Andy Rubin)手中收购Android系统,起初安迪·鲁宾(Andy Rubin)只是想为数码相机开发出一个更为先进的系统,所以有了 Android.但是智能手机行业 ...
- mysql单机多实例
在数据库服务器上,可以架构多个Mysql服务器,进行单机多实例的读写分离: 可以通过mysqld_multi来进行多实例的管理,mysqld_multi是用perl写的脚本,原理是通过mysql_ad ...
- Eclipse的数据库插件
今天上午升级 Eclipse 到 3.1.2 版本,完了之后就想找个数据库的插件,但花了近 2 个小时后得出的结论是:还没有支持 3.1.x 版本的数据库插件,郁闷的不行.看看 eclipse3.1. ...
- [aaronyang原创] Mssql 一张表3列的sql面试题,看你sql学的怎么样
文章已经迁移到:http://www.ayjs.net/post/99.html 文章已经迁移到:http://www.ayjs.net/post/99.html 文章已经迁移到:http://www ...
- android 蓝牙编程重点---如何发送和接收16进制数据
最近的android蓝牙开发项目也逐渐接近尾声,基本的功能都已经完成,只剩下界面的设计.现在真的是舒了一口气! 作为编程学习经验只有1年的菜鸟,这是我独自完成的商业性产品,而且还是涉及到与单片机蓝牙模 ...
- SQL Server 阻止了对组件 'Agent XPs' 的 过程 'dbo.sp_set_sqlagent_properties' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。
Sqlserver 2008 在配置分发向导的时候报了如下错误: 使用 Agent XPs 选项可以启用此服务器上的 SQL Server 代理扩展存储过程.如果禁用此选项,则 SQL Server ...