{"id":4986,"date":"2015-06-18T08:55:13","date_gmt":"2015-06-18T06:55:13","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/"},"modified":"2015-06-18T08:55:13","modified_gmt":"2015-06-18T06:55:13","slug":"sql-server-2016-ctp2-stretch-database-feature-part-2","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/","title":{"rendered":"SQL Server 2016 CTP2: Stretch database feature &#8211; Part 2"},"content":{"rendered":"<p>In my previous blog <a href=\"\/sql-server-2016-ctp2-stretch-database-feature-part-1\">SQL Server 2016 CTP2: Stretch database feature &#8211; Part 1<\/a>, I explained how to prepare your instance and your database to enable the Stretch feature for your table.<\/p>\n<p>Now I present you how to enable the feature for your tables!<\/p>\n<h3>Prerequisites<\/h3>\n<p>Enabling Stretch Database at the table level requires ALTER permissions on this table.<\/p>\n<p>&nbsp;<\/p>\n<h3>Limitations<\/h3>\n<p>For the moment in the SQL Server 2016 CTP2, there are several and important limitations, which drastically reduces the scope of use of Stretch Database feature.<\/p>\n<p>These limitations include Table Properties, Data Types, Column Properties, Column Types and Constraints and Indexes.<\/p>\n<p>You can obtain the detailed list with the following Microsoft article:<a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/dn935016.aspx\"> Requirements and limitations for Stretch Database<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3>Enable Stretch for a Table<\/h3>\n<p>First, I create a new table to avoid all limitations I explained above. Here is the SQL script:<\/p>\n<p><code>Use AdventureWorks2014;<br \/>\nCREATE TABLE Stretch_Table<br \/>\n(<br \/>\nColumn1 nvarchar(50),<br \/>\nColumn2 int,<br \/>\nColumn3 nchar(10)<br \/>\n)<\/code><\/p>\n<p>If you have followed all steps in my previous blog, you must be ready for enabling Stretch feature for your table!<\/p>\n<p>As all have been pre-configured, you just need to enable the feature for the targeted table.<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"enable_table_for_stretch.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png\"><img decoding=\"async\" title=\"enable_table_for_stretch.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png\" alt=\"enable_table_for_stretch.png\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>If we take a look at the SQL Database server in Azure, we must be able to visualize the &#8220;Stretch_Table&#8221; table:<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"SQL_azure_20150618-090340_1.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/SQL_azure_20150618-090340_1.png\"><img decoding=\"async\" title=\"SQL_azure_20150618-090340_1.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/SQL_azure_20150618-090340_1.png\" alt=\"SQL_azure_20150618-090340_1.png\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>You can notice that a new column named &#8220;batchID&#8221; has been included in the original table. Indeed, a non-null bigint is incremented each time a batch is performed to insert data in the migrated table. It means &#8220;batchID&#8221; value can be non-unique.<\/p>\n<p>Moreover, your table still remains visible on your on-premise instance and you can perform your normal work.<\/p>\n<p>&nbsp;<\/p>\n<h3>Next step<\/h3>\n<p>Performing backup of the database with Stretch feature enabled will not include the data stored in Azure. It means you also needs to perform a backup in Azure.<\/p>\n<p>I will detail this part in my next blog.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my previous blog SQL Server 2016 CTP2: Stretch database feature &#8211; Part 1, I explained how to prepare your instance and your database to enable the Stretch feature for your table. Now I present you how to enable the feature for your tables! Prerequisites Enabling Stretch Database at the table level requires ALTER permissions [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":4987,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[198],"tags":[49,566,35,213],"type_dbi":[],"class_list":["post-4986","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-management","tag-microsoft","tag-sql-server-2016","tag-storage","tag-windows-azure"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server 2016 CTP2: Stretch database feature - Part 2 - dbi Blog<\/title>\n<meta name=\"description\" content=\"Enabling Stretch feature for tables\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server 2016 CTP2: Stretch database feature - Part 2\" \/>\n<meta property=\"og:description\" content=\"Enabling Stretch feature for tables\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-18T06:55:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png\" \/>\n\t<meta property=\"og:image:width\" content=\"519\" \/>\n\t<meta property=\"og:image:height\" content=\"454\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nathan Courtine\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nathan Courtine\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/\"},\"author\":{\"name\":\"Nathan Courtine\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/38305b5ebdcdb4fb784fa31d760862d1\"},\"headline\":\"SQL Server 2016 CTP2: Stretch database feature &#8211; Part 2\",\"datePublished\":\"2015-06-18T06:55:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/\"},\"wordCount\":307,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png\",\"keywords\":[\"Microsoft\",\"SQL Server 2016\",\"Storage\",\"Windows Azure\"],\"articleSection\":[\"Database management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/\",\"name\":\"SQL Server 2016 CTP2: Stretch database feature - Part 2 - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png\",\"datePublished\":\"2015-06-18T06:55:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/38305b5ebdcdb4fb784fa31d760862d1\"},\"description\":\"Enabling Stretch feature for tables\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png\",\"width\":519,\"height\":454},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server 2016 CTP2: Stretch database feature &#8211; Part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/38305b5ebdcdb4fb784fa31d760862d1\",\"name\":\"Nathan Courtine\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/0fcc6c91bbc35c976c9d470585e48ae5d500680f1f55de5bbc5f8373b8ebb02c?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0fcc6c91bbc35c976c9d470585e48ae5d500680f1f55de5bbc5f8373b8ebb02c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0fcc6c91bbc35c976c9d470585e48ae5d500680f1f55de5bbc5f8373b8ebb02c?s=96&d=mm&r=g\",\"caption\":\"Nathan Courtine\"},\"description\":\"Nathan Courtine has more than four years of experience in Microsoft solutions. He is specialized in SQL Server installation, migration, performance analysis, best practices, etc. Moreover, he has a background in Oracle Java and .NET software and web development. Nathan Courtine is Microsoft Certified in Administering SQL Server 2012 Databases. Nathan Courtine holds an Engineer\u2019s Degree in Computer Science from the ENSISA (Ecole Nationale Sup\u00e9rieure d'Ing\u00e9nieurs Sud Alsace) in Mulhouse (F). His branch-related experience covers Public Sector, Automotive, IT, Financial Services \/ Banking, etc.\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/nathan-courtine\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server 2016 CTP2: Stretch database feature - Part 2 - dbi Blog","description":"Enabling Stretch feature for tables","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server 2016 CTP2: Stretch database feature - Part 2","og_description":"Enabling Stretch feature for tables","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/","og_site_name":"dbi Blog","article_published_time":"2015-06-18T06:55:13+00:00","og_image":[{"width":519,"height":454,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png","type":"image\/png"}],"author":"Nathan Courtine","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Nathan Courtine","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/"},"author":{"name":"Nathan Courtine","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/38305b5ebdcdb4fb784fa31d760862d1"},"headline":"SQL Server 2016 CTP2: Stretch database feature &#8211; Part 2","datePublished":"2015-06-18T06:55:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/"},"wordCount":307,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png","keywords":["Microsoft","SQL Server 2016","Storage","Windows Azure"],"articleSection":["Database management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/","name":"SQL Server 2016 CTP2: Stretch database feature - Part 2 - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png","datePublished":"2015-06-18T06:55:13+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/38305b5ebdcdb4fb784fa31d760862d1"},"description":"Enabling Stretch feature for tables","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/enable_table_for_stretch.png","width":519,"height":454},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-ctp2-stretch-database-feature-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server 2016 CTP2: Stretch database feature &#8211; Part 2"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/38305b5ebdcdb4fb784fa31d760862d1","name":"Nathan Courtine","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0fcc6c91bbc35c976c9d470585e48ae5d500680f1f55de5bbc5f8373b8ebb02c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0fcc6c91bbc35c976c9d470585e48ae5d500680f1f55de5bbc5f8373b8ebb02c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0fcc6c91bbc35c976c9d470585e48ae5d500680f1f55de5bbc5f8373b8ebb02c?s=96&d=mm&r=g","caption":"Nathan Courtine"},"description":"Nathan Courtine has more than four years of experience in Microsoft solutions. He is specialized in SQL Server installation, migration, performance analysis, best practices, etc. Moreover, he has a background in Oracle Java and .NET software and web development. Nathan Courtine is Microsoft Certified in Administering SQL Server 2012 Databases. Nathan Courtine holds an Engineer\u2019s Degree in Computer Science from the ENSISA (Ecole Nationale Sup\u00e9rieure d'Ing\u00e9nieurs Sud Alsace) in Mulhouse (F). His branch-related experience covers Public Sector, Automotive, IT, Financial Services \/ Banking, etc.","url":"https:\/\/www.dbi-services.com\/blog\/author\/nathan-courtine\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/4986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=4986"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/4986\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/4987"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=4986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=4986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=4986"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=4986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}