《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. 【Gson】互相转化

    Gson 是 Google 提供的用来在 Java 对象和 JSON 数据之间进行映射的 Java 类库.可以将一个 JSON 字符串转成一个 Java 对象,或者反过来. 对象转为字符串 Strin ...

  2. SQL Server中的Merge关键字

    本文转载地址:http://www.cnblogs.com/CareySon/archive/2012/03/07/2383690.html 简介 Merge关键字是一个神奇的DML关键字.它在SQL ...

  3. Java EE之servlet实现用户登录

    1.在连接数据库的JAVA类中添加查询功能: 在这之前有一个连接数据库的方法: Connection conn=null; PreparedStatement stat=null;           ...

  4. cocoapods导入shareSDK分享实现

    这个在官方文档没有说这两个库是必须导入的,但是不导入是会有错误的 pod 'ShareSDK3/ShareSDKConfigurationFile' pod 'ShareSDK3/ShareSDKEx ...

  5. javaweb学习笔记之servlet01

    一.Servlet概述 A servlet is a small Java program that runs within a Web server. Servlets receive and re ...

  6. mysql数据库表的自增主键号不规律,重新排列

    mysql数据库表的自增主键ID乱了,需要重新排序. 原理:删除原有的自增ID,重新建立新的自增ID. 1.删除原有主键: ALTER TABLE `table_name` DROP `id`; 2. ...

  7. hdu1532网络流

    (双倍经验题) 第二次写dinic模板,居然一遍写对了,而且短了不少O(∩_∩)O~ #include <cstdio> #define INF 2147483647 int n,m,an ...

  8. 浏览器的兼容问题 判断IE方法

    下面是一些判断ie的常用方法: <!-[if IE 6]> 此处是IE6才会执行的代码 <![endif]-> 还可以给他加个条件,比如判断IE6以下的浏览器: <!-[ ...

  9. jsp内置对象

      jsp servlet   对象名 类型 使用范围 request HttpServletRequest 请求 浏览器--->服务器 response HttpServletResponse ...

  10. 06.DOM操作应用高级

    获取表格tBodies.tHead.tFoot.rows获取行  cells获取td隔行变色 <!DOCTYPE HTML> <html> <head> <m ...