《Windows Azure Platform 系列文章目录

   Azure SQL Database (19) Stretch Database 概览

     Azure SQL Database (20) 使用SQL Server 2016 Upgrade Advisor

     Azure SQL Database (21) 将整张表都迁移到Azure Stretch Database里

     Azure SQL Database (22) 迁移部分数据到Azure Stretch Database 

  Stretch Databse使用场景:

  笔者有一个快消品用户,每天产生几百万笔订单数据。这些订单数据保存在一个运算能力非常强大的数据中心物理机里。

  对于这些订单数据来说,分为两类:

  1.热数据:最近1个月产生的订单数据。

  对于热数据来说,企业需要对这些数据进行统计分析,方便进行查询。

  2.冷数据:过去1-3年产生的订单数据。

  在传统IDC运维中,经常会对冷数据进行备份归档,比如采用磁带库等。

  但是归档的数据其实是离线状态的,也就是说,如果我们需要对这些冷数据进行查询的时候,还需要从磁带库中将数据恢复到数据库里,再进行查询。

  在这种情况下,我们就可以使用Azure SQL Stretch Database功能,将数据表中的某些数据行(或者所有数据行),迁移到Azure SQL Database里

  

  采用Azure SQL Database Stretch Database的优势有以下几点:

  1.降低冷数据的查询成本

  Stretch Databse支持把传统SQL Server数据库的温数据和冷数据,迁移到云端数据库中。

  不同于传统的磁带库备份,你的数据库备份内容都是一直在线的,可以对云上的冷数据执行读取操作。

  相比传统IDC保存这些冷数据来说,使用云上的Stretch Database成本更低。

  2.无需修改查询语句和应用

  使用Stretch Database的时候,不需要修改查询语句和应用。

  当我们执行查询语句的时候,本地的SQL Server自己会决定是在本地执行查询语句,还是在云端执行查询语句。用户无需了解数据是保存在本地和云端。

    

  3.降低本地数据运维成本

  因为大部分的温数据和冷数据都保存在云端,我们在本地数据中心,不需要购买大量的存储以保留这些历史数据。

  4.保证数据安全

  本地SQL Server支持的安全特性,比如Row Level Security (RLS)和其他安全安全特性,在云端Stretch Database也同时支持。

  在以下场景中,我们需要使用Azure Stretch Database:

  (1)需要对历史数据保存很长一段时间

  (2)有时需要对历史数据进行查询

  (3)前端应用需要访问这些历史数据,且前端应用不会进行重构

  (4)减少购买存储的费用

  

  哪些数据库支持Azure Stretch Database?

  我们建议用户使用SQL Server 2016数据库,来启动Stretch功能。

  另外,我们建议下载SQL Server 2016 Upgrade Advisor,来定义哪些数据表可以迁移到Stretch Database。

  

   

  Stretch Database限制:

  https://azure.microsoft.com/en-us/documentation/articles/sql-server-stretch-database-limitations/

  约束:

  需要迁移的数据,如果包含Unique约束和Primary Key约束,则这些约束不会被启用

  Uniqueness is not enforced for UNIQUE constraints and PRIMARY KEY constraints in the Azure table that contains the migrated data.

  DML操作:

  1.可以迁移到云端(但未迁移)的SQL数据(表Table或者试图View),或者已经迁移到Stretch Database云端的SQL数据,无法执行UPDATE和DELETE操作。

  2.不可以在linked server上对已经stretch的表执行插入操作

  You can't INSERT rows into a Stretch-enabled table on a linked server.

  索引:

  1.无法对已经Stretch的表创建索引

  2.对本地SQL Server的过滤操作,不会传播到Azure SQL Stretch Table

  Filters on SQL Server indexes are not propagated to the remote table

  对Table的限制:

  1.Table不能超过1023列或多于998个索引

  2.不能包含FileStream数据

  3.不支持Change Tracking或者Change Data Capture

  4.内存优化的表

  不支持的数据类型:

  1.text, ntext and image

  2.timestamp

  3.sql_variant

  4.XML

  5.CLR data types including geometry, geography, hierarchyid, and CLR user-defined types

  不支持的列的类型:

  1.Default constraints and check constraints

  2.外键表所在的主键表

  Foreign key constraints that reference the table. In a parent-child relationship (for example, Order and Order_Detail), you can enable Stretch for the child table (Order_Detail) but not for the parent table (Order).

  不支持的索引:

  • Full text indexes

  • XML indexes

  • Spatial indexes

  • Indexed views that reference the table

  

  

  Stretch Database 性能指标

  Stretch Database提供不同级别的性能指标,命名为DSU (Database Stretch Unit)。一般来说,DSU越高,则Stretch性能越好。

  Stretch Database已经正式发布。即日起至2016年9月1日,用户可享受预览版折扣价 ( 即按标准价格的 50% 计费 )。9 月 1 日起将恢复按标准价格计费。

性能级别DSU 预览版折扣价格(人民币) 标准价格(人民币)
100 11.26 / 小时 22.51 / 小时
200 22.52 / 小时 45.02 / 小时
300 33.78 / 小时 67.53 / 小时
400 45.04 / 小时 90.04 / 小时
500 56.3 / 小时 112.55 / 小时
600 67.56 / 小时 135.06 / 小时
1000 112.6 / 小时 225.1 / 小时
1200 135.12 / 小时 270.12 / 小时
1500 168.9 / 小时 337.65 / 小时
2000 337.8 / 小时 450.2 / 小时
3000   675.3 / 小时
6000   1350.6 / 小时

  除了不同的DSU对应不同的价格以外,Stretch Database还收取数据库的存储容量费用:

  数据存储收费基准为¥1.441/GB/小时。数据存储包括 Stretch Database 和备份快照的大小。所有 Stretch Database 都有 7 天的增量备份快照。

  注意:存储事务不收费。您只需为存储的数据支付费用,无需支付存储事务的费用。

  

  参考资料:https://msdn.microsoft.com/en-us/library/dn935011.aspx

  

Azure SQL Database (19) Stretch Database 概览的更多相关文章

  1. Azure SQL Database (21) 将整张表都迁移到Azure Stretch Database里

    <Windows Azure Platform 系列文章目录>  Azure SQL Database (19) Stretch Database 概览      Azure SQL Da ...

  2. Azure SQL Database (22) 迁移部分数据到Azure Stretch Database

    <Windows Azure Platform 系列文章目录>  Azure SQL Database (19) Stretch Database 概览      Azure SQL Da ...

  3. Azure SQL Database (20) 使用SQL Server 2016 Upgrade Advisor

    <Windows Azure Platform 系列文章目录>  Azure SQL Database (19) Stretch Database 概览      Azure SQL Da ...

  4. Azure SQL Database (26) 使用Query Store对Azure SQL Database监控

    <Windows Azure Platform 系列文章目录> 我们在使用Azure SQL Database的时候,需要对数据库的性能进行监控,这时候就可以有两种方法: 1.第一种方法, ...

  5. [Windows Azure] Getting Started with Windows Azure SQL Database

    In this tutorial you will learn the fundamentals of Windows Azure SQL Database administration using ...

  6. [转]Azure 表存储和 Windows Azure SQL Database - 比较与对照

    本文转自:https://msdn.microsoft.com/library/azure/jj553018 更新时间: 2014年10月 作者:Valery Mizonov 和 Seth Manhe ...

  7. 通过本地Agent监控Azure sql database

    背景: 虽然Azure sql database有DMVs可以查看DTU等使用情况,但记录有时间限制,不会一直保留.为了更好监控Azure_sql_database上各个库的DTU使用情况.数据库磁盘 ...

  8. Azure SQL Database Active Geo-Replication简介

    笔者在<迁移SQL Server 数据库到 Azure SQL 实战>一文中,介绍了如何把一个本地版的 SQL Server 数据库迁移到 Azure SQL Database.迁移虽然顺 ...

  9. How to Use Lucene.NET with Windows Azure SQL Database

    http://social.technet.microsoft.com/wiki/contents/articles/2367.how-to-use-lucene-net-with-windows-a ...

随机推荐

  1. eclipse怎么打开工程文件的所在位置

    首先得有eclipse 一.在eclipse的菜单栏中点击 Run -->External Tools -->External Tools Configurations..       如 ...

  2. Python 学习第十七天 jQuery

    一,jQuery 知识详解 利用jquery 查找元素,操作元素 1,jquery 引入 <!DOCTYPE html> <html lang="en"> ...

  3. UVA 12300 Smallest Regular Polygon(正多边形)

    题意:给出两点,求经过这两点的正n边形的最小面积 题解:这两点一定是最长的弦,我们设正多边形中点c,找到c到每个点的距离(都相同) 我们知道那个等腰三角形的底与每个角度就使用余弦定理 #include ...

  4. 光标失去焦点事件 onblur

    onblur="judgeLandCode()" function judgeLandCode(){ $.ajax({ type:'post', dataType:'json', ...

  5. 斯考特·杨(Scott Young)快速学习方法

    上午在网上看到了斯考特·杨(Scott Young)的快速学习方法,感觉很受鼓舞. 现在已经读研究生了,可是发现自己自从上大学以来到现在,发现自己的学习方法有很大的问题. 我是个特别喜欢读书的人,在大 ...

  6. linux学习第一阶段

    最近比较盲目的生活,翻来覆去,总归是为了自己,还是静下心来看看东西吧.好好学习.天天向上

  7. Linux Shell 截取字符串

    Linux Shell 截取字符串 shell中截取字符串的方法很多 ${var#*/} ${var##*/} ${var%/*} ${var%%/*} ${var:start:len} ${var: ...

  8. hbase

    http://www.yiibai.com/hbase/hbase_installation.html http://www.linuxidc.com/Linux/2015-03/114669.htm ...

  9. html 设置宽度100% 块状元素往下调解决方法

    css在设置body的宽度为100%充满整个屏幕时,当浏览器缩小时块状元素会被挤压下去 解决方案非常简单,给body设置一个最小宽度 min-width:960px; 此时即使浏览器缩小,在960像素 ...

  10. webform 分页

    界面: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx ...