<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The Synchronizer : SQL2008</title><link>http://blogs.msdn.com/synchronizer/archive/tags/SQL2008/default.aspx</link><description>Tags: SQL2008</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Sync Designer in VS2008 SP1</title><link>http://blogs.msdn.com/synchronizer/archive/2008/05/30/sync-designer-in-vs2008-sp1.aspx</link><pubDate>Fri, 30 May 2008 23:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8564314</guid><dc:creator>Rafik</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/synchronizer/comments/8564314.aspx</comments><wfw:commentRss>http://blogs.msdn.com/synchronizer/commentrss.aspx?PostID=8564314</wfw:commentRss><description>
&lt;p&gt;I am sure you already know that SP1 Beta for Visual Studio 2008 is available to &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=CF99C752-1391-4BC3-BABC-86BC0B9E8E5A&amp;amp;displaylang=en" class="" mce_href="http://www.microsoft.com/downloads/details.aspx?familyid=CF99C752-1391-4BC3-BABC-86BC0B9E8E5A&amp;amp;displaylang=en"&gt;download&lt;/a&gt;. There are plenty of enhancements that I am sure the VS folks are covering all over the net with different blogs. As a sync guy, I am on the lookout for everything new in sync and SP1 has made a lot of improvement to the Sync Designer introduced for the first time with Visual Studio 2008.&lt;/p&gt;

&lt;p&gt;The designer was revamped quite a bit and it much more developer friendly now. The biggest improvement however is the ability to tap into SQL Server 2008 Change Tracking feature. The designer gives you the ability to use Change Tracking instead of the traditional trigger based model (a.k.a. coupled tracking as tracking columns are coupled with data columns in the base table).&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://blogs.msdn.com/synchronizer/attachment/8564314.ashx" style="width: 516px; height: 383px;" mce_src="http://blogs.msdn.com/synchronizer/attachment/8564314.ashx" width="516" align="middle" height="383"&gt;&lt;/p&gt;

&lt;p&gt;Under the covers, the Sync Designer uses a newer version of the SqlAdapterBuilder to generate the adapter that works against SQL Change Tracking. The new class is part of the newer beta bits of the Sync Services for ADO.NET. Developers can dynamically generate the commands be configuring the builder to run against an instance of SQL Server 2008 with Change Tracking enabled on the target table. &lt;/p&gt;

&lt;p&gt;Guy Burstein has written a &lt;a href="http://blogs.microsoft.co.il/blogs/bursteg/archive/2008/05/12/sync-services-for-ado-net-with-sql-server-2008-change-tracking.aspx" class="" mce_href="http://blogs.microsoft.co.il/blogs/bursteg/archive/2008/05/12/sync-services-for-ado-net-with-sql-server-2008-change-tracking.aspx"&gt;really good post&lt;/a&gt; on the new changes in the sync designer with nice snapshots including the one I posted here. Make sure to check it out.&lt;/p&gt;

&lt;p&gt;&lt;span class="Apple-style-span" style="word-spacing: 0px; font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2;"&gt;Update: Just to let you know, I left Microsoft to start a new company, &lt;b&gt;&lt;a href="http://www.raveable.com" title="raveable hotel reviews" mce_href="http://www.raveable.com"&gt;Raveable Hotel Reviews.&lt;/a&gt;&lt;/b&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;See Examples:&amp;nbsp;&lt;b&gt;&lt;a href="http://www.raveable.com/sc/myrtle-beach/romantic-hotels-in-myrtle-beach/l6180c2" mce_href="http://www.raveable.com/sc/myrtle-beach/romantic-hotels-in-myrtle-beach/l6180c2"&gt;Romantic Hotels in Myrtle Beach&lt;/a&gt;&lt;/b&gt;, &lt;b&gt;&lt;a href="http://www.raveable.com/wa/seattle/top-10-hotels-in-seattle/l7344c3" mce_href="http://www.raveable.com/wa/seattle/top-10-hotels-in-seattle/l7344c3"&gt;Top 10 Hotels in Seattle&lt;/a&gt;&lt;/b&gt;, &lt;a href="http://www.raveable.com/fl/miami/best-hotels-in-miami/l1644c1" title="best hotels in miami" mce_href="http://www.raveable.com/fl/miami/best-hotels-in-miami/l1644c1"&gt;&lt;b&gt;Best Hotels in Miam&lt;/b&gt;i&lt;/a&gt;, &lt;b&gt;&lt;a href="http://www.raveable.com/ca/san-francisco/best-hotels-in-san-francisco/l717c1" title="best hotels in san francisco" mce_href="http://www.raveable.com/ca/san-francisco/best-hotels-in-san-francisco/l717c1"&gt;Best Hotels in San Francisco&lt;/a&gt;&lt;/b&gt;, &lt;b&gt;&lt;a href="http://www.raveable.com/hotels-with-jacuzzi" title="hotels with jacuzzi" mce_href="http://www.raveable.com/hotels-with-jacuzzi"&gt;Hotels with in-room jacuzzi&lt;/a&gt;&lt;/b&gt; and &lt;span class="Apple-converted-space"&gt;&lt;b&gt;&lt;a href="http://www.raveable.com/ca/los-angeles/5-star-hotels-in-los-angeles/l519c15" title="5 star hotels in los angeles" mce_href="http://www.raveable.com/ca/los-angeles/5-star-hotels-in-los-angeles/l519c15"&gt;5 Star Hotels in Los Angeles&lt;/a&gt;&lt;/b&gt;. Your feedback is welcome on &lt;a href="http://twitter.com/raveable" mce_href="http://twitter.com/raveable"&gt;twitter.com/raveable&lt;/a&gt;, &lt;a href="http://blog.raveable.com" title="raveable hotel reviews blog" mce_href="http://blog.raveable.com"&gt;raveable blog&lt;/a&gt;.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-converted-space"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="word-spacing: 0px; font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2;"&gt;I am not actively blogging about Sync Technologies. Please see &lt;a href="http://blogs.msdn.com/sync/" class="" mce_href="http://blogs.msdn.com/sync/"&gt;Sync Team Blog&lt;/a&gt; for more updated content.&amp;nbsp;&lt;/span&gt;&lt;br&gt;&lt;/p&gt;

&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8564314" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/synchronizer/attachment/8564314.ashx" length="23903" type="image/jpeg" /><category domain="http://blogs.msdn.com/synchronizer/archive/tags/SQL2008/default.aspx">SQL2008</category><category domain="http://blogs.msdn.com/synchronizer/archive/tags/SqlChangeTracking/default.aspx">SqlChangeTracking</category><category domain="http://blogs.msdn.com/synchronizer/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/synchronizer/archive/tags/SyncDesigner/default.aspx">SyncDesigner</category></item><item><title>Metadata is the Hart and Sole of Peer Sync</title><link>http://blogs.msdn.com/synchronizer/archive/2008/05/29/metadata-is-the-hart-and-sole-of-peer-sync.aspx</link><pubDate>Fri, 30 May 2008 01:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8560445</guid><dc:creator>Rafik</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/synchronizer/comments/8560445.aspx</comments><wfw:commentRss>http://blogs.msdn.com/synchronizer/commentrss.aspx?PostID=8560445</wfw:commentRss><description>&lt;p&gt;Occasionally, I receive questions about using SQL Change Tracking with PeerSyncProvider. People who examine SQL Change Tracking in preview version of SQL Server 2008 have&amp;nbsp;become fans rather quickly and see the value of using it. Using change tracking with ServerSyncProvider scenarios is a piece of cake and will get easier with the VS2008 SP1. Now how can you do the same with PeerSyncProvider?&lt;br&gt;The short answer is that it is not so easy. Not as easy as with ServerSyncProvider. The reasons might not be so obvious and I see many attempts of writing the commands&amp;nbsp;for&amp;nbsp;PeerSyncProvider adapters to work against SQL Change Tracking. While it might work for very limited scenarios, it is largely incorrect. &lt;/p&gt;
&lt;p&gt;Again, the question is why?&lt;/p&gt;
&lt;p&gt;Well, let’s think a little bit about the following SyncAdapter commands for the PeerSyncProvider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;InsertMetadataCommand&lt;/li&gt;
&lt;li&gt;UpdateMetadataCommand&lt;/li&gt;
&lt;li&gt;DeleteMetadataCommand&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Notice that these commands are intended to make changes to the tracking metadata. That’s rather interesting and clearly different from the commands you supply to for ServerSyncProvider. Now it is becoming clear that we have a problem since SQL Change Tracking metadata (i.e. CHANGETABLE) are all read-only! &lt;/p&gt;
&lt;p&gt;&lt;b&gt;General Purpose Tracking Infrastructure&lt;br&gt;&lt;br&gt;&lt;/b&gt;Remember that SQL Change Tracking is a general purpose tracking mechanism. You enable change tracking for a table with the sole purpose to be able to ask “what have changed since given version?” If applications are allowed to make changes to the metadata then this question is not reliable and thus useless. Making change tracking metadata read only makes all the sense in the world for its general purpose nature.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Direct Metadata Manipulation&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;An obvious question here is: Why make direct changes to the metadata? Changes to the base table will be reflected in the CHANGETABLE, wouldn’t that achieve the same effect?&lt;br&gt;Well, for peer to peer data synchronization… you need more control than that. Let’s take the following two cases:&lt;br&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Synchronizing Deletes&lt;/b&gt;&lt;br&gt;&lt;br&gt;Let’s consider the following example, three nodes A, B, C. The nodes are connected as shown in the diagram. Follow the following scenario:&lt;br&gt;&lt;br&gt;&lt;img src="http://blogs.msdn.com/synchronizer/attachment/8560445.ashx" style="width: 207px; height: 189px;" mce_src="http://blogs.msdn.com/synchronizer/attachment/8560445.ashx" align="middle" height="189" width="207"&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;ol&gt;
&lt;ol&gt;
&lt;li&gt;Make a change R on node A&lt;/li&gt;
&lt;li&gt;Let A sync with B, B now has R&lt;/li&gt;
&lt;li&gt;B deletes R&lt;/li&gt;
&lt;li&gt;Let B sync with C. B will send the deleted row metadata to C&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;As B received the metadata for the deleted row, it needs to persist is. R never make it to B thus a normal delete command won’t generate the metadata we desire as it simply won’t do anything. &lt;br&gt;&lt;br&gt;As a side note, the delete metadata must be persisted on B. Since B could be connected to another node (A, for example) which have R and thus needs to pass on the delete during subsequent sync. In P2P environment, one cannot make assumption about the other nodes and must maintain metadata for every deletes.&lt;br&gt;&lt;br&gt;At a first glance one can come up with a clever work around for this scenario which is insert R then delete it right away. SQL Change tracking should record that, right? That’s right but the workaround cannot survive two or more tables with PK-FK relations which is the reality of most databases. Thus this workaround is short lived.&lt;/p&gt;&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Resolving Conflicts&lt;/b&gt;&lt;br&gt;&lt;br&gt;When conflicts are detected and a winner is chosen, one needs to update the metadata such that this winner will propagate across the topology of nodes. That said, the version of the row needs to be pumped. Now consider the case where the local row was selected as the winner. With SQL Change Tracking, there is no way to make changes to the version as the metadata is not editable.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;My point in this post is to answer a common question and illustrate the underlying technical reasons behind the limitation. That being said, you can still leverage SQL Change Tracking for Peer Scenarios albeit you need to use a side table to store the changes to the metadata. I am sure some of the readers will find this as a worthwhile challenge to tackle. Happy Sync’ing!&lt;br&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Update: Just to let you know, I left Microsoft to start a new company, &lt;b&gt;&lt;a href="http://www.raveable.com" class="" mce_href="http://www.raveable.com"&gt;Raveable Hotel Reviews&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;. See examples: &lt;b&gt;&lt;a href="http://www.raveable.com/sc/myrtle-beach/top-10-hotels-in-myrtle-beach/l6180c3" mce_href="http://www.raveable.com/sc/myrtle-beach/top-10-hotels-in-myrtle-beach/l6180c3"&gt;Top 10 Hotels in Myrtle Beach&lt;/a&gt;, &lt;a href="http://www.raveable.com/ny/new-york-city/best-hotels-in-new-york-city/l5039c1" title="best hotels in NYC" mce_href="http://www.raveable.com/ny/new-york-city/best-hotels-in-new-york-city/l5039c1"&gt;Best Hotels in New York City&lt;/a&gt;, &lt;a href="http://www.raveable.com/wa/seattle/romantic-hotels-in-seattle/l7344c2" mce_href="http://www.raveable.com/wa/seattle/romantic-hotels-in-seattle/l7344c2"&gt;Romantic Hotels in Seattle&lt;/a&gt;&lt;/b&gt;, &lt;b&gt;&lt;a href="http://www.raveable.com/hotels-with-kitchen" title="hotels with kitchen or kitchenette" mce_href="http://www.raveable.com/hotels-with-kitchen"&gt;Hotels with a kitchen or kitchenette&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://www.raveable.com/ca/san-francisco/top-10-hotels-in-san-francisco/l717c3" title="top 10 hotels in san francisco" mce_href="http://www.raveable.com/ca/san-francisco/top-10-hotels-in-san-francisco/l717c3"&gt;Top 10 Hotels in San Francisco&lt;/a&gt;&lt;/b&gt;. Your feedback is welcome on &lt;a href="http://twitter.com/raveable" mce_href="http://twitter.com/raveable"&gt;twitter.com/raveable&lt;/a&gt;, &lt;a href="http://blog.raveable.com" mce_href="http://blog.raveable.com"&gt;raveable blog&lt;/a&gt;.&lt;br&gt; &lt;br&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;I am not actively blogging about Sync Technologies. Please see &lt;a href="http://blogs.msdn.com/sync/" class="" mce_href="http://blogs.msdn.com/sync/"&gt;Sync Team Blog&lt;/a&gt; for more updated content.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8560445" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/synchronizer/attachment/8560445.ashx" length="5042" type="image/jpeg" /><category domain="http://blogs.msdn.com/synchronizer/archive/tags/p2p/default.aspx">p2p</category><category domain="http://blogs.msdn.com/synchronizer/archive/tags/SQL2008/default.aspx">SQL2008</category></item><item><title>New Release: Windows Mobile Line of Business Solution Accelerator 2008</title><link>http://blogs.msdn.com/synchronizer/archive/2008/03/16/new-release-windows-mobile-line-of-business-solution-accelerator-2008.aspx</link><pubDate>Sun, 16 Mar 2008 22:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8272822</guid><dc:creator>Rafik</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/synchronizer/comments/8272822.aspx</comments><wfw:commentRss>http://blogs.msdn.com/synchronizer/commentrss.aspx?PostID=8272822</wfw:commentRss><description>&lt;p&gt;Rob Tiffany, &lt;a href="http://blogs.msdn.com/robtiffany/default.aspx" class="" mce_href="http://blogs.msdn.com/robtiffany/default.aspx"&gt;the mobile accelerator guy&lt;/a&gt;, just announced the new release of &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=428E4C3D-64AD-4A3D-85D2-E711ABC87F04&amp;amp;displaylang=en" class="" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=428E4C3D-64AD-4A3D-85D2-E711ABC87F04&amp;amp;displaylang=en"&gt;Windows Mobile Line of Business Solution Accelerator 2008&lt;/a&gt;. It a collection of windows&amp;nbsp;mobile centric samples that showcase different new technologies and help developers greatly accelerate building their applications, thus the name “Accelerator”. Rob also has a great &lt;a href="http://blogs.msdn.com/robtiffany/default.aspx" class="" mce_href="http://blogs.msdn.com/robtiffany/default.aspx"&gt;blog&lt;/a&gt; that I read regularly. Here is a quick overview of what this new release contains:&lt;/p&gt;&lt;p&gt;&lt;img src="http://blogs.msdn.com/synchronizer/attachment/8272822.ashx" style="width: 194px; height: 323px;" mce_src="http://blogs.msdn.com/synchronizer/attachment/8272822.ashx" align="middle" height="323" hspace="150" width="194"&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Adapt your App&lt;/b&gt;&lt;br&gt;Create a single binary that runs unchanged on Windows Mobile Standard or Pro, Portrait or Landscape, Rectangle or Square.&amp;nbsp; No more wasting time building separate executables to accommodate different screen sizes or input methods.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Sync Services for ADO.NET&lt;/b&gt; &lt;br&gt;Synchronize your data between SQL Server 2008 and SQL Server Compact 3.5 using the new Sync Framework.&amp;nbsp; Keep all your occasionally-connected mobile workers on the same page.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Windows Communication Foundation (WCF) Store and Forward&lt;/b&gt; &lt;br&gt;Reliably push messages to servers or other devices via Exchange Server 2007.&amp;nbsp; Programmatically notify peer devices that they have new orders waiting for them and need to sync.&lt;/li&gt;&lt;li&gt;&lt;b&gt;MapPoint&lt;br&gt;&lt;/b&gt;Guide delivery drivers to their customers via either the shortest or quickest route.&amp;nbsp; Integrated mapping means you’ll never get lost again.&lt;/li&gt;&lt;li&gt;&lt;b&gt;LINQ&lt;br&gt;&lt;/b&gt;Use the new Language Integrated Query to filter results from Generic Object Collections.&amp;nbsp; Query both your objects and XML using a familiar, SQL-like syntax to boost developer productivity.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Custom Controls&lt;/b&gt; &lt;br&gt;Capture signatures and dazzle your end-users with 3D and Alpha-blended controls that alter their behavior depending on the platform they’re running on.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Managed Stored Procedures and Triggers&lt;/b&gt; &lt;br&gt;The pluggable data layer allows you to say goodbye to compiling Dynamic SQL inside your code and fires events to react to INSERT, UPDATE, and DELETE operations.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Notifications and Online Help&lt;br&gt;&lt;/b&gt;Formerly only supported on Pro, say hello to Popup Notifications and Online Help on Standard.&amp;nbsp; Popup Notifications, also known as “toast,” display an HTML message and then disappear after a pre-determined amount of time.&amp;nbsp; Using Online Help on every screen reduces your application training costs.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Language Switching and Localization&lt;/b&gt; &lt;br&gt;Change Language/Regional Settings inside your app and watch text and Online Help speak a different language.&amp;nbsp; Don’t wait until your application is finished to realize that it needs to be world-ready.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Time to Market&lt;br&gt;&lt;/b&gt;Stop reinventing the wheel and use this Accelerator as the foundation for your next Windows Mobile development effort.&amp;nbsp; If you don’t want to use the whole thing, pick and choose the components that are the best fit for your project.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I am playing with it right now.. pretty cool stuff. &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=428E4C3D-64AD-4A3D-85D2-E711ABC87F04&amp;amp;displaylang=en" class="" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=428E4C3D-64AD-4A3D-85D2-E711ABC87F04&amp;amp;displaylang=en"&gt;&lt;b&gt;Download Now&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Update: Just to let you know, I left Microsoft to start a new company, &lt;b&gt;&lt;a href="http://www.raveable.com" class="" mce_href="http://www.raveable.com"&gt;Raveable Hotel Reviews&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;. See examples: &lt;b&gt;&lt;a href="http://www.raveable.com/sc/myrtle-beach/top-10-hotels-in-myrtle-beach/l6180c3" mce_href="http://www.raveable.com/sc/myrtle-beach/top-10-hotels-in-myrtle-beach/l6180c3"&gt;Top 10 Hotels in Myrtle Beach&lt;/a&gt;, &lt;a href="http://www.raveable.com/ny/new-york-city/best-hotels-in-new-york-city/l5039c1" title="best hotels in nyc" mce_href="http://www.raveable.com/ny/new-york-city/best-hotels-in-new-york-city/l5039c1"&gt;Best Hotels in NYC&lt;/a&gt;, &lt;a href="http://www.raveable.com/wa/seattle/romantic-hotels-in-seattle/l7344c2" mce_href="http://www.raveable.com/wa/seattle/romantic-hotels-in-seattle/l7344c2"&gt;Romantic Hotels in Seattle&lt;/a&gt;&lt;/b&gt;, &lt;b&gt;&lt;a href="http://www.raveable.com/fl/orlando/kid-friendly-hotels-in-orlando/l1653c16" title="kid friendly hotels in orlando" mce_href="http://www.raveable.com/fl/orlando/kid-friendly-hotels-in-orlando/l1653c16"&gt;Kid Friendly Hotels in Orlando&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://www.raveable.com/ca/san-diego/top-10-hotels-in-san-diego/l568c3" title="top 10 hotels in san diego" mce_href="http://www.raveable.com/ca/san-diego/top-10-hotels-in-san-diego/l568c3"&gt;Top 10 Hotels in San Diego&lt;/a&gt;&lt;/b&gt;. Your feedback is welcome on &lt;a href="http://twitter.com/raveable" mce_href="http://twitter.com/raveable"&gt;twitter.com/raveable&lt;/a&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"&gt;,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://blog.raveable.com/" title="raveable blog" mce_href="http://blog.raveable.com" style="color: rgb(0, 101, 226);"&gt;raveable blog&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br&gt; &lt;br&gt;&lt;/p&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;I am not actively blogging about Sync Technologies. Please see &lt;a href="http://blogs.msdn.com/sync/" class="" mce_href="http://blogs.msdn.com/sync/"&gt;Sync Team Blog&lt;/a&gt; for more updated content.&lt;/font&gt;&lt;/font&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8272822" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/synchronizer/attachment/8272822.ashx" length="14906" type="image/jpeg" /><category domain="http://blogs.msdn.com/synchronizer/archive/tags/SQLCE/default.aspx">SQLCE</category><category domain="http://blogs.msdn.com/synchronizer/archive/tags/demos/default.aspx">demos</category><category domain="http://blogs.msdn.com/synchronizer/archive/tags/SQL2008/default.aspx">SQL2008</category><category domain="http://blogs.msdn.com/synchronizer/archive/tags/mobile/default.aspx">mobile</category><category domain="http://blogs.msdn.com/synchronizer/archive/tags/SQL2005/default.aspx">SQL2005</category></item><item><title>SQL Server Change Tracking vs min_active_rowversion()</title><link>http://blogs.msdn.com/synchronizer/archive/2008/02/06/sql-server-change-tracking-vs-min-active-rowversion.aspx</link><pubDate>Wed, 06 Feb 2008 23:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7497291</guid><dc:creator>Rafik</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/synchronizer/comments/7497291.aspx</comments><wfw:commentRss>http://blogs.msdn.com/synchronizer/commentrss.aspx?PostID=7497291</wfw:commentRss><description>&lt;p&gt;In a bit &lt;a href="http://blogs.msdn.com/synchronizer/archive/2007/02/20/a-nice-gift-from-sql-server-2005-sp2-to-sync-developers.aspx" class="" mce_href="http://blogs.msdn.com/synchronizer/archive/2007/02/20/a-nice-gift-from-sql-server-2005-sp2-to-sync-developers.aspx"&gt;old post&lt;/a&gt; I wrote about min_active_rowversion() as the best way to get the new anchor showing you that @@DBTS has its flaws and thus should be avoided. Min_active_rowversion() was introduced in SP2 for SQL Server 2005. If you have code that still uses @@DBTS, you are running the risk of missing changes from the server, do yourself a favor and change it now.&lt;br&gt;&amp;nbsp;&lt;br&gt;Despite the a fact that min_active_rowversion() addressed a major problem for sync developers, it did not solve it. Check out the diagram below:&lt;/p&gt;&lt;p mce_keep="true"&gt;&lt;img src="http://blogs.msdn.com/synchronizer/attachment/7497291.ashx" title="Timestamp based versioning" style="width: 500px; height: 211px;" alt="Timestamp based versioning" mce_src="http://blogs.msdn.com/synchronizer/attachment/7497291.ashx" height="211" width="500"&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;T1 made a change to R1 row which received a timestamp of 50. The transaction did not commit and when you call min_active_rowversion() you will end up with the value of 50. That’s quite what we expect; sync should then synchronize up to 50-1 = 49 anchor. So what if we have few more transactions, like T2, that started after T1 and committed soon thereafter. If T1 did not commit, then min_active_rowversion() will remain at 50 until T1 commits. This could be a problem in many situations. You see, min_active_rowversion() did address the problem but did not solve it. Still much better that @@DBTS.&lt;br&gt;&amp;nbsp;&lt;br&gt;If we dig deeper into what the problem really is, we find that timestamp value is assigned at the statement execution time and not at transaction commit time. Had the row version be assigned at the transaction commit time, we would have a real solution for this problem. Fortunately, that’s exactly what SQL Server Change Tracking does for you in SQL Server 2008. Each transaction gets a version at the commit time and all the rows affected by the transaction will get that version. Check out the diagram below:&lt;/p&gt;&lt;p&gt;&lt;img src="http://blogs.msdn.com/synchronizer/attachment/7229879.ashx" title="SQL Change Tracking Versioning Scheme" style="width: 500px; height: 246px;" alt="SQL Change Tracking Versioning Scheme" mce_src="http://blogs.msdn.com/synchronizer/attachment/7229879.ashx" height="246" width="500"&gt;&lt;br&gt;&amp;nbsp;&lt;br&gt;SQL Change Tracking will assign version at transaction commit time and all the rows affected by the transaction will have the same version. Now, when you try to sync before T1 or T2 starts, you should get 49, whereas after T2 commits, you will receive a value of 50. You see, now you are not stuck waiting for that long transaction to commits to sync changes that happened in subsequent transactions. Pretty cool, huh! …&lt;/p&gt;&lt;p&gt;SQL Server Change Tracking is a reliable way to track changes and designed from the ground up to address the needs of data synchronization applications! &lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Update: Just to let you know, I left Microsoft to start a new company,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;a href="http://www.raveable.com/" class="" mce_href="http://www.raveable.com" style="color: rgb(0, 101, 226);"&gt;Raveable Hotel Reviews&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;. See examples:&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;a href="http://www.raveable.com/sc/myrtle-beach/top-10-hotels-in-myrtle-beach/l6180c3" mce_href="http://www.raveable.com/sc/myrtle-beach/top-10-hotels-in-myrtle-beach/l6180c3" style="color: rgb(0, 101, 226);"&gt;Top 10 Hotels in Myrtle Beach&lt;/a&gt;,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.raveable.com/ny/new-york-city/best-hotels-in-new-york-city/l5039c1" title="best hotels in NYC" mce_href="http://www.raveable.com/ny/new-york-city/best-hotels-in-new-york-city/l5039c1" style="color: rgb(0, 101, 226);"&gt;Best Hotels in New York City&lt;/a&gt;,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.raveable.com/wa/seattle/romantic-hotels-in-seattle/l7344c2" mce_href="http://www.raveable.com/wa/seattle/romantic-hotels-in-seattle/l7344c2" style="color: rgb(0, 101, 226);"&gt;Romantic Hotels in Seattle&lt;/a&gt;&lt;/b&gt;,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;a href="http://www.raveable.com/hotels-with-kitchen" title="hotels with kitchen or kitchenette" mce_href="http://www.raveable.com/hotels-with-kitchen" style="color: rgb(0, 101, 226);"&gt;Hotels with a kitchen or kitchenette&lt;/a&gt;&lt;/b&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;and&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;a href="http://www.raveable.com/ca/san-francisco/top-10-hotels-in-san-francisco/l717c3" title="top 10 hotels in san francisco" mce_href="http://www.raveable.com/ca/san-francisco/top-10-hotels-in-san-francisco/l717c3" style="color: rgb(0, 101, 226);"&gt;Top 10 Hotels in San Francisco&lt;/a&gt;&lt;/b&gt;. Your feedback is welcome on&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://twitter.com/raveable" mce_href="http://twitter.com/raveable" style="color: rgb(0, 101, 226);"&gt;twitter.com/raveable&lt;/a&gt;,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://blog.raveable.com/" mce_href="http://blog.raveable.com" style="color: rgb(0, 101, 226);"&gt;raveable blog&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-converted-space"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="word-spacing: 0px; font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2;"&gt;I am not actively blogging about Sync Technologies. Please see &lt;a href="http://blogs.msdn.com/sync/" class="" mce_href="http://blogs.msdn.com/sync/"&gt;Sync Team Blog&lt;/a&gt; for more updated content. &lt;br&gt;&lt;/span&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7497291" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/synchronizer/attachment/7497291.ashx" length="10864" type="image/jpeg" /><category domain="http://blogs.msdn.com/synchronizer/archive/tags/SQL2008/default.aspx">SQL2008</category><category domain="http://blogs.msdn.com/synchronizer/archive/tags/SqlChangeTracking/default.aspx">SqlChangeTracking</category></item><item><title>Katmai is Slowly Becoming the Best Platform for Building Offline Applications</title><link>http://blogs.msdn.com/synchronizer/archive/2007/06/12/katmai-is-slowly-becoming-the-best-platform-for-building-offline-applications.aspx</link><pubDate>Wed, 13 Jun 2007 01:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3257646</guid><dc:creator>Rafik</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/synchronizer/comments/3257646.aspx</comments><wfw:commentRss>http://blogs.msdn.com/synchronizer/commentrss.aspx?PostID=3257646</wfw:commentRss><description>&lt;p&gt;Katmai is the code name of the next release of SQL Server slated for next year. Last week, CTP3 was released to public, more info &lt;a href="https://connect.microsoft.com/SQLServer/content/content.aspx?ContentID=5395" class="" mce_href="https://connect.microsoft.com/SQLServer/content/content.aspx?ContentID=5395"&gt;here&lt;/a&gt;. The new features included in CTP3 are eye popping especially if you are in the sync space. You might think that Sync Services was the driver for many of these features, however, that is not true. CTP3 has new components that I think are very useful and will help developers build offline application faster. That’s not to say that there won’t be sync specific features coming up later on, but I will refrain from mentioning anything now and wait till things unfold. For now, let’s talk about CTP3 features:&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Change Data Capture (CDC)&lt;/b&gt;&lt;/p&gt;&lt;b&gt;
&lt;/b&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;/b&gt;Change Data Capture (CDC) is a generic component that will track database changes asynchronously and expose the changes through a relational interface which can be consumed easily. &lt;/li&gt;
&lt;li&gt;Through this interface, users can very easily track changes based on their specific requirements and consume the change data using T-SQL or other data access methods.&lt;/li&gt;
&lt;li&gt;CDC can also be used as for building download-only offline application. Why not upload too? Because the tracking is asynchronous, thus you cannot rely on the metadata for conflict detection and resolution. &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;MERGE&amp;nbsp; SQL Statement &lt;/b&gt;&lt;/p&gt;&lt;b&gt;
&lt;/b&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;/b&gt;Common data warehouse scenarios require developers to either insert information or update information. SQL Server 2008 will provide new statements within the SQL language to enable developers to provide this functionality with a single statement.&lt;/li&gt;
&lt;li&gt;This is very useful for writing sync commands or stored procedure; you don’t need to write a separate command or sproc for insert and update. One merge statement would work for both.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;There are more features in the CTP3, but I am only interested in those which make sync developers live easier. It seems to me that build up of features that are useful for developing sync application will make Katmai the best platform for authoring offline applications. Keep an eye on it!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="word-spacing: 0px; font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2;"&gt;Update: Just to let you know, I left Microsoft to start a new company,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;a href="http://www.raveable.com/" title="raveable hotel reviews" mce_href="http://www.raveable.com" style="color: rgb(0, 101, 226);"&gt;Raveable Hotel Reviews.&lt;/a&gt;&lt;/b&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;See Examples:&amp;nbsp;&lt;b&gt;&lt;a href="http://www.raveable.com/sc/myrtle-beach/romantic-hotels-in-myrtle-beach/l6180c2" mce_href="http://www.raveable.com/sc/myrtle-beach/romantic-hotels-in-myrtle-beach/l6180c2" style="color: rgb(0, 101, 226);"&gt;Romantic Hotels in Myrtle Beach&lt;/a&gt;&lt;/b&gt;,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;a href="http://www.raveable.com/wa/seattle/top-10-hotels-in-seattle/l7344c3" mce_href="http://www.raveable.com/wa/seattle/top-10-hotels-in-seattle/l7344c3" style="color: rgb(0, 101, 226);"&gt;Top 10 Hotels in Seattle&lt;/a&gt;&lt;/b&gt;,&lt;a href="http://www.raveable.com/fl/miami/best-hotels-in-miami/l1644c1" title="best hotels in miami" mce_href="http://www.raveable.com/fl/miami/best-hotels-in-miami/l1644c1" style="color: rgb(0, 101, 226);"&gt;&lt;b&gt;Best Hotels in Miam&lt;/b&gt;i&lt;/a&gt;,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;a href="http://www.raveable.com/ca/san-francisco/best-hotels-in-san-francisco/l717c1" title="best hotels in san francisco" mce_href="http://www.raveable.com/ca/san-francisco/best-hotels-in-san-francisco/l717c1" style="color: rgb(0, 101, 226);"&gt;Best Hotels in San Francisco&lt;/a&gt;&lt;/b&gt;,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;a href="http://www.raveable.com/hotels-with-jacuzzi" title="hotels with jacuzzi" mce_href="http://www.raveable.com/hotels-with-jacuzzi" style="color: rgb(0, 101, 226);"&gt;Hotels with in-room jacuzzi&lt;/a&gt;&lt;/b&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;and&lt;span class="Apple-converted-space"&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&lt;b&gt;&lt;a href="http://www.raveable.com/ca/los-angeles/best-hotels-in-los-angeles/l519c1" title="best hotels in los angeles" mce_href="http://www.raveable.com/ca/los-angeles/best-hotels-in-los-angeles/l519c1" style="color: rgb(0, 101, 226);"&gt;Best Hotels in Los Angeles&lt;/a&gt;&lt;/b&gt;. Your feedback is welcome on&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://twitter.com/raveable" mce_href="http://twitter.com/raveable" style="color: rgb(0, 101, 226);"&gt;twitter.com/raveable&lt;/a&gt;,&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://blog.raveable.com/" title="raveable hotel reviews blog" mce_href="http://blog.raveable.com" style="color: rgb(0, 101, 226);"&gt;raveable blog&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;br&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3257646" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/synchronizer/archive/tags/SQL2008/default.aspx">SQL2008</category></item></channel></rss>