<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rob Tiffany &#187; Sync</title>
	<atom:link href="http://robtiffany.com/tag/sync/feed/" rel="self" type="application/rss+xml" />
	<link>http://robtiffany.com</link>
	<description>Author, Mobility Strategist at Microsoft, Speaker, Advisor, Technology Executive, Former Navy Submariner</description>
	<lastBuildDate>Wed, 16 May 2012 01:19:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Simple Mobile Sync with SQL Server 2012 and SQL Server Compact: Episode III</title>
		<link>http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-iii/</link>
		<comments>http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-iii/#comments</comments>
		<pubDate>Sat, 21 Apr 2012 18:08:50 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Sync]]></category>
		<category><![CDATA[RDA]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Compact]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=1758</guid>
		<description><![CDATA[Back in my first article, I showed you where to find Microsoft&#8217;s latest updates to the SQLCE and RDA technologies so you can begin synchronizing data with the new SQL Server 2012 (Denali) database.  Just imagine, you now have mobile &#8230; <a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-iii/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="Episode I" href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/" target="_blank">Back in my first article</a>, I showed you where to find Microsoft&#8217;s latest updates to the SQLCE and RDA technologies so you can begin synchronizing data with the new <em><strong>SQL Server 2012</strong></em> (Denali) database.  Just imagine, you now have mobile sync components that give you the flexibility to to work with SQL Server 7, 2000, 2005, 2008, and 2012 from your devices.  I&#8217;d say you have both your legacy and state-of-the-art bases covered.  <a title="Episode II" href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-ii/" target="_blank">In the second article </a>you built both the server and client databases so now you&#8217;re ready to sync some data.</p>
<p>As I may have mentioned before, Remote Data Access (RDA) is the fastest and easiest way for your mobile devices to synchronize data with SQL Server - and then take it offline in SQL Server Compact.  It works on the simple premise of pulling and pushing data to and from SQL Server via the Server Agent which is running on the middle-tier IIS application server.  The Server Agent is able to communicate with SQL Server via an OLEDB connection string which is passed to it from your device application code:</p>
<p>string rdaConnection = @&#8221;Provider=SQLOLEDB;&#8221; +</p>
<p style="padding-left: 180px;">&#8220;Data Source=Machinename\\SQLExpress;&#8221; +</p>
<p style="padding-left: 180px;">&#8220;Initial Catalog = ContosoBottling;&#8221; +</p>
<p style="padding-left: 180px;"><span style="font-family: Consolas; font-size: medium;"><span style="font-family: Consolas; font-size: medium;">&#8220;User Id = sa;&#8221; +</span></span></p>
<p style="padding-left: 180px;">&#8220;Password = P@ssw0rd;&#8221;;</p>
<p>You&#8217;ll use this connection string over and over whether your pulling or pushing data so keep it handy.  Data is retrieved on a table-by-table basis using the Pull method of the SqlCeRemoteDataAccess object.  You would put the example code below in a method to retrieve a list of Distribution Centers from SQL Server:</p>
<p>using (SqlCeRemoteDataAccess rda = new SqlCeRemoteDataAccess())</p>
<p>{</p>
<p style="padding-left: 30px;">rda.InternetUrl = &#8220;http://localhost/rda/sqlcesa35.dll&#8221;;</p>
<p style="padding-left: 30px;">rda.LocalConnectionString = &#8220;Data Source=ContosoBottling.sdf&#8221;;</p>
<p style="padding-left: 30px;">//Drop Table</p>
<p style="padding-left: 30px;">DropTable(&#8220;DistributionCenters&#8221;, rda.LocalConnectionString);</p>
<p style="padding-left: 30px;">//Pull Table</p>
<p style="padding-left: 30px;">rda.Pull(&#8220;DistributionCenters&#8221;,</p>
<p style="padding-left: 90px;">&#8220;SELECT DistributionCenterId, Name FROM DistributionCenters&#8221;,</p>
<p style="padding-left: 90px;">rdaConnection,</p>
<p style="padding-left: 90px;">RdaTrackOption.TrackingOnWithIndexes,</p>
<p style="padding-left: 90px;">&#8220;ErrorTable&#8221;);</p>
<p>}</p>
<p>Notice that the mobile device connects to the Server Agent on IIS by pointing to it via a URL.  After that, you assign a connection string that points to the local path of your SQLCE database.  For now, I want you to ignore the DropTable method, because I&#8217;ll cover it in a sec.  The Pull method is where the magic happens.  In the first parameter, you pass in the name of the local table you want to create as an argument.  This typically matches the name of the table you&#8217;re retrieving from SQL Server.  In the second parameter, you pass a standard SQL statement or call to stored procedure.  This is how you filter the data you want to download to the device.  I don&#8217;t want to see any SELECT *&#8217;s and I do expect to see appropriate use of the WHERE clause to reduce the amount of data downloaded.  Remember, this filtering allows you download lookup tables that apply to everyone, as well as tables with data that uniquely pertain to a specific user.  In the next parameter you pass in the OLEDB connection string I displayed at the beginning of the article.  The following parameter is where you decide if you want SQLCE to track changes or not, as well as whether to create the same indexes found on the server.  Indexes are typically always a good thing except for very small tables.  Download-only data won&#8217;t need change-tracking but your transactional stuff will.  This amazing feature allows offline users of your app to keep working in the absence of a network connection.  In the last parameter you specify the name of a table to auto-create to track any sync errors that may arise.</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-iii/serverexplorer/" rel="attachment wp-att-1787"><img class="alignleft size-full wp-image-1787" title="ServerExplorer" src="http://robtiffany.com/wp-content/uploads/2012/04/ServerExplorer.png" alt="Server Explorer" width="243" height="205" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>After executing this code, I connected to the new SQLCE ContosoBottling bottling database on my Windows laptop using the Server Explorer in Visual Studio as shown above.  You can see that the ErrorTable and DistributionCenters tables were created locally.</p>
<p>So now let&#8217;s talk about that DropTable method.  RDA works on the premise of downloading complete table snapshots.  Unlike Merge Replication that downloads incremental changes from SQL Server, RDA re-downloads the entire table in order to make SQLCE aware of any server changes.  The catch is that you have to drop an existing local table before downloading an updated version from SQL Server.  Here&#8217;s how you do it:</p>
<p>private void DropTable(string tableName, string connectionString)</p>
<p>{</p>
<p style="padding-left: 30px;">using (SqlCeConnection cn = new SqlCeConnection(connectionString))</p>
<p style="padding-left: 30px;">{</p>
<p style="padding-left: 60px;">SqlCeCommand cmd = cn.CreateCommand();</p>
<p style="padding-left: 60px;">cmd.CommandText = String.Format(&#8220;SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = &#8216;{0}&#8217;&#8221;, tableName);</p>
<p style="padding-left: 60px;">cn.Open();</p>
<p style="padding-left: 60px;">if((int)cmd.ExecuteScalar() == 1)</p>
<p style="padding-left: 60px;">{</p>
<p style="padding-left: 90px;">cmd.CommandText = String.Format(&#8220;DROP TABLE {0}&#8221;, tableName);</p>
<p style="padding-left: 90px;">cmd.ExecuteNonQuery();</p>
<p style="padding-left: 60px;">}</p>
<p style="padding-left: 30px;">}</p>
<p>}</p>
<p>You can see that I use SqlCeConnection and SqlCeCommand objects in order to query the INFORMATION_SCHEMA.TABLES database object.  If the return value of the query is 1, then you know that a table already exists.  This result leads you to execute a DROP TABLE statement so that the existing table is gone before the new one is downloaded.</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-iii/localquery/" rel="attachment wp-att-1792"><img class="alignleft size-full wp-image-1792" title="LocalQuery" src="http://robtiffany.com/wp-content/uploads/2012/04/LocalQuery.png" alt="Local Query" width="603" height="206" /></a></p>
<p>&nbsp;</p>
<p>Right-clicking on DistributionCenters and selecting Show Table Data reveals that the Seattle and Redmond distribution centers and their associated uniqueidentifiers were downloaded to SQLCE from SQL Server 2012.</p>
<p>Right about now, I know you&#8217;re thinking that this whole process of dropping a table and re-downloading a new one in order to keep a mobile database up to date sounds wasteful.  I get it.  I also get all the heavyweight processes that are required by Merge Replication to figure out server changes for each device that synchronizes with SQL Server.  You have to weigh your options.  For instance, in boosting Merge Replication performance and scalability, one of the keys to success is maintaining a low Subscription Expiration value.  This value determines how long a mobile user can go without synchronizing her data before her subscription expires, which requires her to re-download an entire database from scratch.  Keeping a low value ensures that SQL Server doesn&#8217;t track too much performance-degrading metadata.  It also means that users might have to synchronize more frequently than business rules dictate.  The great thing about RDA is that the notion of a subscription doesn&#8217;t exist since it downloads table snapshots to keep mobile clients up to date.  This means users can download data to their devices and remain disconnected for an indefinite amount of time while capturing new data out in the field.  No expiration or degraded performance on SQL Server 2012.  This leads to infinitely greater scalability for your system.</p>
<p>In the most common mobile scenarios I see in business, laptops/devices download the data needed to perform work for a given day via Wi-Fi or cradled Ethernet.  Unless each of your downloaded tables are 100+ MB a piece, this shouldn&#8217;t be a big deal at these types of network speeds.  Most organizations roll their own web services to do the same thing and they don&#8217;t bat an eye at the amount of data they have to re-download with each web method call.  Heck, most companies I work with allow their devices to take all night to download the data needed for the next morning.</p>
<p>So after a user has spent some time in the field capturing new data or changing/deleting existing data, it&#8217;s time to push those tracked changes back up to SQL Server 2012.  This is the simplest code of all:</p>
<p>SqlCeRemoteDataAccess rda = new SqlCeRemoteDataAccess();</p>
<p>rda.InternetUrl = &#8220;http://localhost/rda/sqlcesa35.dll&#8221;;</p>
<p>rda.LocalConnectionString = &#8220;Data Source=ContosoBottling.sdf&#8221;;</p>
<p>rda.Push(&#8220;DistributionCenters&#8221;, rdaConnection, RdaBatchOption.BatchingOn);</p>
<p>For each table that you tracked changes for, you need to use the SqlCeRemoteDataAccess object and the Push method.  The first parameter should look familiar since it&#8217;s the name of the tracked table that you had previously Pulled.  The second parameter is the same OLEDB connection string we used in the Pull method.  The last one allows you to specify batching of uploads.  This feature gives you the transactional, all-or-nothing functionality of a message queue.  If any of the table data uploads fail, the whole transaction is rolled back.  This is a great feature to ensure data integrity.</p>
<p>Before you run this code, I want you to go back to the local SQLCE query result from the Server Explorer in Visual Studio and change the Distribution Center Name column from Redmond to Bellevue.  I have to prove that this great change tracking feature actually works after all.  Once you&#8217;ve made the change and hit the tab key to save it, go ahead and run your Push code.  If everything works as expected, the local change you made should be pushed up to SQL Server.  We need some proof, so open up SQL Server Managment Studio:</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-iii/objectexplorer/" rel="attachment wp-att-1799"><img class="alignleft size-full wp-image-1799" title="ObjectExplorer" src="http://robtiffany.com/wp-content/uploads/2012/04/ObjectExplorer.png" alt="Object Explorer" width="755" height="248" /></a></p>
<p>&nbsp;</p>
<p>Right-clicking on dbo.DistributionCenters and clicking Select Top 1000 Rows should return the result you see in the figure above.  Happily, the local SQLCE change from Redmond to Bellevue is reflected in the result on SQL Server 2012.</p>
<p>The circle is complete.</p>
<p>-Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Mobile Sync with SQL Server 2012 and SQL Server Compact: Episode II</title>
		<link>http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-ii/</link>
		<comments>http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-ii/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 03:21:42 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Sync]]></category>
		<category><![CDATA[RDA]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Compact]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=1683</guid>
		<description><![CDATA[In my last article, I walked you through finding, downloading, installing, and configuring SQL Server 2012 Express, SQL Server Compact 3.5 SP2 CU6, and the Sync Server Tools.  With that series of tasks completed, you&#8217;re now capable of performing data synchronization with &#8230; <a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-ii/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my last article, I walked you through finding, downloading, installing, and configuring SQL Server 2012 Express, SQL Server Compact 3.5 SP2 CU6, and the <em><strong>Sync </strong></em>Server Tools.  With that series of tasks completed, you&#8217;re now capable of performing data synchronization with a mobile Windows client.</p>
<p>Open SQL Server 2012 Management Studio and connect to the local SQL Express instance.  You’ll quickly notice the new Visual Studio 2010 IDE look and feel.  Since you’re going to need a database to sync with, right-click on the Databases folder in the Object Explorer and select New Database.  Type ContosoBottling in the Database name text box and click OK.  I want you to create three simple tables for the purposes of this article:</p>
<table width="646" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="137"><strong>DistributionCenters</strong></td>
<td colspan="5" width="509"></td>
</tr>
<tr>
<td valign="top" width="137"><strong>Column</strong></td>
<td valign="top" width="93"><strong>PK</strong></td>
<td valign="top" width="113"><strong>Data Type</strong></td>
<td valign="top" width="97"><strong>Nulls</strong></td>
<td valign="top" width="102"><strong>Defaults</strong></td>
<td valign="top" width="104"><strong>RowGuid</strong></td>
</tr>
<tr>
<td valign="top" width="137">DistributionCenterId</td>
<td valign="top" width="93">Yes</td>
<td valign="top" width="113">uniqueidentifier</td>
<td valign="top" width="97">No</td>
<td valign="top" width="102">newid()</td>
<td valign="top" width="104">Yes</td>
</tr>
<tr>
<td valign="top" width="137">Name</td>
<td valign="top" width="93"></td>
<td valign="top" width="113">nchar(20)</td>
<td valign="top" width="97">Yes</td>
<td valign="top" width="102"></td>
<td valign="top" width="104">No</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table width="646" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="137"><strong>Routes</strong></td>
<td colspan="5" width="509"></td>
</tr>
<tr>
<td valign="top" width="137"><strong>Column</strong></td>
<td valign="top" width="93"><strong>PK</strong></td>
<td valign="top" width="113"><strong>Data Type</strong></td>
<td valign="top" width="97"><strong>Nulls</strong></td>
<td valign="top" width="102"><strong>Defaults</strong></td>
<td valign="top" width="104"><strong>RowGuid</strong></td>
</tr>
<tr>
<td valign="top" width="137">RouteId</td>
<td valign="top" width="93">Yes</td>
<td valign="top" width="113">uniqueidentifier</td>
<td valign="top" width="97">No</td>
<td valign="top" width="102">newid()</td>
<td valign="top" width="104">Yes</td>
</tr>
<tr>
<td valign="top" width="137">DistributionCenterId</td>
<td valign="top" width="93"></td>
<td valign="top" width="113">uniqueidentifier</td>
<td valign="top" width="97">Yes</td>
<td valign="top" width="102"></td>
<td valign="top" width="104">No</td>
</tr>
<tr>
<td valign="top" width="137">Name</td>
<td valign="top" width="93"></td>
<td valign="top" width="113">nchar(20)</td>
<td valign="top" width="97">Yes</td>
<td valign="top" width="102"></td>
<td valign="top" width="104">No</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table width="640" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="112"><strong>Drivers</strong></td>
<td colspan="5" width="528"></td>
</tr>
<tr>
<td valign="top" width="112"><strong>Column</strong></td>
<td valign="top" width="93"><strong>PK</strong></td>
<td valign="top" width="113"><strong>Data Type</strong></td>
<td valign="top" width="105"><strong>Nulls</strong></td>
<td valign="top" width="108"><strong>Defaults</strong></td>
<td valign="top" width="109"><strong>RowGuid</strong></td>
</tr>
<tr>
<td valign="top" width="112">DriverId</td>
<td valign="top" width="93">Yes</td>
<td valign="top" width="113">uniqueidentifier</td>
<td valign="top" width="105">No</td>
<td valign="top" width="108">newid()</td>
<td valign="top" width="109">Yes</td>
</tr>
<tr>
<td valign="top" width="112">RouteId</td>
<td valign="top" width="93"></td>
<td valign="top" width="113">uniqueidentifier</td>
<td valign="top" width="105">Yes</td>
<td valign="top" width="108"></td>
<td valign="top" width="109">No</td>
</tr>
<tr>
<td valign="top" width="112">FirstName</td>
<td valign="top" width="93"></td>
<td valign="top" width="113">nchar(20)</td>
<td valign="top" width="105">Yes</td>
<td valign="top" width="108"></td>
<td valign="top" width="109">No</td>
</tr>
<tr>
<td valign="top" width="112">LastName</td>
<td valign="top" width="93"></td>
<td valign="top" width="113">nchar(20)</td>
<td valign="top" width="105">Yes</td>
<td valign="top" width="108"></td>
<td valign="top" width="109">No</td>
</tr>
</tbody>
</table>
<p>If you read my last book on Enterprise Data Replication, these tables that support the operations of a delivery driver should look familiar to you.  Since RDA doesn’t support the Identity Range feature of Merge Replication, you’ll be using GUIDs for your primary keys to ensure uniqueness.  Since the offline data capabilities of sync technologies from all vendors are based on the notion of optimistic concurrency, having a globally unique primary key that won’t collide with inserts and updates made by one or more devices is critical to success.  Now it’s time to fill these tables with some sample data to get started:</p>
<p>Right-click on DistributionCenters and select Edit Top 200 Rows.  Type Seattle for the Name in the first row and Redmond for the Name in the second row.  Allow the DistributionCenterId uniqueidentifier values to be automatically created.  It should look something like this:</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-ii/dc/" rel="attachment wp-att-1694"><img class="alignleft size-full wp-image-1694" title="DistributionCenter" src="http://robtiffany.com/wp-content/uploads/2012/04/DC.png" alt="Distribution Center" width="364" height="115" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Now it’s time to tackle the Routes table.  Each Distribution Center will have multiple routes that it supplies products to.  Right-click on Routes and select Edit Top 200 Rows.  Like before, allow the RouteId uniqueidentifier values to be automatically created.  The eight rows of data I want you to enter should be as follows:</p>
<ol>
<li>The DistributionCenterID should equal the related Seattle value from the DistributionCenters table and the Name should equal Magnolia.</li>
<li>The DistributionCenterID should equal the related Seattle value from the DistributionCenters table and the Name should equal Ballard.</li>
<li>The DistributionCenterID should equal the related Seattle value from the DistributionCenters table and the Name should equal Fremont.</li>
<li>The DistributionCenterID should equal the related Seattle value from the DistributionCenters table and the Name should equal Wallingford.</li>
<li>The DistributionCenterID should equal the related Redmond value from the DistributionCenters table and the Name should equal Kirkland.</li>
<li>The DistributionCenterID should equal the related Redmond value from the DistributionCenters table and the Name should equal Bellevue.</li>
<li>The DistributionCenterID should equal the related Redmond value from the DistributionCenters table and the Name should equal Issaquah.</li>
<li>The DistributionCenterID should equal the related Redmond value from the DistributionCenters table and the Name should equal Sammamish.</li>
</ol>
<p>It should look something like this:</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-ii/routes/" rel="attachment wp-att-1695"><img class="alignleft size-full wp-image-1695" title="Routes" src="http://robtiffany.com/wp-content/uploads/2012/04/routes.png" alt="Routes" width="590" height="249" /></a></p>
<p>&nbsp;</p>
<p>Last but not least, we have the Drivers.  Each of these folks will be assigned to a particular route on any given day.  Right-click on Drivers and select Edit Top 200 Rows.  For each row, allow the DriverId uniqueidentifier values to be automatically created.  I’ll just have you enter a couple of drivers for this table:</p>
<ol>
<li>The RouteId should equal the related Magnolia value from the Routes table and the FirstName should equal Dave and the LastName should equal Bottomley.</li>
<li>The RouteId should equal the related Kirkland value from the Routes table and the FirstName should equal Khalid and the LastName should equal Siddiqui.</li>
</ol>
<p>It should look something like this:</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-ii/drivers/" rel="attachment wp-att-1702"><img class="alignleft size-full wp-image-1702" title="Drivers" src="http://robtiffany.com/wp-content/uploads/2012/04/Drivers.png" alt="Drivers" width="666" height="116" /></a></p>
<p>&nbsp;</p>
<p>Now that your sample database has some data inside, it’s time to build a sample Windows app so fire up Visual Studio 2010.  Create a Windows Forms or WPF application and call the Solution SimpleSync.  The first thing I want you to do is go to the Solution Explorer, right-click on References, and add a reference to System.Data.SqlServerCe.  To make sure you’re working with the newest bits based on Cumulative Update package 6, in the Add Reference dialog, click the Browse tab and navigate to C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Desktop\System.Data.SqlServerCe.dll.</p>
<p>With those pieces in place, it&#8217;s time to write some code.</p>
<p>Unlike Merge Replication that automatically creates a SQL Server Compact database for you during the initial sync, with RDA you&#8217;ll need to create it in code with the SqlCeEngine object.  So before your app can start synchronizing data, you&#8217;ll need to first create a database with the following code:</p>
<h6><span style="color: #0000ff; font-family: Consolas; font-size: medium;"><span style="color: #0000ff; font-family: Consolas; font-size: medium;"><span style="color: #0000ff; font-family: Consolas; font-size: medium;">if</span></span></span><span style="font-family: Consolas; font-size: medium;"><span style="font-family: Consolas; font-size: medium;"> (!</span></span><span style="color: #2b91af; font-family: Consolas; font-size: medium;"><span style="color: #2b91af; font-family: Consolas; font-size: medium;"><span style="color: #2b91af; font-family: Consolas; font-size: medium;">File</span></span></span><span style="font-family: Consolas; font-size: medium;"><span style="font-family: Consolas; font-size: medium;">.Exists(</span></span><span style="color: #a31515; font-family: Consolas; font-size: medium;"><span style="color: #a31515; font-family: Consolas; font-size: medium;"><span style="color: #a31515; font-family: Consolas; font-size: medium;">&#8220;ContosoBottling.sdf&#8221;</span></span></span><span style="font-family: Consolas; font-size: medium;"><span style="font-family: Consolas; font-size: medium;">))</span></span></h6>
<h6>{</h6>
<h6 style="padding-left: 30px;"><span style="color: #0000ff; font-family: Consolas; font-size: medium;"><span style="color: #0000ff; font-family: Consolas; font-size: medium;"><span style="color: #0000ff; font-family: Consolas; font-size: medium;">using</span></span></span><span style="font-family: Consolas; font-size: medium;"><span style="font-family: Consolas; font-size: medium;"> (</span></span><span style="color: #2b91af; font-family: Consolas; font-size: medium;"><span style="color: #2b91af; font-family: Consolas; font-size: medium;"><span style="color: #2b91af; font-family: Consolas; font-size: medium;">SqlCeEngine</span></span></span><span style="font-family: Consolas; font-size: medium;"><span style="font-family: Consolas; font-size: medium;"> sqlEngine = </span></span><span style="color: #0000ff; font-family: Consolas; font-size: medium;"><span style="color: #0000ff; font-family: Consolas; font-size: medium;"><span style="color: #0000ff; font-family: Consolas; font-size: medium;">new </span></span></span><span style="color: #2b91af; font-family: Consolas; font-size: medium;"><span style="color: #2b91af; font-family: Consolas; font-size: medium;"><span style="color: #2b91af; font-family: Consolas; font-size: medium;">SqlCeEngine</span></span></span><span style="font-family: Consolas; font-size: medium;"><span style="font-family: Consolas; font-size: medium;">())</span></span></h6>
<h6 style="padding-left: 30px;">{</h6>
<h6 style="padding-left: 60px;">sqlEngine.LocalConnectionString = &#8221;<span style="color: #a31515; font-family: Consolas; font-size: medium;"><span style="color: #a31515; font-family: Consolas; font-size: medium;"><span style="color: #a31515; font-family: Consolas; font-size: medium;">Data Source=ContosoBottling.sdf&#8221;</span></span></span><span style="font-family: Consolas; font-size: medium;"><span style="font-family: Consolas; font-size: medium;">;</span></span></h6>
<h6 style="padding-left: 60px;">sqlEngine.CreateDatabase();</h6>
<h6 style="padding-left: 30px;">}</h6>
<h6>}</h6>
<p>The first thing the above code does is to check and see if a SQL Server Compact database already exists.  If not, then the SqlCeEngine object is instantiated.  The LocalConnectionString property is set to the path of where you want the database to reside.  In this case, I didn&#8217;t enter a path so the database will be created in the same folder as the app&#8217;s exe.  Keep in mind that a number of other parameters can be used for this property to support password protection and encryption among others.  Next, you just call the CreateDatabase() method and that&#8217;s all there is to it.  You will now have an empty shell of a database that typically weighs in at 20 KB.</p>
<p>With a local database created, you can begin retrieving data.  In my next article I&#8217;ll discuss how to RDA filters and pulls both data and indexes, enables local change-tracking, and pushes new data and updates back to SQL Server.</p>
<p>-Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Mobile Sync with SQL Server 2012 and SQL Server Compact: Episode I</title>
		<link>http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/</link>
		<comments>http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 03:54:28 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Sync]]></category>
		<category><![CDATA[RDA]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Compact]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=1619</guid>
		<description><![CDATA[Now that SQL Server 2012 has been released, some of you might be wondering if SQL Server Compact is capable of synchronizing with it.  With the release of Cumulative Update Package 6 for SQL Server Compact 3.5 Service Pack 2, the answer &#8230; <a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Now that <strong>SQL Server 2012</strong> has been released, some of you might be wondering if <em><strong>SQL Server Compact</strong></em> is capable of synchronizing with it.  With the release of <a title="Cumulative Update Package 6" href="http://support.microsoft.com/kb/2628887" target="_blank">Cumulative Update Package 6 for SQL Server Compact 3.5 Service Pack 2</a>, the answer is a resounding yes!  Build number 3.5.8088.00 adds support for replication with<strong> SQL Server</strong> &#8220;<strong>Denali</strong>&#8221; which is pretty awesome in my book.  For those of you keeping score at home, check out Erik&#8217;s<strong> <a title="Everything SQL Server Compact" href="http://erikej.blogspot.com/" target="_blank">Everything SQL Server Compact</a> </strong>blog to see a running total of improvements to <strong>SQLCE</strong> via Cumulative Updates.  After that, click on the Cumulative Update link at the beginning of this article and head on over to the <strong>Microsoft Support</strong> page to get started.</p>
<p>At the top of the page it says <strong>Hotfix Download Available</strong> and beneath that says <a title="Hotfix Downloads" href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2628887&amp;kbln=en-us" target="_blank">View and request hotfix downloads </a>so click on that.  Keep in mind that my link was defined by my U.S. English IE9 browser so the page I navigated to shows me checkboxes to download x64 Server Tools for IIS and both x86 and x64 versions for Windows.  Your experience may be different depending on where you live.  Luckily, there&#8217;s a link that says<strong> Show hotfixes for all platforms and languages</strong>.  Check the checkboxes to select your language, the Server Tools, Windows, and Windows Mobile/Embedded platforms that you&#8217;re looking for.  Afterward, type in your email address and play the Captcha game in order to have links to the bits you need sent to you.</p>
<p>The next thing you&#8217;re going to need is a copy of SQL Server 2012.  To keep things simple with this series of articles, I won&#8217;t dive into security and I decided that I&#8217;ll use my x64 Windows 7 laptop as the database server, middleware, mobile platform and use <strong>Remote Data Access (RDA)</strong> as the sync transport.  I think you&#8217;ve probably already heard enough about Merge Replication from me so I decided to mix it up a bit with my old friend RDA.  Remember, RDA does not require any configuration on SQL Server, it is not invasive to the schema of the server database, and it&#8217;s amazingly fast and scalable.  With over 650 million copies of <strong>Windows 7</strong> deployed, this is by far the most widely used, occasionally-connected mobile platform in the world, so I don&#8217;t feel bad about not writing another <strong>Windows Phone</strong> article.  <a title="SQL Server 2012 Express" href="http://www.microsoft.com/betaexperience/pd/SQLEXPCTAV2/enus/default.aspx" target="_blank">Navigate your browser to download the free SQL Server 2012 Express with Advanced Services </a>since we won&#8217;t be needing support for Replication.  You might need to navigate elsewhere if you&#8217;re not targetting U.S. English.  Sorry about that.  Once you&#8217;ve downloaded the exe, install the product and make sure you can login via SQL <strong>Server Management Studio</strong>.</p>
<p>At this point, go ahead and install the 32 and 64-bit versions of the <strong>SQL Server Compact 3.5 SP2</strong> runtimes that you downloaded as appropriate.  Remember, on a 64-bit OS, you must install both the x86 and x64 versions in order to have smooth sailing with out favorite embedded database.</p>
<p>I already have <strong>IIS</strong> installed on my x64 Windows 7 laptop so I&#8217;m in good shape to install the<strong> x64 Server Tools</strong>.  Unzip your CU 6 update and click SSCEServerTools-ENU.msi to begin the Server Tools installation.  As a refresher, you must have IIS 6 Management Compatibility enabled to make things work with IIS 7.5.  During the install make sure all the <strong>System Configuration Checks</strong> are successful, and that you select <strong>SQL Server &#8220;Denali&#8221;</strong> to synchronize with. With the Server Tools installed, I want you to create a local folder on your computer and call it <strong>SnapshotShare</strong> and <strong>Share</strong> it with <strong>Everyone</strong> to keep things simple.  It&#8217;s a little silly since RDA doesn&#8217;t use a Snaphot Share, but the installation Wizard may no let you proceed without it.</p>
<p>I know many of you have followed the screenshot-filled installation routines in my books so I&#8217;ll keep the pictures microscopic this time around.  Click <strong>Windows Start</strong>, navigate to <strong>Microsoft SQL Server Compact 3.5</strong>, and select <strong>Configure Web Synchronization Wizard</strong>.</p>
<p>Welcome to the Configure Web Synchronization Wizard | Click Next</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/attachment/9/" rel="attachment wp-att-1645"><img class="alignleft size-full wp-image-1645" title="9" src="http://robtiffany.com/wp-content/uploads/2012/03/9.jpg" alt="" width="160" height="145" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Subscriber Type | Select SQL Server Compact | Click Next</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/attachment/10/" rel="attachment wp-att-1646"><img class="alignleft size-full wp-image-1646" title="10" src="http://robtiffany.com/wp-content/uploads/2012/03/10.jpg" alt="" width="160" height="146" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Web Server | Create a new virtual directory | Click Next</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/attachment/11/" rel="attachment wp-att-1647"><img class="alignleft size-full wp-image-1647" title="11" src="http://robtiffany.com/wp-content/uploads/2012/03/11.jpg" alt="" width="160" height="146" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Virtual Directory Information | Type RDA in the Alias textbox | Click Next | Click Yes to create a folder | Click Yes again</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/attachment/12/" rel="attachment wp-att-1648"><img class="alignleft size-full wp-image-1648" title="12" src="http://robtiffany.com/wp-content/uploads/2012/03/12.jpg" alt="" width="160" height="145" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Secure Communications | Select Do not require secure channel (SSL) | Click Next</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/attachment/15/" rel="attachment wp-att-1651"><img class="alignleft size-full wp-image-1651" title="15" src="http://robtiffany.com/wp-content/uploads/2012/03/15.jpg" alt="" width="160" height="144" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Client Authentication | Select Clients will connect anonymously | Click Next</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/attachment/16/" rel="attachment wp-att-1652"><img class="alignleft size-full wp-image-1652" title="16" src="http://robtiffany.com/wp-content/uploads/2012/03/16.jpg" alt="" width="160" height="147" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Anonymous Access | Default IUSR account of IIS will be used | Click Next</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/attachment/17/" rel="attachment wp-att-1653"><img class="alignleft size-full wp-image-1653" title="17" src="http://robtiffany.com/wp-content/uploads/2012/03/17.jpg" alt="" width="160" height="145" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Snapshot Share Access | Enter path to the shared folder I told you to create | Click Next | Click Yes</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/attachment/18/" rel="attachment wp-att-1654"><img class="alignleft size-full wp-image-1654" title="18" src="http://robtiffany.com/wp-content/uploads/2012/03/18.jpg" alt="" width="160" height="147" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Complete the Wizard | Verify the choices you made | Click Finish</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/attachment/20/" rel="attachment wp-att-1656"><img class="alignleft size-full wp-image-1656" title="20" src="http://robtiffany.com/wp-content/uploads/2012/03/20.jpg" alt="" width="160" height="147" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Configure Web Synchronization | You should have 9 successes | Click Close</p>
<p><a href="http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/attachment/21/" rel="attachment wp-att-1657"><img class="alignleft size-full wp-image-1657" title="21" src="http://robtiffany.com/wp-content/uploads/2012/03/21.jpg" alt="" width="160" height="145" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Congratulations!  You&#8217;re done.</p>
<p>Test your Server Tools installation using Internet Explorer and navigate to this address: <a href="http://localhost/rda/sqlcesa35.dll">http://localhost/rda/sqlcesa35.dll</a>.  Your browser should display <strong>&#8220;Microsoft SQL Server Compact Server Agent&#8221;</strong> if all went well.  Your configuration tasks are almost complete, but I need you to bring up SQL Server Management Studio to do one more thing for me.  In SQL Server, create a new login called NT AUTHORITY\IUSR  with ContosoBottling as the default database so devices can anonymously connect to IIS and SQL Server to sync.  I apologize for not having you build out a network full of servers and for not having you use Windows auth against Active Directory.  Remember, when it&#8217;s time to go to production, you&#8217;ll do this the secure way.</p>
<p>You&#8217;ve accomplished a lot by following along through this article and all the pieces are in place to create an occasionally-connected solution for yourself, your company, or your customers.  In the next article, we&#8217;ll build a sample database and start writing some code in Visual Studio 2010.</p>
<p>Stay in sync,</p>
<p>Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/simple-mobile-sync-with-sql-server-2012-and-sql-server-compact-episode-i/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Books and Taxes</title>
		<link>http://robtiffany.com/books-and-taxes/</link>
		<comments>http://robtiffany.com/books-and-taxes/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 22:55:29 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Writing]]></category>
		<category><![CDATA[Apress]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Hood Canal Press]]></category>
		<category><![CDATA[Merge Replication]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[SQL CE]]></category>
		<category><![CDATA[SQL Compact]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Compact]]></category>
		<category><![CDATA[SQLCE]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=1376</guid>
		<description><![CDATA[Wow!  Just opened a 1099 tax document for 2011 from Apress.  People must still be buying my old books on eMbedded Visual Basic, the .NET Compact Framework 2.0, and SQL Server Compact 2.0.  The Pocket PC and Windows Mobile live &#8230; <a href="http://robtiffany.com/books-and-taxes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Wow!  Just opened a 1099 tax document for 2011 from Apress.  People must still be buying my old books on eMbedded Visual Basic, the .NET Compact Framework 2.0, and SQL Server Compact 2.0.  The Pocket PC and Windows Mobile live on!</p>
<p>A separate 1099 for Hood Canal Press tells me that my SQL Server Merge Replication books are still killing it!  Our world of disconnected devices require efficient data sync now more than ever.  Despite a variety of sync technologies out there, Merge is still the best!</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/books-and-taxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sync Framework v4 is now Open Source, and ready to Connect any Device to SQL Server and SQL Azure</title>
		<link>http://robtiffany.com/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/</link>
		<comments>http://robtiffany.com/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 20:54:27 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Sync Framework]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Consumerization]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MEAP]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile Enterprise Application Platform]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[SQL Server Compact]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[Synchronize]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Windows Mobile]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=1014</guid>
		<description><![CDATA[The profound effects of the Consumerization of IT (CoIT) is blurring the lines between consumers and the enterprise.  The fact that virtually every type of mobile device is now a candidate to make employees productive means that cross-platform, enabling technologies are &#8230; <a href="http://robtiffany.com/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The profound effects of the Consumerization of IT (CoIT) is blurring the lines between consumers and the enterprise.  The fact that virtually every type of mobile device is now a candidate to make employees productive means that cross-platform, enabling technologies are a must.  Luckily, Microsoft has brought the power to synchronize data with either SQL Server on-premise or SQL Azure in the cloud to the world of mobility.  If you&#8217;ve ever synched the music on your iPhone with iTunes, the calendar on your Android device with Gmail, or the Outlook email on your Windows Phone with Exchange, then you understand the importance of sync.  In my experience architecting and building enterprise mobile apps for the world&#8217;s largest organizations over the last decade, data sync has always been a critical ingredient.</p>
<p><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/sql-azure_rgb_2" rel="attachment wp-att-1027"><img class="alignright size-medium wp-image-1027" title="SQL Azure" src="http://robtiffany.com/wp-content/uploads/2011/09/SQL-Azure_rgb_2-300x92.png" alt="" width="300" height="92" /></a><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/microsoft-sql-server-2008" rel="attachment wp-att-1026"><img class="aligncenter size-medium wp-image-1026" title="SQL Server" src="http://robtiffany.com/wp-content/uploads/2011/09/microsoft-sql-server-2008-300x246.jpg" alt="" width="300" height="246" /></a></p>
<p>The new <strong><a title="Sync Framework Toolkit" href="http://code.msdn.microsoft.com/Sync-Framework-Toolkit-4dc10f0e" target="_blank">Sync Framework Toolkit</a></strong> found on MSDN builds on the existing Sync Framework 2.1&#8242;s ability to create disconnected applications, making it easier to expose data for synchronization to apps running on any client platform.  Where Sync Framework 2.1 required clients to be based on Windows, this free toolkit allows other Microsoft platforms to be used for offline clients such as Silverlight, Windows Phone 7, Windows Mobile, Windows Embedded Handheld, and new Windows Slates.   Additionally, non-Microsoft platforms such as iPhones, iPads, Android phones and tablets, Blackberries and browsers supporting HTML5 are all first-class sync citizens.  The secret is that we no longer require the installation of the Sync Framework runtime on client devices.  When coupled with use of an open protocol like <a title="OData" href="http://www.odata.org/" target="_blank">OData </a>for data transport, no platform or programming language is prevented from synchronizing data with our on-premise and cloud databases.  When the data arrives on your device, you can serialize it as JSON, or insert it into SQL Server Compact or SQLite depending on your platform preferences.</p>
<p><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/sync" rel="attachment wp-att-1032"><img class="aligncenter size-full wp-image-1032" title="sync" src="http://robtiffany.com/wp-content/uploads/2011/09/sync.png" alt="" width="256" height="256" /></a>The Sync Framework Toolkit provides all the features enabled by the<a href="http://blogs.msdn.com/b/sync/archive/2010/11/16/sync-framework-4-0-october-2010-ctp-refreshed-on-11-16.aspx">Sync Framework 4.0 October 2010 CTP</a>.  We are releasing the toolkit as source code samples on MSDN with the source code utilizing Sync Framework 2.1.  Source code provides the flexibility to customize or extend the capabilities we have provided to suit your specific requirements. The client-side source code in the package is released under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache 2.0 license</a> and the server-side source code under the <a href="http://mef.codeplex.com/license">MS-LPL license</a>.  The Sync Framework 2.1 is fully supported by Microsoft and the mobile-enabling source code is yours to use, build upon, and support for the apps you create.</p>
<p><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/windowsslate" rel="attachment wp-att-1051"><img class="alignleft size-full wp-image-1051" title="WindowsSlate" src="http://robtiffany.com/wp-content/uploads/2011/09/WindowsSlate.png" alt="" width="182" height="115" /></a><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/windowsphone" rel="attachment wp-att-1050"><img class="alignleft size-full wp-image-1050" title="WindowsPhone" src="http://robtiffany.com/wp-content/uploads/2011/09/WindowsPhone.png" alt="" width="152" height="153" /></a><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/mc55a0_lg_us-en-2" rel="attachment wp-att-1048"><img class="alignleft size-thumbnail wp-image-1048" title="MC55A0_LG_US-EN" src="http://robtiffany.com/wp-content/uploads/2011/09/MC55A0_LG_US-EN1-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/html5_logo_512" rel="attachment wp-att-1045"><img class="alignleft size-thumbnail wp-image-1045" title="HTML5_Logo_512" src="http://robtiffany.com/wp-content/uploads/2011/09/HTML5_Logo_512-150x150.png" alt="" width="150" height="150" /></a><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/mac" rel="attachment wp-att-1047"><img class="alignleft size-full wp-image-1047" title="Mac" src="http://robtiffany.com/wp-content/uploads/2011/09/Mac.png" alt="" width="184" height="106" /></a><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/blackberry" rel="attachment wp-att-1044"><img class="alignleft size-full wp-image-1044" title="Blackberry" src="http://robtiffany.com/wp-content/uploads/2011/09/Blackberry.png" alt="" width="173" height="173" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/ipad" rel="attachment wp-att-1046"><img class="alignleft size-full wp-image-1046" title="iPad" src="http://robtiffany.com/wp-content/uploads/2011/09/iPad.png" alt="" width="113" height="144" /></a><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/android" rel="attachment wp-att-1043"><img class="alignleft size-full wp-image-1043" title="Android" src="http://robtiffany.com/wp-content/uploads/2011/09/Android.png" alt="" width="154" height="153" /></a><a href="http://robtiffany.com/sync-framework/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/attachment/symbian" rel="attachment wp-att-1049"><img class="alignleft size-full wp-image-1049" title="Symbian" src="http://robtiffany.com/wp-content/uploads/2011/09/Symbian.png" alt="" width="152" height="163" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Now some of you might be wondering why you would use a sync technology to move data rather than SOAP or REST web services.  The reason has to do with performance and bandwidth efficiency.  Using SOA, one would retrieve all the data needed to the device in order to see what has changed in SQL Server.  The same goes for uploading data.  Using the Sync Framework Toolkit, only the changes, or deltas, are transmitted over the air.  The boosts performance and reduces bandwidth usage which saves time and money in a world of congested mobile data networks with capped mobile data plans.  You also get a feature called batching, which breaks up the data sent over wireless networks into manageable pieces.  This not only prevents you from blowing out your limited bandwidth, but it also keeps you from using too much RAM memory both on the server and your memory-constrained mobile device.  When combined with conflict resolution and advanced filtering, I&#8217;m sold!</p>
<p>I think you&#8217;ll find the Sync Framework Toolkit to be an immensely valuable component of your MEAP solutions for the enterprise as well as the ones you build for consumers.</p>
<p>Keep Synching,</p>
<p>Rob</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/sync-framework-v4-is-now-open-source-and-ready-to-connect-any-device-to-sql-server-and-sql-azure/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Performance and Memory Management Improvements with Windows Embedded Handheld</title>
		<link>http://robtiffany.com/performance-and-memory-management-improvements-with-windows-embedded-handheld/</link>
		<comments>http://robtiffany.com/performance-and-memory-management-improvements-with-windows-embedded-handheld/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 15:49:39 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Windows Embedded Handheld]]></category>
		<category><![CDATA[.NET Compact Framework]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Device Management]]></category>
		<category><![CDATA[Merge Replication]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile Enterprise Application Platform]]></category>
		<category><![CDATA[RDA]]></category>
		<category><![CDATA[Remote Data Access]]></category>
		<category><![CDATA[SQL CE]]></category>
		<category><![CDATA[SQL Server Compact]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows Mobile]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=944</guid>
		<description><![CDATA[It should be no surprise that over 80% of enterprise handhelds shipped are running Windows Mobile or Windows Embedded Handheld.  <a href="http://robtiffany.com/performance-and-memory-management-improvements-with-windows-embedded-handheld/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A lot has changed since the launch of Windows Phone in the Fall of 2010.  Microsoft now has a compelling phone platform that targets consumers inside and outside the office.  One thing that that hasn&#8217;t changed is the widespread use of Windows Embedded Handheld to solve tough enterprise mobility problems.  It should be no surprise that over 80% of enterprise handhelds shipped are running Windows Mobile or Windows Embedded Handheld.  They include support for barcode scanning, RFID reading, rugged hardware, every type of wireless, full device encryption, complete over-the-air software distribution and device managment support, FIPS compliance, and both capacitive touch and stylus operation.  On the application platform side of the equation, they have rich support for WinForm development using Visual Studio and the .NET Compact Framework, C++ and a full-featured database with built-in sync capabilities via SQL Server Compact.  They can easily communicate with WCF SOAP and REST web services running on Windows Servers on-premise or with Azure in the cloud.  Support for Merge Replication means faster time to market to get device synchronizing with SQL Server with almost no coding.</p>
<p><a href="http://robtiffany.com/windows-embedded-handheld/performance-and-memory-management-improvements-with-windows-embedded-handheld/attachment/motorola-es400" rel="attachment wp-att-951"><img class="alignleft size-medium wp-image-951" title="Windows Embedded Handheld" src="http://robtiffany.com/wp-content/uploads/2011/09/motorola-es400-144x300.jpg" alt="" width="144" height="300" /></a><a href="http://robtiffany.com/windows-embedded-handheld/performance-and-memory-management-improvements-with-windows-embedded-handheld/attachment/pp-psion-teklogix-12-6-10" rel="attachment wp-att-978"><img class="alignleft size-medium wp-image-978" title="pp-Psion-Teklogix-12-6-10" src="http://robtiffany.com/wp-content/uploads/2011/09/pp-Psion-Teklogix-12-6-10-183x300.jpg" alt="" width="183" height="300" /></a><a href="http://robtiffany.com/windows-embedded-handheld/performance-and-memory-management-improvements-with-windows-embedded-handheld/attachment/dolphin" rel="attachment wp-att-976"><img class="alignleft size-medium wp-image-976" title="dolphin" src="http://robtiffany.com/wp-content/uploads/2011/09/dolphin-163x300.jpg" alt="" width="163" height="300" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://robtiffany.com/windows-embedded-handheld/performance-and-memory-management-improvements-with-windows-embedded-handheld/attachment/intermec" rel="attachment wp-att-979"><img class="alignleft size-medium wp-image-979" title="intermec" src="http://robtiffany.com/wp-content/uploads/2011/09/intermec-140x300.jpg" alt="" width="140" height="300" /></a><a href="http://robtiffany.com/windows-embedded-handheld/performance-and-memory-management-improvements-with-windows-embedded-handheld/attachment/honeywell_99ex" rel="attachment wp-att-977"><img class="alignleft size-medium wp-image-977" title="honeywell_99ex" src="http://robtiffany.com/wp-content/uploads/2011/09/honeywell_99ex-127x300.jpg" alt="" width="127" height="300" /></a></p>
<p>Since Windows Embedded Handheld uses an advanced version of the operating system kernel used by Windows Mobile 6.5.3, many of the techniques and best practices I&#8217;ve taugh customers and developers all over the world still apply.  While it still uses the slotted memory model found in Windows CE 5 with 32 processes and 32 MB of memory per process, you&#8217;ll find that numerous enhancements and tuning has taken place to give your line of business apps more of what they need.  I&#8217;m talking about more memory per process and improved performance.  Therefore, I&#8217;d like you to sit back and watch the video of a presentation I delivered at Tech Ed in Los Angeles a couple of years ago so you can better learn what this mobile platform has to offer in the form of better memory management and improved performance:<br />
<iframe style="width: 512px; height: 384px;" src="http://channel9.msdn.com/Events/TechEd/Europe/2009/MOB401/player?w=512&amp;h=384" frameborder="0" scrolling="no" width="320" height="240"></iframe></p>
<p>A recent Gartner report recommends that organizations should stay with Windows Embedded Handheld as the best mobile platform for enterprise line of business needs.  Great devices are available from OEMs like Intermec, Motorola, Psion, and Honeywell just to name a few.  I hope this video helps you with any memory management or performance issues you may need to deal with in your enterprise mobile apps.</p>
<p>Best Regards,<br />
Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/performance-and-memory-management-improvements-with-windows-embedded-handheld/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Consumerization of IT Collides with MEAP: Windows &gt; Cloud</title>
		<link>http://robtiffany.com/consumerization-of-it-collides-with-meap-windows-cloud/</link>
		<comments>http://robtiffany.com/consumerization-of-it-collides-with-meap-windows-cloud/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 04:51:39 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[MEAP]]></category>
		<category><![CDATA[ACS]]></category>
		<category><![CDATA[ADFS]]></category>
		<category><![CDATA[ADO.NET]]></category>
		<category><![CDATA[AppFabric]]></category>
		<category><![CDATA[Auth]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Azure AppFabric]]></category>
		<category><![CDATA[CIO]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[CoIT]]></category>
		<category><![CDATA[Consumerization]]></category>
		<category><![CDATA[Consumerization of IT]]></category>
		<category><![CDATA[Critical Capabilities]]></category>
		<category><![CDATA[CTO]]></category>
		<category><![CDATA[Device Management]]></category>
		<category><![CDATA[EAI]]></category>
		<category><![CDATA[ERP]]></category>
		<category><![CDATA[Gartner]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IE9]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Integrated Development Environment]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[IT Director]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[MDM]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile Enterprise Application Platform]]></category>
		<category><![CDATA[OData]]></category>
		<category><![CDATA[On-Premises]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SCCM]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[SQL Azure Data Sync]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[Sync Framework]]></category>
		<category><![CDATA[Web Role]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[Web Storage]]></category>
		<category><![CDATA[WIF]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Intune]]></category>
		<category><![CDATA[Worker Role]]></category>

		<guid isPermaLink="false">http://robtiffany.com/meap/consumerization-of-it-collides-with-meap-windows-cloud</guid>
		<description><![CDATA[In my Consumerization of IT Collides with MEAP article last week, I described how to connect a Windows 7 device to Microsoft’s On-Premises servers.&#160; Whether you’re talking about a Windows 7 tablet or laptop, I showed that you can follow &#8230; <a href="http://robtiffany.com/consumerization-of-it-collides-with-meap-windows-cloud/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my Consumerization of IT Collides with MEAP article last week, I described how to connect a Windows 7 device to Microsoft’s On-Premises servers.&#160; Whether you’re talking about a Windows 7 tablet or laptop, I showed that you can follow the Garter MEAP Critical Capabilities to integrate with our stack in a consistent manner.&#160; Remember, the ability to support multiple mobile apps across multiple mobile platforms, using the same software stack is a key tenant to MEAP.&#160; It’s all about avoiding point solutions.</p>
<p>If you need a refresher on the Gartner MEAP Critical Capabilities, check out: <a title="http://robtiffany.com/meap/consumerization-of-it-collides-with-meap-windows-on-premises" href="http://robtiffany.com/meap/consumerization-of-it-collides-with-meap-windows-on-premises">http://robtiffany.com/meap/consumerization-of-it-collides-with-meap-windows-on-premises</a>&#160;</p>
<p>In this week’s scenario, I’ll use the picture below to illustrate how Mobile versions of Windows 7 in the form of slates, laptops, and tablets utilize some or all of Gartner’s Critical Capabilities to connect to Microsoft’s Cloud infrastructure:</p>
<p><a href="http://robtiffany.com/wp-content/uploads/2011/08/image1.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="http://robtiffany.com/wp-content/uploads/2011/08/image_thumb1.png" width="596" height="318" /></a></p>
<p>As you can see from the picture above:</p>
<ol>
<li>For the <strong>Management Tools Critical Capability</strong>, Windows 7 uses Windows Intune for Cloud-based device management and software distribution. </li>
<li>For both the Client and Server <strong>Integrated Development Environment (IDE) and Multichannel Tool Critical Capability</strong>, Windows 7 uses Visual Studio. The Windows Azure SDK plugs into Visual Studio and provides developers with everything they need to build Cloud applications.&#160; It even includes a Cloud emulator to simulate all aspects of Windows Azure on their development computer. </li>
<li>For the cross-platform <strong>Application Client Runtime Critical Capability</strong>, Windows 7 uses .NET (Silverlight/WPF/WinForms) for thick clients. For thin clients, it uses Internet Explorer 9 to provide HTML5 + CSS3 + ECMAScript5 capabilities. Offline storage is important to keep potentially disconnected mobile clients working and this is facilitated by SQL Server Compact + Isolated Storage for thick clients and Web Storage for thin clients. </li>
<li>For the<strong> Security Critical Capability</strong>, Windows 7 provides security for data at rest via Bitlocker, data in transit via SSL, &amp; Authorization/Authentication via the Windows Azure AppFabric Access Control Serivce (ACS). </li>
<li>For the<strong> Enterprise Application Integration Tools Critical Capability</strong>, Windows 7 can reach out to servers directly via Web Services or indirectly through the Cloud via the Windows Azure AppFabric Service Bus to connect to other enterprise packages. </li>
<li>The <strong>Multichannel Server Critical Capability</strong> to support any open protocol is handled automatically by Windows Azure. Crosss-Platform wire protocols riding on top of HTTP are exposed by Windows Communication Foundation (WCF) and include SOAP, REST and Atompub. Cross-Platform data serialization is also provided by WCF including XML, JSON, and OData. Cross-Platform data synchronization if provided by the Sync Framework. These Multichannel capabilities support thick clients making web service calls as well as thin web clients making Ajax calls. Distributed caching to dramatically boost the performance of any client is provided by Windows Azure AppFabric Caching. </li>
<li>As you might imagine, the <strong>Hosting Critical Capability</strong> is knocked out of the park with Windows Azure.&#160; Beyond providing the most complete solution of any Cloud provider, Windows Azure Connect provides an IPSec-protected connection with your On-Premises network and SQL Azure Data Sync can be used to move data between SQL Server and SQL Azure.&#160; This gives you the Hybrid Cloud solution you might be looking for. </li>
<li>For the <strong>Packaged Mobile Apps or Components Critical Capability</strong>, Windows 7 runs cross-platform mobile apps include Office/Lync/IE/Outlook/Bing. </li>
</ol>
<p>As you can see from this and last week’s article, Windows 7 meets all of Gartner’s Critical Capabilities whether it’s connecting to Microsoft’s On-Premises or Cloud servers and infrastructure.&#160; They great takeaway from the picture above, is Windows 7 only needs to know how to integrate its apps with WCF in the exact same way as is does in the On-Premises scenario.&#160; Windows developers can focus on Windows without having to concern themselves with the various options provided by Windows Azure.&#160; Cloud developers just need to provide a WCF interface to the mobile clients. </p>
<p>When an employee walks in the door with a wireless Windows 7 Slate device, you can rest assured that you can make them productive via Windows Azure without sacrificing any of the Gartner Critical Capabilities.</p>
<p>Next week, I’ll cover how Windows Phone connects to an On-Premises Microsoft infrastructure.</p>
<p>Best Regards,</p>
<p>Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/consumerization-of-it-collides-with-meap-windows-cloud/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reducing SQL Server Sync I/O Contention :: Tip 5</title>
		<link>http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-5/</link>
		<comments>http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-5/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 23:17:26 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Merge Replication]]></category>
		<category><![CDATA[Mobile Enterprise Application Platform]]></category>
		<category><![CDATA[RDA]]></category>
		<category><![CDATA[Sync]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=643</guid>
		<description><![CDATA[Today&#8217;s tip is an easy one. When it comes to delivering server solutions with Windows Server and SQL Server, speed is your friend (as we used to say in the submarine service). More speed means more things can happen in &#8230; <a href="http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s tip is an easy one.</p>
<p>When it comes to delivering server solutions with Windows Server and SQL Server, speed is your friend (as we used to say in the submarine service).  More speed means more things can happen in a given period of time.  If more things can happen in a given period of time, then you can derive greater scalability.  Duh, Winning!</p>
<p>Okay, this stuff is obvious so let&#8217;s move on.</p>
<p>Have you ever noticed when you&#8217;ve finished installing your shiny new Windows Server 2008 R2 box, the default Power Plan is set to &#8220;Balanced?&#8221;  Guess what kind of performance and scalability you get when you decide to &#8220;Go Green&#8221; and save the world with a &#8220;Balanced&#8221; power plan?  Needless to say, you&#8217;re not making the most of the high-powered CPUs you just paid big money for.</p>
<p>So how does this relate to SQL Server and reducing I/O contention?</p>
<p>Would it surprise you to know that the amount of time your CPU&#8217;s spend processing your queries could actually double with a Balanced plan?  If it takes more CPU time to execute a query, then imagine all those Merge Agent processes locking and blocking each other as they try to perform DML operations on the change tracking tables.  </p>
<p>So what&#8217;s the takeaway here?</p>
<p>Set your Windows Server 2008 R2 power plan to High Performance!  If you&#8217;re part of a Windows Domain and you need to make this setting stick, have your sys admin enforce this setting on all your SQL Servers via Group Policy.</p>
<p>Go fast or go home because your users care about performance.</p>
<p>-Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reducing SQL Server Sync I/O Contention :: Tip 4</title>
		<link>http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-4/</link>
		<comments>http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-4/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 04:57:20 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Merge Replication]]></category>
		<category><![CDATA[Sync]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=608</guid>
		<description><![CDATA[One of the features that makes SQL Server Merge Replication superior to other sync technologies is something called Precomputed Partitions.  SQL Server creates and maintains distinct data partitions/subsets for each unique user or other type of filter value.  Other sync &#8230; <a href="http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the features that makes SQL Server Merge Replication superior to other sync technologies is something called Precomputed Partitions.  SQL Server creates and maintains distinct data partitions/subsets for each unique user or other type of filter value.  Other sync technologies figure out &#8220;what&#8217;s-changed&#8221; on the fly when a Subscriber synchronizes.  This means all change-tracking tables must be evaluated to figure out the data-delta while the user (not so patiently) waits.  Merge Replication with Precomputed Partitions does all this hard work in advance, so the Subscribers can start downloading changes instantly.  Not making your customer wait contributes to a good user experience (UX).</p>
<p>To pull this off, SQL Server has to use a more advanced set of tracking tables + additional trigger logic than simpler sync systems.  Since it does more work in advance, it goes without saying that the Merge Agents are busily creating extra contention through locking and blocking of all those extra tracking tables.  Luckily, you have some control over how many extra tracking tables are used depending on the partition choices you make.  The fewer tables you have to use, while still getting the functionality you need is one of the keys to reducing SQL Server contention.</p>
<p>Let&#8217;s take a quick look at the tracking tables to give you some context:</p>
<ul>
<li><strong>MSmerge_contents </strong>(A row is inserted for each user table insert or update)</li>
<li><strong>MSmerge_tombstone </strong>(A row is inserted for user table delete)</li>
<li><strong>MSmerge_genhistory </strong>(A grouping of the above inserts called a generation)</li>
<li><strong>MSmerge_partition_groups </strong>(One row for each distinct partition defined)</li>
<li><strong>MSmerge_current_ partition_mappings </strong>(One row for each unique combination of rows in <strong>MSmerge_contents</strong> and <strong>MSmerge_partition_groups</strong>)</li>
<li><strong>MSmerge_past_partition_mappings </strong>(One row for each row that no longer belongs in a given partition)</li>
</ul>
<p>Wow, that&#8217;s a bunch of tracking tables!</p>
<p>So imagine a bunch of Merge Agents performing SELECTS, INSERTS, UPDATES, and DELETES against all these tables in order to make the magic happen for the end user.  The more Merge Agents you having running concurrently, the more locking and blocking the system will experience which degrades performance.</p>
<p>What if I told you that you could reduce contention by eliminating 2 tracking tables from the equation?</p>
<p>Anyone who has setup Merge Replication might recognize the Add Filter dialog below:</p>
<p><a href="http://robtiffany.com/wp-content/uploads/2011/02/5.11.jpg"><img class="aligncenter size-medium wp-image-615" title="Add Filter" src="http://robtiffany.com/wp-content/uploads/2011/02/5.11-300x250.jpg" alt="Add Filter" width="300" height="250" /></a></p>
<p>You will see one of these dialog boxes for every filter you create.  For the purposes of this article, I just want you to focus on the 2 radio buttons at the bottom.  You get to choose that a row from a table will sync with multiple subscriptions or just one subscription.  If multiple users share the same distinct partition, you select the top one, because it&#8217;s an overlapping partition and it will need to use all 6 of the tracking tables I mentioned previously.  This means multiple users send the exact same HOST_NAME() filter value when they sync.  This might be a scenario where a group of sales professionals share the same region and clients, but nothing specific to themselves.</p>
<p>On the other hand, if you know that only one user subscribes to a given partition, then you select the bottom radio button because it&#8217;s a non-overlapping partition, and only uses the top 4 tracking tables I mentioned above.  This is actually the most common scenario I see with my customers.  Imagine a delivery driver that syncs down the data he needs to tell him where to go, what to do, and then uploads data he&#8217;s captured about deliveries.</p>
<p>So the big takeaway here, is to always select the bottom radio button so that SQL Server will create more efficient, non-overlapping partitions and use fewer tracking tables.</p>
<p>But wait, there&#8217;s more!</p>
<p>Non-overlapping partitions are less likely to create conflicts that have to be resolved by the built-in conflict resolvers.  If you&#8217;re not updating other users rows, then you&#8217;re not crashing into each other which leads to faster, smoother operation.</p>
<p>Back at the beginning of the article, I mentioned that there&#8217;s a quite of lot of code executed by triggers and associated stored procedures to make this sophisticated machine work.  Depending on your schema, the amount of data in the tracking tables, and the types of filters you&#8217;ve created, a potentially slow 5-way join is executed by <strong>sp_MSenumchanges. </strong>You can turn that into a 3-way join and speed up the system by sticking to non-overlapping partitions.  That was easy.</p>
<p>It&#8217;s all about UX, and trust me, your users will thank you for caring about this stuff!</p>
<p>Keep Synching,</p>
<p>Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Compact 4.0 Lands on the Web</title>
		<link>http://robtiffany.com/sql-server-compact-4-0-lands-on-the-web/</link>
		<comments>http://robtiffany.com/sql-server-compact-4-0-lands-on-the-web/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 06:31:33 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[SQL Server Compact]]></category>
		<category><![CDATA[.NET Compact Framework]]></category>
		<category><![CDATA[ADO.NET]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[MEAP]]></category>
		<category><![CDATA[Merge Replication]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Mobile Enterprise Application Platform]]></category>
		<category><![CDATA[RDA]]></category>
		<category><![CDATA[Remote Data Access]]></category>
		<category><![CDATA[SQL CE]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SSCE]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[Sync Framework]]></category>
		<category><![CDATA[Synchronize]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows CE]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Windows phones]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=486</guid>
		<description><![CDATA[With the new version 4.0, the little-database-that-could has grown up into a powerful server database ready to take on the web. <a href="http://robtiffany.com/sql-server-compact-4-0-lands-on-the-web/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A decade has passed since I first started using SQL CE on my Compaq iPAQ.  What started as a great upgrade to Pocket Access turned into the ultimate embedded database for Windows CE, the Pocket PC, Windows Mobile and Windows Phones.  The one-two punch of Outlook Mobile synchronizing email with Exchange and SQL Server Compact synchronizing data with SQL Server helped set the mobile enterprise on fire.  In 2005, version 3.0 supported Windows Tablets and progressive enhancements to the code base led to full Windows support on both x86 and x64 platforms.  With the new version 4.0, the little-database-that-could has grown up into a powerful server database ready to take on the web. </p>
<p>We&#8217;ve come a long way and you&#8217;re probably wondering what qualifies this new embedded database to take on the Internet:</p>
<ul>
<li>Native support for x64 Windows Servers</li>
<li>Virtual memory usage has been optimized to ensure the database can support up to 256 open connections &#8211; (Are you actually using 256 pooled connections with your &#8220;Big&#8221; database today?)</li>
<li>Supports databases up to 4 GB in size &#8211; (Feel free to implement your own data sharding scheme<a href="http://robtiffany.com/wp-content/uploads/2011/01/sqlserver_sql_server_2008_logo.png"><img class="alignright size-medium wp-image-496" title="SQL Server Compact" src="http://robtiffany.com/wp-content/uploads/2011/01/sqlserver_sql_server_2008_logo-300x246.png" alt="SQL Server Compact" width="180" height="148" /></a>)</li>
<li>Developed, stress-tested, and tuned to support ASP.NET web applications</li>
<li>Avoids the interprocess communications performance hit by running in-process with your web application</li>
<li>Row-level locking to boost concurrency</li>
<li>Step up to Government + Military grade security SHA2 algorithm to secure data with FIPS compliance</li>
<li>Enhanced data reliability via true atomicity, consistency, isolation, and durability (ACID) support</li>
<li>Transaction support to commit and roll back grouped changes</li>
<li>Full referential integrity with cascading deletes and updates</li>
<li>Support ADO.NET Entity Framework 4 &#8211; (Do I hear WCF Data Services?)</li>
<li>Paging queries are supported via T-SQL syntax to only return the data you actually need</li>
</ul>
<p>Wow, that&#8217;s quite a list!  SQL Server Compact 4.0 databases are easily developed using the new WebMatrix IDE or through Visual Studio 2010 SP1.  I&#8217;m loving the new ASP.NET Web Pages.  It reminds me of the good old days of building web applications with Classic ASP back in the 90&#8242;s with Visual InterDev and Homesite.</p>
<p>What about Mobility?</p>
<p>Since SQL Server Compact owes its heritage to mobile and embedded versions of Windows, you might be wanting to know what our story is there.  The good news is that you can build and deploy v4.0 databases on Windows XP, Windows Vista, and Windows 7.  If you want to implement an occasionally-connected solution that utilizes the Sync Framework, Remote Data Access (RDA), or Merge Replication, you&#8217;ll need to stick with SQL Server Compact 3.5 SP2.  Time and resource-constraints prevented the Compact team from enabling these features.  Luckily, single-user WPF/WinForms database applications running on Windows Slates, laptops and Windows Embedded Handheld devices will work just fine with the v3.5 SP2 runtime.  Get a jumpstart with this by pickup up &#8220;Enterprise Data Synchronization with Microsoft SQL Server 2008 and SQL Server Compact 3.5 Mobile Merge Replication&#8221; at   <a href="http://www.amazon.com/Enterprise-Synchronization-Microsoft-Compact-Replication/dp/0979891213/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1281715114&amp;sr=1-1">http://www.amazon.com/Enterprise-Synchronization-Microsoft-Compact-Replication/dp/0979891213/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1281715114&amp;sr=1-1</a> to start building those MEAP solutions.</p>
<p>With the tidal wave of Windows Slates hitting the market, a secure, powerful mobile database that allows users to work offline and syncs with SQL Server is definitely going to be a hot item!</p>
<p>So run, don&#8217;t walk to the Microsoft Download site to download the Next-Gen database for the web:</p>
<p><a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=033cfb76-5382-44fb-bc7e-b3c8174832e2">http://www.microsoft.com/downloads/en/details.aspx?FamilyID=033cfb76-5382-44fb-bc7e-b3c8174832e2</a></p>
<p>If you need to support occasionally-connected mobile applications with sync capabilities on muliple Windows platforms, download SQL Server Compact 3.5 SP2:</p>
<p><a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=e497988a-c93a-404c-b161-3a0b323dce24">http://www.microsoft.com/downloads/en/details.aspx?FamilyID=e497988a-c93a-404c-b161-3a0b323dce24</a></p>
<p>Keep Syncing,</p>
<p>Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/sql-server-compact-4-0-lands-on-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reducing SQL Server Sync I/O Contention :: Tip 3</title>
		<link>http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-3/</link>
		<comments>http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-3/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 23:43:35 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Merge Replication]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Mobile Enterprise Application Platform]]></category>
		<category><![CDATA[RDA]]></category>
		<category><![CDATA[Remote Data Access]]></category>
		<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[SQL CE]]></category>
		<category><![CDATA[SQL Server Compact]]></category>
		<category><![CDATA[SSCE]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[Sync Framework]]></category>
		<category><![CDATA[Synchronize]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=475</guid>
		<description><![CDATA[Uniqueness is a key factor when synchronizing data between SQL Server/Azure and multiple endpoints like Slates and Smartphones.  With data simultaneously created and updated on servers and clients, ensuring rows are unique to avoid key collisions is critical.  As you know, each row is uniquely identified by its Primary Key. <a href="http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>GUIDs and Clustered Indexes</h5>
<p>Uniqueness is a key factor when synchronizing data between SQL Server/Azure and multiple endpoints like Slates and Smartphones.  With data simultaneously created and updated on servers and clients, ensuring rows are unique to avoid key collisions is critical.  As you know, each row is uniquely identified by its Primary Key.</p>
<p><a href="http://robtiffany.com/wp-content/uploads/2011/01/key.png"><img class="alignleft size-medium wp-image-476" title="Primary Key" src="http://robtiffany.com/wp-content/uploads/2011/01/key-300x156.png" alt="Primary Key" width="300" height="156" /></a></p>
<p>When creating Primary Keys, it’s common to use a compound key based on things like account numbers, insert time and other appropriate business items.  It’s even more popular to create Identity Columns for the Primary Key based on an Int or BigInt data type based on what I see from my customers.  When you designate a column(s) to be a Primary Key, SQL Server automatically makes it a Clustered Index.  Clustered indexes are faster than normal indexes for sequential values because the B-Tree leaf nodes are the actual data pages on disk, rather than just pointers to data pages.</p>
<p>While Identity Columns work well in most database situations, they often break down in a data synchronization scenario since multiple clients could find themselves creating new rows using the same key value.  When these clients sync their data with SQL Server, key collisions would occur.  Merge Replication includes a feature that hands out blocks of Identity Ranges to each client to prevent this. </p>
<p>When using other Microsoft sync technologies like the Sync Framework or RDA, no such Identity Range mechanism exists and therefore I often see GUIDs utilized as Primary Keys to ensure uniqueness across all endpoints.  In fact, I see this more and more with Merge Replication too since SQL Server adds a GUID column to the end of each row for tracking purposes anyway.  Two birds get killed with one Uniqueidentifier stone. </p>
<p>Using the Uniqueidentifier data type is not necessarily a bad idea.  Despite the tradeoff of reduced join performance vs. integers, the solved uniqueness problem allows sync pros to sleep better at night.  The primary drawback with using GUIDs as Primary Keys goes back to the fact that SQL Server automatically gives those columns a Clustered Index.</p>
<p><strong>I thought Clustered Indexes were a good thing?</strong></p>
<p>They are a good thing when the values found in the indexed column are sequential.  Unfortunately, GUIDs generated with the default NewId() function are completely random and therefore create a serious performance problem.  All those mobile devices uploading captured data means lots of Inserts for SQL Server.  Inserting random key values like GUIDs can cause fragmentation in excess of 90% because new pages have to be allocated with rows pushed to the new page in order to insert the record on the existing page.  This performance-killing, space-wasting page splitting wouldn’t happen with sequential Integers or Datetime values since they actually help fill the existing page.</p>
<p> <strong>What about NEWSEQUENTIALID()?</strong></p>
<p>Generating your GUIDs on SQL Server with this function will dramatically reduce fragmentation and wasted space since it guarantees that each GUID will be sequential.  Unfortunately, this isn’t bulletproof.  If your Windows Server is restarted for any reason, your GUIDs may start from a lower range.  They’ll still be globally unique, but your fragmentation will increase and performance will decrease.  Also keep in mind that all the devices synchronizing with SQL Server will be creating their own GUIDs which blows the whole NEWSEQUENTIALID() strategy out of the water.</p>
<h5>Takeaway</h5>
<p>If you’re going to use the Uniqueidentifier data type for your Primary Keys and you plan to sync your data with RDA, the Sync Framework or Merge Replication, ensure that <strong>Create as Clustered == No</strong> for better performance.  You’ll still get fragmentation, but it will be closer to the ~30% range instead almost 100%.</p>
<p>Keep synching</p>
<p>Rob</p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:bf960cbd-b9a9-41b8-9652-5bf27b02ff01">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/SQL+Server">SQL Server</a>,<a rel="tag" href="http://technorati.com/tags/SQL+Server+Compact">SQL Server Compact</a>,<a rel="tag" href="http://technorati.com/tags/Sync">Sync</a>,<a rel="tag" href="http://technorati.com/tags/GUID">GUID</a>,<a rel="tag" href="http://technorati.com/tags/Clustered+Index">Clustered Index</a>,<a rel="tag" href="http://technorati.com/tags/Microsoft">Microsoft</a>,<a rel="tag" href="http://technorati.com/tags/Windows">Windows</a>,<a rel="tag" href="http://technorati.com/tags/SQL+Azure">SQL Azure</a>,<a rel="tag" href="http://technorati.com/tags/MEAP">MEAP</a></div>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/reducing-sql-server-sync-io-contention-tip-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Reducing SQL Server I/O Contention during Sync :: Tip 2</title>
		<link>http://robtiffany.com/reducing-sql-server-io-contention-during-sync-tip-2/</link>
		<comments>http://robtiffany.com/reducing-sql-server-io-contention-during-sync-tip-2/#comments</comments>
		<pubDate>Sat, 08 Jan 2011 01:07:07 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Isolated Storage]]></category>
		<category><![CDATA[Merge Replication]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[RDA]]></category>
		<category><![CDATA[Remote Data Access]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Slate]]></category>
		<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[SQL CE]]></category>
		<category><![CDATA[SQL Compact]]></category>
		<category><![CDATA[SQL Compact 4]]></category>
		<category><![CDATA[SQL Server Compact]]></category>
		<category><![CDATA[SQLCE]]></category>
		<category><![CDATA[SSCE]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[Sync Framework]]></category>
		<category><![CDATA[Synchronize]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Windows phones]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=455</guid>
		<description><![CDATA[All DBAs know that Joining tables on non-indexed columns is the most expensive operation SQL Server can perform.   <a href="http://robtiffany.com/reducing-sql-server-io-contention-during-sync-tip-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>Indexing Join Columns</h5>
<p>In my last Sync/Contention post, I beat up on a select group of SAN administrators who aren&#8217;t willing to go the extra mile to optimize the very heart of their organization, SQL Server.  You guys know who you are.</p>
<p>This time, I want to look at something more basic, yet often overlooked.<a href="http://robtiffany.com/wp-content/uploads/2011/01/emc_symmetrix_vmax-1024x571.jpg"><img class="size-full wp-image-458 alignnone" title="Database Storage" src="http://robtiffany.com/wp-content/uploads/2011/01/emc_symmetrix_vmax-1024x571.jpg" alt="" width="640" height="356" /></a></p>
<p>All DBAs know that Joining tables on non-indexed columns is the most expensive operation SQL Server can perform.  Amazingly, I run into this problem over and over with many of my customers.  Sync technologies like the Sync Framework, RDA and Merge Replication allow for varying levels of server-side filtering.  This is a popular feature used to reduce the size of the tables and rows being downloaded to Silverlight Isolated Storage or SQL Server Compact. </p>
<p>It&#8217;s also a performance killer when tables and columns participating in a Join filter are not properly indexed.  Keeping rows locked longer than necessary creates undue blocking and deadlocking.  It also creates unhappy slate and smartphone users who have to wait longer for their sync to complete.</p>
<p>Do yourselft a favor and go take a look at all the filters you&#8217;ve created and makes sure that you have indexes on all those Joined columns.</p>
<p>Keep synching,</p>
<p>Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/reducing-sql-server-io-contention-during-sync-tip-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reducing SQL Server I/O Contention during Sync :: Tip 1</title>
		<link>http://robtiffany.com/reducing-sql-server-io-contention-during-sync-tip-1/</link>
		<comments>http://robtiffany.com/reducing-sql-server-io-contention-during-sync-tip-1/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 06:16:55 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[I/O]]></category>
		<category><![CDATA[LUN]]></category>
		<category><![CDATA[Merge Replication]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile Enterprise Application Platform]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[Remote Data Access]]></category>
		<category><![CDATA[SAN]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[SQL Server Compact]]></category>
		<category><![CDATA[SSCE]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[Sync Framework]]></category>
		<category><![CDATA[Synchronize]]></category>
		<category><![CDATA[tempdb]]></category>
		<category><![CDATA[Transaction Logs]]></category>
		<category><![CDATA[Windows Mobile]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=447</guid>
		<description><![CDATA[The act of tracking changes made by each SQL Server Compact or Silverlight sync subscriber can cause a lot of locking and blocking on the server. <a href="http://robtiffany.com/reducing-sql-server-io-contention-during-sync-tip-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>RAID</h5>
<p>Sync technologies like Merge Replication and the Sync Framework track changes on SQL Server using triggers, stored procedures and special tracking tables.  The act of tracking changes made by each SQL Server Compact or Silverlight sync subscriber can cause a lot of locking and blocking on the server.  This diminishes performance and sometimes leads to deadlocks. <a href="http://robtiffany.com/wp-content/uploads/2011/01/x3_wss-storageserver2_2.jpg"><img class="alignleft size-full wp-image-450" title="SAN Storage" src="http://robtiffany.com/wp-content/uploads/2011/01/x3_wss-storageserver2_2.jpg" alt="SAN Storage" width="540" height="186" /></a></p>
<p>Therefore, don&#8217;t listen to your SAN administrator when he says the RAID 5 will do.  RAID 1 or 10 must always be used for all databases, tempdb, and transaction logs.  Furthermore, each of these database objects must be placed on their own dedicated RAID arrays.  No sharing!  Remembers, as a DBA and sync expert, knowledge of SAN configuration must always be part of your skillset.</p>
<p>Keeping synching,</p>
<p>Rob</p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/reducing-sql-server-io-contention-during-sync-tip-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Phone 7 Demo Fest Tech Ed Video</title>
		<link>http://robtiffany.com/windows-phone-7-demo-fest-tech-ed-video/</link>
		<comments>http://robtiffany.com/windows-phone-7-demo-fest-tech-ed-video/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 21:21:55 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Exchange Server]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=398</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object class="player" width="645" height="363" type="application/x-silverlight-2" data="data:application/x-silverlight-2,"><param value="http://www.msteched.com/ClientBin/players/VideoPlayer2009_03_27.xap" name="source" /><param value="m=http://ecn.channel9.msdn.com/o9/te/Europe/2010/wmv/wph103-lnc.wmv,thumbnail=http://www.msteched.com/Skins/TechEdOnline/Styles/images/DefaultPlayerBackground.png,autohide=true,showembed=true" name="initParams" /><param value="#00000000" name="background" /><param name="minRuntimeVersion" value="3.0.50106.0" /><param name="windowless" value="true" /><param name="enableGPUAcceleration" value="true" /><param name="autoUpgrade" value="true" /><a href="http://go.microsoft.com/fwlink/?LinkID=149156&#038;v=3.0.50106.0" style="text-decoration:none"><br />
	  <img src="http://www.msteched.com/Skins/TechEdOnline/Styles/images/NoSilverlight.jpg" alt="Get Microsoft Silverlight" style="border-style:none"/><br />
  </a><br />
</object></p>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/windows-phone-7-demo-fest-tech-ed-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://ecn.channel9.msdn.com/o9/te/Europe/2010/wmv/wph103-lnc.wmv" length="139729637" type="video/asf" />
		</item>
		<item>
		<title>Come and Meet the Windows Phone 7 Team @ Tech Ed Europe 2010</title>
		<link>http://robtiffany.com/come-and-meet-the-windows-phone-7-team-tech-ed-europe-2010/</link>
		<comments>http://robtiffany.com/come-and-meet-the-windows-phone-7-team-tech-ed-europe-2010/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 15:52:10 +0000</pubDate>
		<dc:creator>Rob Tiffany</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[MEAP]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile Enterprise Application Platform]]></category>
		<category><![CDATA[Mobile Middleware]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2010 Express for Windows Phone]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Wireless]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://robtiffany.com/?p=369</guid>
		<description><![CDATA[Do you have a burning question related to Windows Phone?  Are you unsure, confused or need more information?  Do you have feedback you want to share?  Whatever your motivation, this session is not to be missed.  For one time only &#8230; <a href="http://robtiffany.com/come-and-meet-the-windows-phone-7-team-tech-ed-europe-2010/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>Do you have a burning question related to <strong>Windows Phone</strong>?  Are you unsure, confused or need more information?  Do you have feedback you want to share?  Whatever your motivation, this session is not to be missed.  For one time only at Tech Ed Europe 2010, you will have virtually all the Windows Phone speakers in one room to answer your questions, listen to your feedback and discuss anything Windows Phone 7!  This session has proven to be very lively in the past and with such a great platform to talk about, we expect it to be even more so this year!</div>
<p></p>
<div>Come spend some time with <strong>me</strong>, <strong>Augusto Valdez</strong>, <strong>Daniel Bouie</strong>, <strong>Jaime Rodriguez</strong>, <strong>Larry Lieberman</strong>, and <strong>Maarten Struys</strong> at session <strong>WPH117-IS</strong>  next week in <strong>Berlin at <a href="http://europe.msteched.com/default.aspx" target="_blank">Tech Ed Europe 2010</a></strong>!</div>
<div>-Rob</div>
]]></content:encoded>
			<wfw:commentRss>http://robtiffany.com/come-and-meet-the-windows-phone-7-team-tech-ed-europe-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

