<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Félix Martínez Retama Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/felixmar/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/felixmar/feed.xml</link>
    <description>Simple things about SQL and .NET that maybe you didn´t know.</description>
    <lastBuildDate>Sat, 11 Apr 2015 12:39:54 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Data Synchronization using SQL Azure Data Sync (Part II)</title>
      <link>https://docs.microsoft.com/archive/blogs/felixmar/data-synchronization-using-sql-azure-data-sync-part-ii</link>
      <pubDate>Tue, 26 Jun 2012 21:23:40 GMT</pubDate>
      <dc:creator><![CDATA[Félix Martínez Retama]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/felixmar/2012/06/26/data-synchronization-using-sql-azure-data-sync-part-ii/</guid>
      <description><![CDATA[To begin, you have to access the Windows Azure portal. Go to www.windowsazure.com using your...]]></description>
      <content:encoded><![CDATA[<p>To begin, you have to access the Windows Azure portal. Go to <a href="https://www.windowsazure.com/">www.windowsazure.com</a> using your account. You have to own a subscription in order to access to the portal.</p>  <p align="justify">Select subscription’s name in the Azure Console, select database and click on the <b>Create</b> button.</p>  <p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0677.image_thumb2_6BF7701B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0677.image_5F00_thumb2_5F00_6BF7701B.png"><img title="image_thumb[2]" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image_thumb[2]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6545.image_thumb2_thumb_2994320B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6545.image_5F00_thumb2_5F00_thumb_5F00_2994320B.png" width="322" height="570" /></a></p>  <p>You will have to select the region where you want to host the new server:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1106.image_55A1092F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1106.image_5F00_55A1092F.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5481.image_thumb_4B20350F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5481.image_5F00_thumb_5F00_4B20350F.png" width="338" height="288" /></a></p>  <p>Choose your region and click <b>Next</b>.</p>  <p>In the next screen, you will have to create a login in order to administer the server. You must use a strong password.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6557.image_74D38A35.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6557.image_5F00_74D38A35.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6560.image_thumb_6B2B1BFF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6560.image_5F00_thumb_5F00_6B2B1BFF.png" width="338" height="287" /></a></p>  <p>Remember that SQL Azure does not support Windows Authentication. Next, you will have to create a firewall rule to enable access to this server.</p>  <p>In the <b>Create Server</b> window click on <b>Add</b> button</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7853.image_0850C40A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7853.image_5F00_0850C40A.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2337.image_thumb_5A16C84F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2337.image_5F00_thumb_5F00_5A16C84F.png" width="339" height="290" /></a></p>  <p>In the <b>Add Firewall Rule</b> window, add a name for this rule and enter an IP range authorized to access the server.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0216.image_47321ED8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0216.image_5F00_47321ED8.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3252.image_thumb_4C345C87.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3252.image_5F00_thumb_5F00_4C345C87.png" width="339" height="195" /></a></p>  <p>Finally, click on <b>OK</b> button. Now, you will be able to access the portal, to do this, select the server in the administration console and click on <b>Manage</b>.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6557.image_70794109.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6557.image_5F00_70794109.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4403.image_thumb_1DCAB10D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4403.image_5F00_thumb_5F00_1DCAB10D.png" width="342" height="265" /></a></p>  <p>The SQL Azure Access Window is displayed. Enter the login information (user and password). Since we have not created a database yet, you can omit this field.</p>  <p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0525.image_184C1A9C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0525.image_5F00_184C1A9C.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6813.image_thumb_2AF0EE86.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6813.image_5F00_thumb_5F00_2AF0EE86.png" width="398" height="278" /></a></p>  <p>Click on <b>Log On</b> to access the portal. Now you are inside the administration portal. Click the <b>Create Database</b> button as shown in the following illustration.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7571.image_528744E3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7571.image_5F00_528744E3.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3348.image_thumb_0A598907.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3348.image_5F00_thumb_5F00_0A598907.png" width="443" height="95" /></a></p>  <p>Enter the database name in the Name field and select the database size. The available sizes depend on your subscription type. You can type a different collation for the database if you want at the bottom of the page. Click Submit to create the database.</p>  <p>After the database is created, you will see its properties including the fully qualified name on the upper left corner.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1207.image_0914F028.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1207.image_5F00_0914F028.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4834.image_thumb_54941DDF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4834.image_5F00_thumb_5F00_54941DDF.png" width="452" height="215" /></a></p>  <p>Although you can administer the database from here, it’s easier to use SQL Server Management Studio. All you have to do is click on <b>Connect</b> button and enter the fully qualified name in the server box and the login information:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5417.image_71B9C5E9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5417.image_5F00_71B9C5E9.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3386.image_thumb_658825F5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3386.image_5F00_thumb_5F00_658825F5.png" width="436" height="287" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8551.image_2B1C8A47.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8551.image_5F00_2B1C8A47.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4452.image_thumb_0C35F09C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4452.image_5F00_thumb_5F00_0C35F09C.png" width="387" height="296" /></a></p>  <p>Once connected, you will see your SQL Azure database in the object explorer:</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8475.image_09E94213.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8475.image_5F00_09E94213.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8078.image_thumb_42EFF948.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8078.image_5F00_thumb_5F00_42EFF948.png" width="415" height="394" /></a></p>  <p>An interesting point is that you can implement data synchronization using any Edition of SQL Server, including Express Edition. In fact I used this version in my own tests.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5344.image_1F92DED6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5344.image_5F00_1F92DED6.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4774.image_thumb_01C12E4A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4774.image_5F00_thumb_5F00_01C12E4A.png" width="427" height="319" /></a></p>  <h2><b>Configuring SQL Azure Data Sync</b><b></b></h2>  <p>To configure SQL Azure Data Sync you have to access the Windows Azure Portal and select Data Sync option and click on Provision button.</p>  <p>Configuring Data Sync requires working on the Azure portal as well as in the local service user interface. You will need an Agent Key to configure the local service; the Agent Key is obtained from the SQL Azure Portal.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3704.image_0FEF816D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3704.image_5F00_0FEF816D.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0564.image_thumb_2579943D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0564.image_5F00_thumb_5F00_2579943D.png" width="396" height="446" /></a></p>  <p>Accept the Terms of Use.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2630.image_14A1C3C2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2630.image_5F00_14A1C3C2.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1565.image_thumb_0F232D51.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1565.image_5F00_thumb_5F00_0F232D51.png" width="378" height="327" /></a></p>  <p>Select your subscription:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7433.image_3072AD20.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7433.image_5F00_3072AD20.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1588.image_thumb_5FE11BEC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1588.image_5F00_thumb_5F00_5FE11BEC.png" width="371" height="195" /></a></p>  <p>Click on <b>Next</b> and select the region where you want to provision the Data Sync Service:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4214.image_75E7877E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4214.image_5F00_75E7877E.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8400.image_thumb_4885F1AE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8400.image_5F00_thumb_5F00_4885F1AE.png" width="372" height="314" /></a></p>  <p>Click on <b>Finish</b> and start configuring the service.</p>  <p>To start configuring the service, you have to follow the next steps:</p>  <p>1. - Enter a name for the <b>Sync Group</b> and click on the next arrow (<b>&gt;</b>)</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3730.image_2F5A71A9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3730.image_5F00_2F5A71A9.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3125.image_thumb_62A60F38.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3125.image_5F00_thumb_5F00_62A60F38.png" width="392" height="258" /></a></p>  <p>2. – In the Step 2 you will have to add a local database:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2158.image_75B71617.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2158.image_5F00_75B71617.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1565.image_thumb_1C4556CB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1565.image_5F00_thumb_5F00_1C4556CB.png" width="395" height="297" /></a></p>  <p>The window “<b>Add Database to Sync Group</b>” will appear:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0083.image_6AA9C368.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0083.image_5F00_6AA9C368.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0005.image_thumb_5E0BF07F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0005.image_5F00_thumb_5F00_5E0BF07F.png" width="361" height="290" /></a></p>  <p>3. – Choose <b>Add new SQL Server database to the sync group</b> and select the synchronization direction. <b>Sync to the Hub</b> lets you synchronize information from the On-Premise database to the SQL Azure database while <b>Sync from the Hub</b> is the opposite. If you want to sync from either side select <b>Bi-Directional</b>.</p>  <p>Click <b>Next</b>. Now you will have to configure the data sync Agent:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6036.image_70B0C469.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6036.image_5F00_70B0C469.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7838.image_thumb_75A2DC4B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7838.image_5F00_thumb_5F00_75A2DC4B.png" width="374" height="286" /></a></p>  <p>4. -Since this is the first time we are configuring the Agent, it is necessary to click on <b>Install a new Agent</b>. In case you have already installed and configured the Agent, you can select the option <b>Through an existing Agent</b>. Click <b>Next</b> to continue. You will be able to download the agent from the Internet in the next page:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8103.image_08B3E32B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8103.image_5F00_08B3E32B.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2234.image_thumb_2277F38D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2234.image_5F00_thumb_5F00_2277F38D.png" width="391" height="354" /></a></p>  <p>5. – Click on <b>Download</b> and proceed to install the agent. The setup program is quiet straightforward and requires Microsoft.NET Framework 4.0; the setup programs will give you a link to download .NET Framework 4 in case you do not have it. The minimum OS version required is Windows Vista; if you have Windows XP you won’t be able to install it.</p>  <p>Once installed, you will need to specify a name for the Agent. Enter the name you wish to assign in the <b>Agent Name</b> textbox:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6036.image_4433A651.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6036.image_5F00_4433A651.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5367.image_thumb_4F4D0ACE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5367.image_5F00_thumb_5F00_4F4D0ACE.png" width="394" height="415" /></a></p>  <p>6. – Now you will need to an Agent Key which is required in order to configure the Agent. Click on <b>Generate Agent Key</b> to generate a new Key. The button will be enabled once you have installed the Agent. </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7411.image_613902C1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7411.image_5F00_613902C1.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6837.image_thumb_1FFAD39D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6837.image_5F00_thumb_5F00_1FFAD39D.png" width="396" height="413" /></a></p>  <p>7.- Click the <b>Copy</b> Button to copy the Key to the clipboard</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0552.image_284E8327.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0552.image_5F00_284E8327.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2630.image_thumb_06EEDD8B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2630.image_5F00_thumb_5F00_06EEDD8B.png" width="401" height="188" /></a></p>  <p>In order to finish the SQL Azure Data Sync configuration, it is necessary to configure the Sync Agent first. I´ll switch to SQL Azure Sync Agent configuration.</p>  <h3>Configuring SQL Azure Data SYnc Agent</h3>  <p>The First time you start the Agent, the only available option is <b>Submit Agent Key Configuration</b>.</p>  <p>a) - Click on <b>Submit Agent Key Configuration</b> button to enter the agent Key. </p>  <p>If you still have the Key in the clipboard, you can paste it in the <b>Agent Key</b> textbox.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5355.image_6A2542A8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5355.image_5F00_6A2542A8.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7827.image_thumb_163219CD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7827.image_5F00_thumb_5F00_163219CD.png" width="391" height="307" /></a></p>  <p>&#160;</p>  <p>a) Click <b>OK</b>. If the key is correct, all the buttons in the toolbar will be enabled.</p>  <p>Now you will need to register your local server as well as the database you want to synchronize.</p>  <p>b) Click the <b>Register</b> button.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8176.image_118BE946.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8176.image_5F00_118BE946.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1033.image_thumb_3E90B047.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1033.image_5F00_thumb_5F00_3E90B047.png" width="392" height="306" /></a></p>  <p>The SQL Azure Data Sync Agent will connect to your local SQL Server in order to register your database, this connection can use SQL Authentication or Windows Authentication, and you can choose whatever you want. </p>  <p>a) Enter the server name as well as the database name and click the <b>Test Connection</b> button.</p>  <p>If everything is fine you will see a confirmation message:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4338.image_31F2DD5E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4338.image_5F00_31F2DD5E.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6557.image_thumb_1E25A830.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6557.image_5F00_thumb_5F00_1E25A830.png" width="377" height="256" /></a></p>  <p>The registration information will be saved in the Data Sync Agent window:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7127.image_6AD948F9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7127.image_5F00_6AD948F9.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8688.image_thumb_43FB0CEC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8688.image_5F00_thumb_5F00_43FB0CEC.png" width="368" height="289" /></a></p>  <p>This concludes the SQL Data Sync Agent configuration process. Now let´s switch to SQL Azure portal to continue with SQL Azure Data Sync process.</p>  <p>&#160;</p>  <h3>Database Sync Group (Continued…)</h3>  <p>Now switch to the <b>Add Database to Sync Group</b> window and click <b>Next</b>.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6136.clip_image002_11D3BCA2.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6136.clip_5F00_image002_5F00_11D3BCA2.jpg"><img title="clip_image002" style="display: inline; background-image: none;" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6136.clip_image002_thumb_096FE74B.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6136.clip_5F00_image002_5F00_thumb_5F00_096FE74B.jpg" width="387" height="181" /></a></p>  <p>8. – In Step 2 click the <b>Get Database List</b> button to display the database you just registered.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6433.image_4F147169.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6433.image_5F00_4F147169.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1643.image_thumb_40C5D2AC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1643.image_5F00_thumb_5F00_40C5D2AC.png" width="388" height="382" /></a></p>  <p>9. - Finally, select the database, in this case SalesOnPremise which is the local database:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0160.image_094F9BB1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0160.image_5F00_094F9BB1.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8267.image_thumb_1469002E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8267.image_5F00_thumb_5F00_1469002E.png" width="384" height="378" /></a></p>  <p>10. - Click <b>Finish</b>.</p>  <p><b>Add the SQL Azure Database</b></p>  <p>Now you we have to add the SQL Azure database that will be synchronized with the On-Premise database. This is done in the <b>CLOUD</b> section in the SQL Azure Portal.</p>  <p>1.- Click on the icon with the leyend “<i>Click to add a Windows Azure SQL database as the Sync Hub”</i></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4861.image_01A3E0AA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4861.image_5F00_01A3E0AA.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8640.image_thumb_69DC8376.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8640.image_5F00_thumb_5F00_69DC8376.png" width="389" height="304" /></a></p>  <p>The window titled “<b>Add Database to Sync Group</b>” will display, enter the SQL Azure server name, the SQL Azure Database name and the authentication information.</p>  <p>2.- Click Test to verify the connection:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7673.image_1D089713.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7673.image_5F00_1D089713.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1616.image_thumb_09B7BAA7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1616.image_5F00_thumb_5F00_09B7BAA7.png" width="390" height="355" /></a></p>  <p>Click <b>Add</b> to save the information.</p>  <p>3. – Go to Step and configure the Synch Schedule, you can select any value between 5 minutes and 1 month. You can also specify conflict rules in case you have to overwrite data.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3463.image_59CCF318.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3463.image_5F00_59CCF318.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6165.image_thumb_071E631C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6165.image_5F00_thumb_5F00_071E631C.png" width="379" height="373" /></a></p>  <p>4.- Go to Step 5 and click the <b>Edit Dataset</b> button in order to define which tables and columns you want to synchronize.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8233.image_13E8936D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8233.image_5F00_13E8936D.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2352.image_thumb_55BF52EE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2352.image_5F00_thumb_5F00_55BF52EE.png" width="372" height="448" /></a></p>  <p>5.- Apply a filter if you want to specify which rows will be synchronized, click on the <b>Filter</b> check box and write an expression.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5008.image_65323EF0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5008.image_5F00_65323EF0.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0218.image_thumb_094773B3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0218.image_5F00_thumb_5F00_094773B3.png" width="372" height="503" /></a></p>  <p>6.- Finally, deploy the changes by clicking <b>Deploy</b> button on the toolbar:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6646.image_1775C6D6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6646.image_5F00_1775C6D6.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6560.image_thumb_5D1A50F4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6560.image_5F00_thumb_5F00_5D1A50F4.png" width="401" height="67" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7120.image_349B6EE0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7120.image_5F00_349B6EE0.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0361.image_thumb_168D3B1F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0361.image_5F00_thumb_5F00_168D3B1F.png" width="390" height="303" /></a></p>  <p>7.- To star synchronizing. Click on <b>Sync Now</b> button on the toolbar:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8780.clip_image0025_50D88B33.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8780.clip_5F00_image0025_5F00_50D88B33.jpg"><img title="clip_image002[5]" style="display: inline; background-image: none;" border="0" alt="clip_image002[5]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5141.clip_image0025_thumb_6F42CC1C.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5141.clip_5F00_image0025_5F00_thumb_5F00_6F42CC1C.jpg" width="371" height="125" /></a></p>  <p>After the synchronization occurs, you will see a new Schema called DataSync inside your databases as well as several tables used to maintain synchronization:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6237.clip_image003_7927BD87.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6237.clip_5F00_image003_5F00_7927BD87.png"><img title="clip_image003" style="display: inline; background-image: none;" border="0" alt="clip_image003" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2402.clip_image003_thumb_3740D839.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2402.clip_5F00_image003_5F00_thumb_5F00_3740D839.png" width="168" height="77" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3157.image_2F4935D7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3157.image_5F00_2F4935D7.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6607.image_thumb_6DBE5DB0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6607.image_5F00_thumb_5F00_6DBE5DB0.png" width="224" height="436" /></a></p>  <p>And several stored procedures too:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6170.image_35DBF3C0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6170.image_5F00_35DBF3C0.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6735.image_thumb_0F59C4DB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6735.image_5F00_thumb_5F00_0F59C4DB.png" width="300" height="347" /></a></p>  <h3><b>Verifying synchronization</b></h3>  <p>To test the process, I insert some rows into Products:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8080.image_72CCAD2D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8080.image_5F00_72CCAD2D.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6724.image_thumb_5B7182EF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6724.image_5F00_thumb_5F00_5B7182EF.png" width="397" height="163" /></a></p>  <p>Click on <b>Sync now</b>:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6327.image_7C54CFC9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6327.image_5F00_7C54CFC9.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4667.image_thumb_6DAA23E4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4667.image_5F00_thumb_5F00_6DAA23E4.png" width="154" height="107" /></a></p>  <p>&#160;</p>  <p>And query the SalesOnCloud database to see the records:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3755.image_5A88F738.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3755.image_5F00_5A88F738.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0820.image_thumb_0C7071F6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0820.image_5F00_thumb_5F00_0C7071F6.png" width="377" height="292" /></a></p>  <p>Sync data is stored inside an XML schema inside the data sync tables:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5126.image_7CDD3A59.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5126.image_5F00_7CDD3A59.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7838.image_thumb_3A79FC49.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7838.image_5F00_thumb_5F00_3A79FC49.png" width="418" height="151" /></a></p>  <h3><b>Adding more databases</b></h3>  <p>Once you have configured the initial database is easy to add more On-Premise databases, just go to the <b>ON-PREMISES</b> region in the portal and click the <b>Add a SQL Server database</b> icon</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3632.image_68572934.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3632.image_5F00_68572934.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3223.image_thumb_42BD8606.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3223.image_5F00_thumb_5F00_42BD8606.png" width="500" height="308" /></a></p>  <p>Just repeat the previous steps to register the database in the Sync Agent:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0564.image_2708D443.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0564.image_5F00_2708D443.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1538.image_thumb_6A8039CB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1538.image_5F00_thumb_5F00_6A8039CB.png" width="326" height="406" /></a></p>  <p>And add the database to the Sync Group</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8463.image_44E6969D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8463.image_5F00_44E6969D.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8475.image_thumb_5C9DCE03.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8475.image_5F00_thumb_5F00_5C9DCE03.png" width="356" height="287" /></a></p>  <p>And you will see the database in the ON-PREMISES section in the portal:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7077.image_78EB1023.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7077.image_5F00_78EB1023.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0045.image_thumb_730046BD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0045.image_5F00_thumb_5F00_730046BD.png" width="418" height="351" /></a></p>  <p>You can also add another SQL Azure database to your topology just clicking the corresponding icon:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6404.image_02DF65B5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6404.image_5F00_02DF65B5.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4834.image_thumb_225E8FBD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4834.image_5F00_thumb_5F00_225E8FBD.png" width="455" height="205" /></a></p>  <p>The process is similar to the previous shown before.</p>  <h3>Conclusions</h3>  <p>The SQL Azure DataSync is an excellent tool for manage scenarios similar to replication but using a SQL Azure Database. The process Works fine and quick and once it is released to production will be a good alternative for consolidate and replicate information.</p>]]></content:encoded>
    </item>
    <item>
      <title>Data Synchronization using SQL Azure Data Sync</title>
      <link>https://docs.microsoft.com/archive/blogs/felixmar/data-synchronization-using-sql-azure-data-sync</link>
      <pubDate>Tue, 26 Jun 2012 20:22:26 GMT</pubDate>
      <dc:creator><![CDATA[Félix Martínez Retama]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/felixmar/2012/06/26/data-synchronization-using-sql-azure-data-sync/</guid>
      <description><![CDATA[A common requirement in many business applications which use multiple data stores among different...]]></description>
      <content:encoded><![CDATA[<p align="justify">A common requirement in many business applications which use multiple data stores among different remote locations is data synchronization and data consolidation. Consolidation can be as simple as extract data from one or more locations and insert it into a single location, while synchronizing requires maintain data updated in order to reflect changes. This is not a new topic and there are many tools used for this purpose, including SQL Server Integration Services and Replication, however these approaches require meeting specific requirements. </p>  <p align="justify"></p>  <p align="justify">With Cloud Computing as an emerging platform we have now new possibilities covering different scenarios.</p>  <p align="justify"></p>  <p align="justify">SQL Azure Data Sync is a new service (currently in beta) hosted in the Windows Azure Platform used to synchronize data between an On-Premise Database and a SQL Azure Database or between multiple SQL Azure Databases.</p>  <p align="justify"></p>  <p align="justify">SQL Azure Data Sync works along with a service called SQL Data Sync Agent which must be installed where the On-Premise Database resides or in a PC that can reach the On-Premise Database and be able to access the SQL Azure Database. The service looks for changes in the On-Premise Database and propagates changes to the SQL Azure Database. </p>  <p align="justify"></p>  <p align="justify">In this Post I will explain how to configure and use SQL Azure Data Sync, SQL Data Sync Agent and some scenarios where these tools can be implemented.</p>  <h3>Distributed Data Scenarios</h3>  <p align="justify">According to the way data is distributed, its characteristics, update frequency and location there are multiple scenarios to solve each of these requirements. The following are some examples of how Data Sync could be used.</p>  <p><b></b></p>  <h3>Data Consolidation in a Central Location</h3>  <p align="justify">Imagine an organization which has several remote locations (branch offices) which could be point of sales where an On-Premise data base exists en each one. All the information in each location must be submitted to a central database (corporate office). If the central database is also an On-Premise database the common way to implement this requirement would be using replication using a central subscriber model. The following diagram shows this scenario.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5672.image_740BF5C5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5672.image_5F00_740BF5C5.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0451.image_thumb_0F80D1FC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0451.image_5F00_thumb_5F00_0F80D1FC.png" width="447" height="329" /></a></p>  <p>Scenario 1: Central Subscriber using replication with On-Premise databases</p>  <p>&#160;</p>  <p>For simplicity, the illustration only shows a conceptual architecture however several components would be required to implement replication. You would need to configure 3 different roles: A Publisher, a Distributor and a Subscriber as well as the publications and articles. On the other hand, SQL Server must be at least a workgroup edition (whose replication features are limited) in order to publish data. Although replication is not difficult to implement, it requires some kind of knowledge not only to implement it but also to maintain replication working properly.</p>  <p>Having good connectivity is also important including band width, availability, latency, security, etc. If all databases are On-Premise, maybe you should use a VPN or another kind of secure connection between your systems.</p>  <p>&#160;</p>  <h3>Implementing common replication models using SQL Azure Data Sync</h3>  <p>Another way to implement this requirement would be using SQL Azure as the central location. This way, remote locations would only need an internet connection and install and configure SQL Data Sync Agent which connects to SQL Azure Data Sync.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2146.image_60AAF38C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2146.image_5F00_60AAF38C.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6813.image_thumb_263F57DE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6813.image_5F00_thumb_5F00_263F57DE.png" width="441" height="320" /></a></p>  <p><strong>Scenario 2</strong>: Central subscriber using SQL Azure Data Sync</p>  <p align="justify">It is possible to implement many different scenarios using SQL Azure Data Sync. Not only to consolidate data in a single location but in the opposite way: distributing data from a central place to a remote location, a typical example would be to distribute products catalogs. Another scenario includes bi-directional synchronization where information can be maintained in any place (remote or central) and all changes can be applied to its counterpart. By combining these configurations it is possible to define more complex scenarios, for example re synchronize in more than one SQL Azure Database, implement read-only and read-write simultaneous, etc..</p>  <p align="justify">The following illustrations show these ideas:</p>  <p align="justify">&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8611.image_365AFA0A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8611.image_5F00_365AFA0A.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1200.image_thumb_28E4C137.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1200.image_5F00_thumb_5F00_28E4C137.png" width="446" height="324" /></a></p>  <p><strong>Scenario 3</strong>: Central Publisher – Remote Subscribers using SQL Azure Data Sync</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0361.image_6CC859B4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0361.image_5F00_6CC859B4.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8726.image_thumb_69A34541.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8726.image_5F00_thumb_5F00_69A34541.png" width="454" height="330" /></a></p>  <p><strong>Scenario 4</strong>: Multiple Publishers – Subscribers using SQL Azure Data Sync</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6787.image_663187CC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6787.image_5F00_663187CC.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8686.image_thumb_4F326AB6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8686.image_5F00_thumb_5F00_4F326AB6.png" width="455" height="357" /></a></p>  <p><strong>Scenario 5</strong>: Multiple Publishers – Subscriber with a remote subscriber in SQL Azure.</p>  <p>&#160;</p>  <p>In fact, any possible combination can be implemented just configuring the SQL Azure Sync Agent. Also it is possible to select the data to synchronize (tables, and columns), filter rows using expressions and defining a synchronization Schedule.</p>  <h2>Creating Databases</h2>  <p>Before starting configuration, I will use the next Script to create a local database called SalesOnPremise with 2 tables and I will use the same script to create the same database with a different name (SalesOnCloud) to re create the same 2 tables. It is important to notice that SQL Azure does not support some transacts, so they must be deleted. The following script shows these conditions which are shown in the red boxes.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2313.image_4601556D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2313.image_5F00_4601556D.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8750.image_thumb_25D622E3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8750.image_5F00_thumb_5F00_25D622E3.png" width="657" height="549" /></a></p>  <h2>&#160;</h2> In the next section I will show how to configure SQL Sync Agent and SQL Data Sync.&#160;  ]]></content:encoded>
    </item>
    <item>
      <title>Demo: Crear una aplicación para Windows Phone 7 parte II</title>
      <link>https://docs.microsoft.com/archive/blogs/felixmar/demo-crear-una-aplicacin-para-windows-phone-7-parte-ii</link>
      <pubDate>Tue, 14 Feb 2012 14:22:58 GMT</pubDate>
      <dc:creator><![CDATA[Félix Martínez Retama]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/felixmar/2012/02/14/demo-crear-una-aplicacin-para-windows-phone-7-parte-ii/</guid>
      <description><![CDATA[Después de crear la interfaz gráfica podemos agregar sonidos (.WAV) y reproducirlos. Aunque es...]]></description>
      <content:encoded><![CDATA[<p>Después de crear la interfaz gráfica podemos agregar sonidos (.WAV) y reproducirlos. Aunque es posible utilizar el control <b>MediaElement</b> no es recomendable usarlo porque tiene las siguientes limitaciones: No permite reproducir un sonido antes de terminar la reproducción del anterior. Cada nota musical es en realidad un archivo .WAV con una duración aproximada de 1 segundo. Si presionamos una tecla y antes de 1 segundo presionamos otra tecla la segunda no se escuchará, esto significa que tendríamos que esperar hasta que deje de escucharse el sonido de la primera. El segundo inconveniente es que debido a esta misma limitación es imposible tocar acordes, es decir múltiples teclas simultáneamente por lo que la polifonía sería de 1 nota, algo totalmente impráctico. Por esta razón vamos a utilizar la librería Xna que también tiene objetos para reproducir sonidos pero sin las limitantes mencionadas anteriormente. Este video es la segunda parte de la demostración.</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:28d4f1cc-32ac-463f-9ed8-c31278376c03" class="wlWriterEditableSmartContent"><div><a href="https://www.youtube.com/watch?v=jqHj1xnl5Ho&amp;feature=youtube_gdata_player" target="_new"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2642.video4b68d1e30c06_00E35916.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2642.video4b68d1e30c06_5F00_00E35916.jpg" style="border-style: none" galleryimg="no" alt=""></a></div><div style="width:448px;clear:both;font-size:.8em">Crear una aplicación para Windows Phone 7 parte II</div></div>]]></content:encoded>
    </item>
    <item>
      <title>Partitioning &amp; Archiving tables in SQL Server (Part 2: Split, Merge and Switch partitions)</title>
      <link>https://docs.microsoft.com/archive/blogs/felixmar/partitioning-archiving-tables-in-sql-server-part-2-split-merge-and-switch-partitions</link>
      <pubDate>Mon, 29 Aug 2011 21:59:40 GMT</pubDate>
      <dc:creator><![CDATA[Félix Martínez Retama]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/felixmar/2011/08/29/partitioning-archiving-tables-in-sql-server-part-2-split-merge-and-switch-partitions/</guid>
      <description><![CDATA[In the 1st part of this post, I explained how to create a partitioned table using a partition...]]></description>
      <content:encoded><![CDATA[<p>In the 1st part of this post, I explained how to create a partitioned table using a partition function as well as a partition schema.&#160; Now I’ll continue talking about how to merge or split partitions changing the partition function and the partition schema and how to move data between partitions using alter table command.</p>  <p>Here´s where the importance of&#160; the function definition makes sense, the way partitions split or merge depends of the RIGHT or LEFT specification. The easiest way you can understand how they work is looking at the following examples. I will use a partition function with&#160; LEFT specification, look at the process and the result after splitting and merging the table:</p>  <p>I already created a database PartitionDBLeft, this is how the database looks like:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5734.image_5E46C277.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5734.image_5F00_5E46C277.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8461.image_thumb_5566945E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8461.image_5F00_thumb_5F00_5566945E.png" width="550" height="168" /></a></p>  <p>And these are the definitions for partition schema, partition function and orders table:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4152.image_3C3B1459.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4152.image_5F00_3C3B1459.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5810.image_thumb_7334F292.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5810.image_5F00_thumb_5F00_7334F292.png" width="549" height="313" /></a></p>  <p>In this case, the orders table is stored in a partition schema (psOrderDateRange) as well as the index. Also note that my primary key contains the columns OrderID plus OrderDate which is the partition key (the column by which the table is partitioned). When you create a primary key, SQL creates an index, usually a clustered index which sorts the table by that column. If the column OrderDate is not part of the primary key, you won´t be able to create a clustered key because in partitioned tables the sort order is determined by the partition key so you would need to create a non-clustered key instead. Later in this post you’ll see how important is this.</p>  <p>&#160;</p>  <p>The partition function is defined using LEFT, now let´s insert some orders for 2008:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2502.image_636537C1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2502.image_5F00_636537C1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2086.image_thumb_2256B85D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2086.image_5F00_thumb_5F00_2256B85D.png" width="267" height="313" /></a></p>  <p>Now, let’s query the partitions, using the queries explained the Part 1, as you see the records are stored inside partition 1 (FG1)</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6403.image_32164D61.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6403.image_5F00_32164D61.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5635.image_thumb_3F102D72.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5635.image_5F00_thumb_5F00_3F102D72.png" width="537" height="97" /></a></p>  <p>Repeat the procedure inserting 300 for 2009 and 300 records for 2010, (just change the value for @OrderDate), this is how it looks:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1425.image_7531A5C1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1425.image_5F00_7531A5C1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8446.image_thumb_6CCDD06A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8446.image_5F00_thumb_5F00_6CCDD06A.png" width="547" height="192" /></a></p>  <p>Maybe you would expect to have 300 records for each year (2008, 209 and 2010) but the results are different, this is due to the function definition. When using LEFT, each value defined in the function corresponds to the UPPER limit of each partition which you can see in&#160; the the column<strong> Max Value</strong> in the last query. On the other hand if you had use RIGHT instead of LEFT, the result would be the expected. By now, I will drop the table as well as the schema and the function and will define the function again this time using a different value for each range:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7875.image_45EF945D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7875.image_5F00_45EF945D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2260.image_thumb_2C1B5E2E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2260.image_5F00_thumb_5F00_2C1B5E2E.png" width="552" height="79" /></a></p>  <p>The schema will remain the same as well as the table, this time using the new partition function. After inserting the same records this is how it looks:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5635.image_3189CED2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5635.image_5F00_3189CED2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5633.image_thumb_4FF40FBB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5633.image_5F00_thumb_5F00_4FF40FBB.png" width="562" height="192" /></a></p>  <p>In fact, you could insert the dates ‘2008/12/31, 2009/12/31 and 2010/12/31 and those would be the limit for each partition:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3731.image_03202358.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3731.image_5F00_03202358.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6470.image_thumb_3B5E9A70.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6470.image_5F00_thumb_5F00_3B5E9A70.png" width="550" height="100" /></a></p>  <h2>Split a partition</h2>  <p>According to the partition schema definition, If you insert a record for 2011, that record will be inserted in partition 4 which is the PRIMARY partition. Suppose you need to insert the orders from 2011 in a new partition (inside a new filegroup, let’s say FG4).&#160; First, you have to add a new filegroup (FG4) and a new partition (an .NDF file) inside FG4:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7455.image_7E79F2D0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7455.image_5F00_7E79F2D0.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5710.image_thumb_31D5B62D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5710.image_5F00_thumb_5F00_31D5B62D.png" width="565" height="219" /></a></p>  <p>Now you can modify your partition function to SPLIT the last range (which currently holds all records greater than 2010/12/31) to create a new range for orders from 01/01/2011 to 31/12/2010. Before doing so, you need to alter the partition schema to include the new filegroup (FG4) to let the partition function map the new range data to this filegroup, otherwise you will get this error:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7851.image_60D7F204.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7851.image_5F00_60D7F204.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6378.image_thumb_2FF53A99.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6378.image_5F00_thumb_5F00_2FF53A99.png" width="558" height="62" /></a></p>    <p>The following script will alter the partition schema making FG4 the next available filegroup:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8831.image_7C4CCE3A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8831.image_5F00_7C4CCE3A.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3644.image_thumb_0DBD2F13.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3644.image_5F00_thumb_5F00_0DBD2F13.png" width="515" height="42" /></a></p>    <p>Now let´s alter the partition function to include the new range:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8015.image_5A14C2B4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8015.image_5F00_5A14C2B4.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7444.image_thumb_475FC8FD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7444.image_5F00_thumb_5F00_475FC8FD.png" width="626" height="40" /></a></p>  <p>Now, check how the partition schema and partition function look after the change, you can use Management Studio to create the scripts:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7851.image_6A408AAD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7851.image_5F00_6A408AAD.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2158.image_thumb_571F5E01.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2158.image_5F00_thumb_5F00_571F5E01.png" width="527" height="74" /></a></p>  <p>This is the result:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2642.image_3C72C1E8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2642.image_5F00_3C72C1E8.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1072.image_thumb_3C629C1B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1072.image_5F00_thumb_5F00_3C629C1B.png" width="770" height="154" /></a></p>  <p>This is the expected behavior in most of cases when you need to add a new partition in a rotating base of time to hold new data, in this scenario I would do it in december to prepare my orders table for the next year data. I can always use PRIMARY as the last partition for future data since I´m sure there will not be data there, however the partition function requires an additional range for all data that exceeds the last range value.</p>  <p>If I insert data between 2011/01/01 and 2011/12/31 that would be inserted in FG4:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2148.image_1EC09B4F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2148.image_5F00_1EC09B4F.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7444.image_thumb_7D60F5B2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7444.image_5F00_thumb_5F00_7D60F5B2.png" width="529" height="208" /></a></p>  <p>For the next year, all you have to do is repeat the process, I mean: add FG5, alter partition function marking FG5 the next used filegroup and alter the partition function splitting the last range including 2012/12/31 and voilà, you have a new partition ready to hold 2012 records!</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6862.image_7B807A1E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6862.image_5F00_7B807A1E.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2146.image_thumb_15E06D36.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2146.image_5F00_thumb_5F00_15E06D36.png" width="529" height="241" /></a></p>  <h2>Merge Partitions</h2>  <p>Now let´s talk about merging partitions. After some years, you decide all those partitions are difficult to maintain, it would be better to have all data for the first n years in a single partition. Let’s suppose you want to join all orders from 2008/01/01 to 20010/12/31 in a single file. Well, you can merge those 3 partitions but just 2 at time. </p>  <p>Merging is as simple as alter the partition function specifying the range that will be the new upper limit for the joined ranges:</p>  <p>Lets firs join FG1 and FG2 and see the result:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6378.image_6F6E641D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6378.image_5F00_6F6E641D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7345.image_thumb_17BD9672.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7345.image_5F00_thumb_5F00_17BD9672.png" width="852" height="90" /></a></p>  <p>If you query the partitions, this is what you will see:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6443.image_4321B76C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6443.image_5F00_4321B76C.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7026.image_thumb_5A6CBBDD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7026.image_5F00_thumb_5F00_5A6CBBDD.png" width="534" height="225" /></a></p>  <p>Note that all records from FG1 moved to FG2, now you only have 5 partitions instead of the 6 originals. and FG1 does not contains any data.</p>  <p>Now let´s join FG2 and FG3:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6763.image_65F2534F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6763.image_5F00_65F2534F.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6036.image_thumb_44FEE0A8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6036.image_5F00_thumb_5F00_44FEE0A8.png" width="739" height="102" /></a></p>  <p>Let´s look what’s inside each filegroup:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1651.image_7EA17A92.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1651.image_5F00_7EA17A92.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3323.image_thumb_5D41D4F6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3323.image_5F00_thumb_5F00_5D41D4F6.png" width="550" height="211" /></a></p>  <p>Again, data from FG2 moved to FG3.</p>  <p>You can also check the reports included in management studio:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3125.image_77DE4B42.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3125.image_5F00_77DE4B42.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8510.image_thumb_48402CB6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8510.image_5F00_thumb_5F00_48402CB6.png" width="477" height="164" /></a></p>  <p>What about FG1 and FG2?. In fact, this filegroups are empty, you could use for future data, for other kind of data or you could remove them.</p>  <h3>Switch Partitions</h3>  <p>Now suppose you need to archive all data from 2008/01/01 to 2010/12/31 since this is historical data. At the current time, all this data is stored in FG3 which is now partition No. 1. By the way, If this data will never change anymore, you could mark this filegroup as READONLY:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8004.image_3DBF5896.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8004.image_5F00_3DBF5896.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5367.image_thumb_31BD6862.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5367.image_5F00_thumb_5F00_31BD6862.png" width="596" height="100" /></a></p>  <p>This is not necessary to archive data but is recommended to protect historical information&#160; against writing and to simplify backup strategy which I’ll discuss in another post.</p>  <p>The first thing you must be aware of is index aligning. Remember: if the partition key (OrderDate column) is part of the primary Key (OrderID + OrderDate) the index is aligned with the data. This means that each corresponding portion of the index is allocated in its corresponding partition because it uses the same partition schema and you can have a clustered index. If this is not the case (suppose your primary key is just OrderID), you can´t have a clustered index in the primary key because the data needs to be sorted using the partition key (which is Order Date) and you would have to create a non-clustered index in the primary key and all the index should be stored in a different partition (usually the PRIMARY filegroup).The main problem with this design is that you would need to drop the index before switching the partitions and then recreate the index after the switch operation but also, the process to move data from 1 partition to another (switch) would be slower. Fortunately our Orders table has a aligned index which you can see in the index properties window:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1157.image_177CFF3E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1157.image_5F00_177CFF3E.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3288.image_thumb_54BDB405.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/3288.image_5F00_thumb_5F00_54BDB405.png" width="604" height="281" /></a></p>  <p>You can see the index is stored in the partition schema (psOrderDateRange) so it is aligned with the data.</p>  <p>In this scenario, I will move data from FG3 to a different table (Orders_History) which can be in the same or in a different database, I just want to archive those records and free space from my current database. Instead of write a delete query which can be slow and use a lot of transaction log space, I will simply move FG3 to a temporary table inside the same filegroup which will be very fast since only metadata will be moved and then I will transfer those records to the historical table which can be stored in the same or in a different database using an INSERT SELECT clause. Of course this will take some time but I can move it in a simpler way and without locking my production table or affecting my users.</p>  <p>The process is:</p>  <ol>   <li>Create a temporary&#160; table with the same structure from the original table (orders)&#160; in the SAME FILEGROUP. This is necessary since you can only switch data from partitions located in the same filegroup. </li>    <li>Create the destination table (orders_history) with the same structure as the original and the temporary. </li>    <li>Switch the desired partition using ALTER TABLE clause </li>    <li>insert the data from the temporary table to the destination table using INSERT SELECT clause. </li>    <li>Drop the temporary table. </li> </ol>  <p>Let´s see:</p>  <p>This is my temporary table created on FG3:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4762.image_26C03B80.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4762.image_5F00_26C03B80.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8562.image_thumb_2C9ADF19.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8562.image_5F00_thumb_5F00_2C9ADF19.png" width="577" height="162" /></a></p>  <p>This is my Historical table created in a different database, note I excluded INDENTITY since this value will exists in the source table.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8507.image_55C27757.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/8507.image_5F00_55C27757.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1050.image_thumb_098A6DA9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1050.image_5F00_thumb_5F00_098A6DA9.png" width="573" height="187" /></a></p>  <p>The data I want to move lives in FG3 which is now partition 1. I just simply alter orders table this way:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5850.image_4BADD62C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5850.image_5F00_4BADD62C.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2605.image_thumb_07013BEB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2605.image_5F00_thumb_5F00_07013BEB.png" width="581" height="42" /></a></p>  <p>What is surprising is that it doesn't matter how big partition 1 is, the data will be switched very fast!</p>  <p>Before moving the data to the history table, let´s query the partitions again:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0576.image_49FD0A58.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/0576.image_5F00_49FD0A58.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1157.image_thumb_5DA9F3EC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/1157.image_5F00_thumb_5F00_5DA9F3EC.png" width="531" height="193" /></a></p>  <p>FG3 has not any records. </p>  <p>All the data is now in the Orders_Temp table:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5342.image_49ECE48B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5342.image_5F00_49ECE48B.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2627.image_thumb_797ADD4A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2627.image_5F00_thumb_5F00_797ADD4A.png" width="519" height="146" /></a></p>  <p>Now let´s move the data to Orders_History:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2627.image_662A00DE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2627.image_5F00_662A00DE.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6332.image_thumb_59BBDDB5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6332.image_5F00_thumb_5F00_59BBDDB5.png" width="442" height="279" /></a></p>  <p>Finally, drop Orders_Temp table:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2625.image_5FD30483.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/2625.image_5F00_5FD30483.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4452.image_thumb_73EC210C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/4452.image_5F00_thumb_5F00_73EC210C.png" width="423" height="121" /></a></p>  <p>However you cannot drop FG3 because one range of the orders table is allocated in this filegroup, although you know there is not data there. However you can merge FG3 and FG4 this will release FG3 if you want to drop it. in the last query you can se FG3 boundary is 2010-12-31, so you can merge using this value:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5758.image_32716EB3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5758.image_5F00_32716EB3.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6332.image_thumb_15F47CD3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6332.image_5F00_thumb_5F00_15F47CD3.png" width="689" height="38" /></a></p>  <p>If you query the partitions, FG3 is not used anymore:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5023.image_1BCF206C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/5023.image_5F00_1BCF206C.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7418.image_thumb_21A9C405.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/7418.image_5F00_thumb_5F00_21A9C405.png" width="428" height="119" /></a></p>  <p>Now you can remove FG3 if you want.</p>  <h2>Conclusion</h2>  <p>You can create a partitioning strategy in very large tables in order to simplify administration, enhance performance, create an archiving strategy to purge out data from the database and manage partitions merging or splitting them to provision space for future data. You must take care of table design and choose the correct partition key as well as index. If you make a wrong decision&#160; it could be very difficult to manage future data. Try to reproduce the same examples in this post but now using RIGHT instead of LEFT and you´ll see what I mean. Also, try to create a table without the OrderDate column in the primary key to see how the index is built.</p>  <p>I hope you find this information helpful, If that´s the case leave me a message in the blog.</p>  <p>Thanks.</p>]]></content:encoded>
    </item>
    <item>
      <title>Demo: Crear una aplicación para Windows Phone 7 con Expression Blend</title>
      <link>https://docs.microsoft.com/archive/blogs/felixmar/demo-crear-una-aplicacin-para-windows-phone-7-con-expression-blend</link>
      <pubDate>Wed, 22 Jun 2011 22:06:20 GMT</pubDate>
      <dc:creator><![CDATA[Félix Martínez Retama]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/felixmar/2011/06/22/demo-crear-una-aplicacin-para-windows-phone-7-con-expression-blend/</guid>
      <description><![CDATA[Un ejemplo de cómo emplear Expression Blend y XNA Framework para construir una aplicación sencilla...]]></description>
      <content:encoded><![CDATA[<p>Un ejemplo de cómo emplear Expression Blend y XNA Framework para construir una aplicación sencilla rápidamente. El ejemplo muestra como utilizar plantillas para&#160; simplificar el diseño visual e incluir capacidades adicionales de reproducción. </p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:4a04a8ed-fcba-494e-b0b3-f8a9acf28637" class="wlWriterEditableSmartContent"><div><a href="https://www.youtube.com/watch?v=RhcDRQU2VKM" target="_new"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6013.video7989a79fb081_60D26DF7.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-60-metablogapi/6013.video7989a79fb081_5F00_60D26DF7.jpg" style="border-style: none" galleryimg="no" alt=""></a></div><div style="width:448px;clear:both;font-size:.8em">Crear una aplicación para Windows Phone 7</div></div>]]></content:encoded>
    </item>
    <item>
      <title>Partitioning &amp; Archiving tables in SQL Server (Part 1: The basics)</title>
      <link>https://docs.microsoft.com/archive/blogs/felixmar/partitioning-archiving-tables-in-sql-server-part-1-the-basics</link>
      <pubDate>Mon, 14 Feb 2011 21:58:07 GMT</pubDate>
      <dc:creator><![CDATA[Félix Martínez Retama]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/felixmar/2011/02/14/partitioning-archiving-tables-in-sql-server-part-1-the-basics/</guid>
      <description><![CDATA[Database partitioning is a feature available in SQL Server(version 2005 and Up) which lets you split...]]></description>
      <content:encoded><![CDATA[<p>Database partitioning is a feature available in SQL Server(version 2005 and Up) which lets you split a table among multiple files which can be beneficial for large tables, especially for those which hold historical data. Using partitioning You can also simplify data management&nbsp; ( like storage size and placement, backups strategy etc.) as well as index management, making queries run faster when working with smaller ranges of data. Data partitioning is really easy to implement if you clearly understand how it works and if you plan your strategy carefully. You can also benefit from this feature to archive old data in a very easy way.</p> <p>You can find much information about data partitioning on the Internet including the examples from MSDN and BOL, however there are important considerations you must care about and experiment with different data scenarios before implementing data partitioning in a production environment. This article focuses on these topics as well as partition management including split and merge partitions and the switch partition option.<br /></p> <h2>&nbsp;</h2> <h2>Filegroups and Data Files</h2> <p>As you know, a database contains a data file (.MDF) and a transaction log file (.LDF), however you can add additional files to the database,these files are called secondary files (.NDF) and can be also use to store data rows. The files are assigned to filegroups in the same way the files are assigned to folders in the a file system, however, when assign several files to the same filegroup, data is distributed evenly&nbsp; between all of them, in a round-robin way.To begin the example, let´s create a sample database called PartitionDB with 3 filegroups and 3 additional files (.NDF). </p> <p>In SQL Server Management Studio, right click on <strong>Databases</strong> <strong>–&gt; New Database</strong>. You can add the filegroups in the Filegroups page or you can add the files (.NDF) in the Files page and add the filegroup at the same time in the Files page. Just go to <strong>Files</strong> Page, click the <strong>Add</strong> Button, in the Logical Name column, type a name for the File, click on <strong>Filegroup</strong> column, select <strong>&lt;new Filegroup&gt;</strong> and type a name for the filegroup:<br /></p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7077.image_7E77ACDA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/7077.image_5F00_7E77ACDA.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8561.image_thumb_183BBD3D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/8561.image_5F00_thumb_5F00_183BBD3D.png" width="478" height="433" /></a></p> <p>&nbsp;</p> <h2>Define partitions</h2> <p>Now, we need decide how to partition our data. Is different the scenario where you want to partition a table which already contains data from a scenario where you are creating a new table. In the first case, you must be aware of the primary key in terms of how is build, which column (s) participate and the data types, you must also care about the unique&nbsp; index which the Primary key builds automatically . In the case you are building a new table from scratch, you can decide how to create the table, the primary key and the partitioning strategy, in the first case you will be limited to what the table design allows.</p> <p>In this examples we are going to create&nbsp; 2 new tables, the tables will simulate order information. The first example will implement partitioning by using <strong>OrderID</strong> as the partition column while the second example will use <strong>OrderDate</strong>. The partition column is called <u><strong>Partition Key</strong></u> and represents the criteria used to partition the information.<br /></p> <h2>Partition Function</h2> <p>The partition function creates the ranges of data (partitions) according to values defined inside its body. This values are the boundaries which in turn produce the ranges. The function takes a data type as a parameter according to the column you selected as the partition key. When you define the boundaries for the partitions, you can use <strong>RIGHT</strong> or <strong>LEFT</strong> to define the limits of each partition.</p> <p>LEFT means each value represents the upper limit for each range, in other words, each range goes from each boundary value to the LEFT.</p> <p>RIGHT means each value represent the lower limit for each range but the first range will start to the right of the first value, so there will be an additional range&nbsp; (the first range) and the first boundary value in the function defines where the second range begins. </p> <p>To better understand,&nbsp; suppose you have 10 000 records and want to create 3 ranges, the first range goes from 1-1000, the second from 1001 to 5000 and the third from 5001 to 10000. Since the partitions are based on numbers, you should pass a numeric datatype as an argument to the function.</p> <p>Let´s create a function named <strong>pfRecordsRange</strong> in order to do this:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5811.image_0FC7C219.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/5811.image_5F00_0FC7C219.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1614.image_thumb_1CC1A22A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/1614.image_5F00_thumb_5F00_1CC1A22A.png" width="406" height="66" /></a></p> <p>Note that the function uses LEFT for defining ranges, as I said before when using left each value represents the upper limit. 1000 is the upper limit for the first range, 5000 for the second and 10000 for the third.</p> <p>If the first record starts in 1, this would be the lower limit for the first range (1-1000) , 10001 would be the lower limit for the second range (1001 – 5000)&nbsp; and 5001 for the 3rd (5001 – 10 000)</p> <p>But look, what if more records are inserted outside the limits? for example where would the record 10001 be placed? </p> <p>well, in fact another range is automatically generated for all the records that are greater than the&nbsp; last value defined in the function (&gt;10000) and this will be the last range, so the record 10001 will be placed here.</p> <p>Another question: If the value –1 would be inserted, where would it be placed?. The answer is: In the first range.</p> <p>In fact the first and the last ranges have no limits, both have just one boundary, so consider&nbsp; to add a check constraint in your table to restrict the values that can be inserted in these ranges.</p> <p>Another important consideration: You will need an additional filegroup to hold the data for the additional range.&nbsp; You will always need to consider 1 additional filegroup apart from those required by the function values. If your function includes n values, you will need n+1 filegroups.</p> <p>This requirement is just to be sure the function will be able to place each partition in an available filegroup but it does not really mean there will be data for the last filegroup, so you could use the PRIMARY file group as the target for the last partition.</p> <p>Returning to our example, If I use RIGHT instead of LEFT the first boundary value (1000) in the function would be the lower limit for the second range and the first range would include all records which are less than 1000, the last range would include the&nbsp; number 10000, that is mean &gt;=10000.</p> <p>The following image shows the difference when using LEFT and RIGHT in terms of the ranges they produce:<br /></p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7455.image_64EABC5D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/7455.image_5F00_64EABC5D.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3644.image_thumb_79CC1903.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/3644.image_5F00_thumb_5F00_79CC1903.png" width="473" height="266" /></a></p> <p>If LEFT is used, the first value in the function will be part of the first partition. If RIGHT is used, it will be part of the second partition, also look how the ranges are defined in each case. So, the only difference is the partition each value belongs to. The symblos &lt;,&lt;=,&gt;,&gt;=, define this boundaries.</p> <h3>Right or Left?</h3> <p>This is a common question, and the answer is: it all depends how you want to define your partitions,&nbsp; In my case, when I work with numeric ranges I prefer to use LEFT because usually I´ll want to include the upper limit in each range (1 to 10,, 11 to 20, etc.) however when I work with dates I prefer to use RIGHT because I prefer to define ranges by the start date not by the end date, for example If I want 3 partitions for each year (one for 2009, another for 2010 and the last for&nbsp; 2011) is easier to consider the start value for each range: 2009/01/01, 2010/01/01, etc. instead of the end range. Look at the script for this partition function:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4130.image_28CE54DB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/4130.image_5F00_28CE54DB.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1513.image_thumb_00BBA5BC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/1513.image_5F00_thumb_5F00_00BBA5BC.png" width="492" height="89" /></a></p> <h2>Partition Schema</h2> <p>Once you have created the partition function, the next step is creating the partition schema. The partition schema uses the partition function to redirect the partitions defined by the function to the appropriate filegroups. Remember, if you have 3 values defined in the function it will produce 4 ranges (partitions).</p> <p>In this case, assume we want a partition schema for the function <strong>pfOrderDateRange</strong>.</p> <p>The schema would looks like this:<br /></p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0027.image_13FC5C5B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/0027.image_5F00_13FC5C5B.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3162.image_thumb_0B988704.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/3162.image_5F00_thumb_5F00_0B988704.png" width="494" height="114" /></a></p> <p>Note that I used PRIMARY for the last filegroup since no data will be stored here.<br /></p> <h2>Partitioned Table</h2> <p>The last step is creating the table using the partition schema to store data in a partitioned fashion. When you create a table, you can define where to store the table (CREATE TABLE &lt;name&gt; (…) ON ). If you omit the ON part of the statement, the table will be created on the default filegroup which is usually the PRIMARY filegroup. In this case, we will tell the table to store the data in several partitions which is the job of the partition schema, so simply put the partition schema name after the ON clause and add the column name as the argument.</p> <p>Before showing the script let´s talk about the primary key column.</p> <p>When you add a primary key constraint to a table an index is also built on this column. The index may be clustered or non clustered (you can choose) but it must be unique. This unique index is used is to reinforce rows uniqueness. We will not discuss index structures here but remember this: if the Primary Key contains a clustered index, the table will be sorted using the index column (or columns). I f the Primary Key contains a non clustered index, an additional sorted structure will be created and the table data will remain as is.</p> <h2>Index and Data Alignment</h2> <p>The best practice when creating a partitioned table is to partition the index the same way you partition the data, this is called aligned index. But to be able to align index to data rows you must include the partition key (the column by which you are partitioning) in the index definition. If you do this, each index portion will be stored in the same data file (.ndf) where the corresponding data portion is stored, this way, if you query a table using a range expression (WHERE order date BETWEEN…), SQL Server will only use the corresponding index data for the query. The execution plan will be more efficient. Also, you can backup filegroups and create a more efficient recovery strategy because index are contained in the same filegroup. When indexes are aligned, You can move a partition to another table without moving rows just the metadata in just seconds!. It is highly recommended align indexes in order to benefit from this features.</p> <p>Since this is the best scenario possible, lets create a primary Key for our table (orders)&nbsp; using OrderID as well as OrderDate which is the partition key. Look at the script:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6403.image_4F8C454E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/6403.image_5F00_4F8C454E.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6403.image_thumb_26A13045.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/6403.image_5F00_thumb_5F00_26A13045.png" width="652" height="217" /></a></p> <p>That´s all, now when you insert data into your table, each row is evaluated using the partition function to identify the corresponding partition, Partition schema will store the data to the corresponding filegroup using the partition function and the index will be stored in the same filegroups as the corresponding data. <br /></p> <h1>Populate and Verify Data</h1> <p>Now let´s insert some rows in our table using this simple script: </p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8372.image_762AABCE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/8372.image_5F00_762AABCE.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1425.image_thumb_7479DFFA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/1425.image_5F00_thumb_5F00_7479DFFA.png" width="484" height="378" /></a></p> <p>I´ll run the script tree times, each using the values ‘2008/01/01’, ‘2009/01/01’ and ‘2010/01/01’ for the <strong>@OrderDate</strong> variable in order to insert 900 rows.</p> <p>Finally, use the following script which uses the transact <strong>$PARTITION</strong> to verify how many rows are inserted in each partition as well as the data boundaries:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5238.image_46AC1735.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/5238.image_5F00_46AC1735.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8468.image_thumb_4BAE54E4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/8468.image_5F00_thumb_5F00_4BAE54E4.png" width="584" height="318" /></a></p> <p>You can also view the table properties to verify data partitioning:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6811.image_2CA83146.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/6811.image_5F00_2CA83146.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2626.image_thumb_69E8E60D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/2626.image_5F00_thumb_5F00_69E8E60D.png" width="580" height="520" /></a></p> <p>And look at the index properties:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8308.image_1ABB77AC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/8308.image_5F00_1ABB77AC.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5661.image_thumb_10A6D681.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/5661.image_5F00_thumb_5F00_10A6D681.png" width="577" height="516" /></a></p> <p>If you wish, you can create the following view (taken from SQL Server 2008 Internals by Kalen Delaney, Paul S. Randal, Kimberly L. Tripp, and Conor Cunningham):</p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0407.image_32628945.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/0407.image_5F00_32628945.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3146.image_thumb_623D2B06.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/3146.image_5F00_thumb_5F00_623D2B06.png" width="568" height="434" /></a></p> <p>and then query the view to obtain the following results:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8322.image_3E5453AC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/8322.image_5F00_3E5453AC.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7752.image_thumb_1CF4AE10.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/7752.image_5F00_thumb_5F00_1CF4AE10.png" width="556" height="167" /></a></p> <p>This view is similar to the other query but is very useful because you can also see the name of the filegroup and the name of the table where each partitions is stored,&nbsp; you will appreciate this information when merging and splitting data, without this info, is difficult to see where the data was moved.</p> <p>This is the simplest procedure for data partitioning, in the next post I´ll talk about split and merge data,&nbsp; and what to do when you can’t align indexes as well as other scenarios.</p>]]></content:encoded>
    </item>
    <item>
      <title>Visual Studio 2010 Tools for Database Professionals (Spanish Screencast) Part 1</title>
      <link>https://docs.microsoft.com/archive/blogs/felixmar/visual-studio-2010-tools-for-database-professionals-spanish-screencast-part-1</link>
      <pubDate>Mon, 01 Nov 2010 21:55:42 GMT</pubDate>
      <dc:creator><![CDATA[Félix Martínez Retama]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/felixmar/2010/11/01/visual-studio-2010-tools-for-database-professionals-spanish-screencast-part-1/</guid>
      <description><![CDATA[Shows how to create a DB project, how to import a DB schema, how to configure the deployment script...]]></description>
      <content:encoded><![CDATA[<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:ee1254e6-08b2-4821-ba35-7609003f4b98" class="wlWriterEditableSmartContent"><div><a href="https://www.youtube.com/watch?v=rb_FPL8uLKw" target="_new"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8787.video199efdc3cc0a_4842019C.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/8787.video199efdc3cc0a_5F00_4842019C.jpg" style="border-style: none" galleryimg="no" alt="" /></a></div><div style="width:452px;clear:both;font-size:.8em">Shows how to create a DB project, how to import a DB schema, how to configure the deployment script and how to create the isolated development environment.. ---------------------------------------- El video muestra cómo crear un proyecto de base de datos, cómo importar el esquema, cómo configurar el script para el despliegue y generar el entorno de desarrollo aislado.</div></div>]]></content:encoded>
    </item>
    <item>
      <title>How to create and execute a stored procedure using a table as a parameter</title>
      <link>https://docs.microsoft.com/archive/blogs/felixmar/how-to-create-and-execute-a-stored-procedure-using-a-table-as-a-parameter</link>
      <pubDate>Wed, 27 Oct 2010 16:47:04 GMT</pubDate>
      <dc:creator><![CDATA[Félix Martínez Retama]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/felixmar/2010/10/27/how-to-create-and-execute-a-stored-procedure-using-a-table-as-a-parameter/</guid>
      <description><![CDATA[&#160;  Some times you need to create a&#160; stored procedure with input parameters for working...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>Some times you need to create a&#160; stored procedure with input parameters for working with rowsets instead of single rows.&#160; For example, let´s say you want to process a bunch of customer orders all at a time. Usually you would write a stored procedure&#160; with input parameters (OrderID, CustomerID, etc.) and would execute the stored procedure multiple times, once for each record you want to&#160; process.</p>  <p>If you need to load 30 records into a table using this sp, you would have to execute it 30 times!. It´s no so good eh <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-confusedsmile" alt="Confundido" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4276.wlEmoticon-confusedsmile_3FD077FA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/4276.wlEmoticon_2D00_confusedsmile_5F00_3FD077FA.png" />&#160; <br />Fortunatly, SQL Server 2008 lets you use a table as an input parameter so you can fill this table with all the records you want to process and pass this parameter to the sp. You would only need to execute it once which is much better. <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Sonrisa" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2438.wlEmoticon-smile_04D91F64.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/2438.wlEmoticon_2D00_smile_5F00_04D91F64.png" />&#160;</p>  <p>The general steps are:</p>  <ol>   <li>Create a user defined table type (UDTT) . </li>    <li>Create a stored procedure with input parameters (one or more) and be sure to use this UDTT for one of the parameters. Declare the parameter as READ ONLY which is required to process the table as an input parameter. </li>    <li>When executing the stored procedure, declare a variable of the UDTT type. </li>    <li>Fill this variable with some records and proceed to execute the sp passing the variable you just declared.      <br /></li> </ol>  <p>For this demo, I´m going to build a new table&#160; using the following script:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0878.image_5D32A339.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/0878.image_5F00_5D32A339.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0407.image_thumb_5B81D765.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/0407.image_5F00_thumb_5F00_5B81D765.png" width="358" height="233" /></a></p>  <p>&#160;</p>  <p>This will be the target table where the info is going to be inserted. I have added a DEFAULT for <strong>OrderDate</strong> to simplify the demo, this way I will only need to work with 3 fields.</p>  <ol>   <li>Create a UDTT: </li> </ol>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2538.image_26289F33.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/2538.image_5F00_26289F33.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="left" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6735.image_thumb_2C0342CC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/6735.image_5F00_thumb_5F00_2C0342CC.png" width="322" height="151" /></a></p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>2.&#160; Create a stored procedure with an input parameter of <strong>OrderDate</strong> type:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2475.image_2A5276F8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/2475.image_5F00_2A5276F8.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/5127.image_thumb_58D85A0D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/5127.image_5F00_thumb_5F00_58D85A0D.png" width="631" height="521" /></a></p>  <p>3. Finally I can execute the stored procedure this way:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3566.image_7DE57EAC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/3566.image_5F00_7DE57EAC.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/1411.image_thumb_4E476020.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/1411.image_5F00_thumb_5F00_4E476020.png" width="490" height="263" /></a></p>  <p>And here is the result:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/0336.image_390934AB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/0336.image_5F00_390934AB.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4075.image_thumb_1D8432A8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/4075.image_5F00_thumb_5F00_1D8432A8.png" width="279" height="292" /></a></p>  <p>Notice that since all records where inserted at the same time, they all have the same <strong>OderDate</strong> value. Now I´m going to show how to execute this stored procedure using ADO.NET. It´s very easy, there is a structured data type which can be used to work with table datatypes.</p>  <p>Lets see:</p>  <p>To begin, I have created a new project of type Console application, and I added a new class called Order:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/7711.image_1DC0B5DD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/7711.image_5F00_1DC0B5DD.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4087.image_thumb_433A0D71.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/4087.image_5F00_thumb_5F00_433A0D71.png" width="579" height="335" /></a></p>  <p>Remember to include <strong>System.Data</strong> and <strong>System.Data.SqlClient</strong> namespaces.</p>  <p>When building the parameter for the stored procedure, dont forget to use the structured datatype for the parameter (@OrderList) as shown in the following screen:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8132.image_5A74EC15.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/8132.image_5F00_5A74EC15.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4034.image_thumb_2B9F0DA6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/4034.image_5F00_thumb_5F00_2B9F0DA6.png" width="798" height="229" /></a></p>    <p>When building the method, you can pass a DataTable as an argument in order to use it for the stored procedure parameter. You could also use a List, build a dataset, add a data table and populate it with the list, all inside the method. For simplicity I´m going to use a table and an XML file to load the data inside it.</p>  <p>Here is the complete code for the method inside the Order Class:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6014.image_22825C58.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/6014.image_5F00_22825C58.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/2235.image_thumb_76FDEFC3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/2235.image_5F00_thumb_5F00_76FDEFC3.png" width="786" height="659" /></a></p>  <p>   <p>And this is the XML file: (OrderList.xml)</p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3806.image_36F433B1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/3806.image_5F00_36F433B1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3312.image_thumb_0A6B03CB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/3312.image_5F00_thumb_5F00_0A6B03CB.png" width="262" height="377" /></a></p>    <p>Finally, I can use this code to test the method:</p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/6433.image_5EF6BD03.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/6433.image_5F00_5EF6BD03.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/3326.image_thumb_43DDEDF5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/3326.image_5F00_thumb_5F00_43DDEDF5.png" width="581" height="619" /></a></p>    <p>And the orders are all inserted:</p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/8512.image_484448EF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/8512.image_5F00_484448EF.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/60/metablogapi/4403.image_thumb_62A43C06.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-41-60-metablogapi/4403.image_5F00_thumb_5F00_62A43C06.png" width="351" height="296" /></a></p> </p>      <p>Now, you can process multiple records at once quick and easy.</p>]]></content:encoded>
    </item>
    <item>
      <title>My demos &amp; Ideas</title>
      <link>https://docs.microsoft.com/archive/blogs/felixmar/my-demos-ideas</link>
      <pubDate>Tue, 26 Oct 2010 13:37:45 GMT</pubDate>
      <dc:creator><![CDATA[Félix Martínez Retama]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/felixmar/2010/10/26/my-demos-ideas/</guid>
      <description><![CDATA[Posting content soon!]]></description>
      <content:encoded><![CDATA[<p>Posting content soon!</p>]]></content:encoded>
    </item>
  </channel>
</rss>