<?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>DamienG &#187; Microsoft</title>
	<atom:link href="http://damieng.com/blog/category/technology/microsoft/feed" rel="self" type="application/rss+xml" />
	<link>http://damieng.com</link>
	<description>A .NET developer in Redmond</description>
	<lastBuildDate>Mon, 30 Aug 2010 16:23:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>LINQ to SQL changes in .NET 4.0</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=linq-to-sql-changes-in-net-40</link>
		<comments>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comments</comments>
		<pubDate>Mon, 01 Jun 2009 22:15:29 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[linq-to-sql]]></category>

		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40</guid>
		<description><![CDATA[People have been asking via Twitter and the LINQ to SQL forums so here’s a list I put together on a number of the changes made for 4.0. 25 Aug 2009 – Updated with additional changes, some of which are new in beta 2. Change list Performance Query plans are reused more often by specifically [...]]]></description>
			<content:encoded><![CDATA[<p>People have been asking via Twitter and the LINQ to SQL forums so here’s a list I put together on a number of the changes made for 4.0.</p>
<p class="new"><strong>25 Aug 2009</strong> – Updated with additional changes, some of which are new in beta 2. </p>
<h3>Change list</h3>
<h4>Performance</h4>
<ul>
<li>Query plans are reused more often by specifically defining text parameter lengths (when connecting to SQL 2005 or later)</li>
<li>Identity cache lookups for primary key with single result now includes query.Where(predicate).Single/SingleOrDefault/First/FirstOrDefault </li>
<li>Reduced query execution overhead when DataLoadOptions specified (cache lookup considers DataLoadOptions value equivalency)</li>
</ul>
<h4>Usability</h4>
<ul>
<li>ITable&lt;T&gt; interface for additional mocking possibilities </li>
<li>Contains with enums automatically casts to int or string depending on column type </li>
<li>Associations can now specify non-primary-key columns on the other end of the association for updates </li>
<li>Support list initialization syntax for queries </li>
<li>LinqDataSource now supports inherited entities </li>
<li>LinqDataSource support for ASP.NET query extenders added </li>
</ul>
<h4>Query stability</h4>
<ul>
<li>Contains now detects self-referencing IQueryable and doesn&#8217;t cause a stack overflow </li>
<li>Skip(0) no longer prevents eager loading </li>
<li>GetCommand operates within SQL Compact transactions </li>
<li>Exposing Link&lt;T&gt; on a property/field is detected and reported correctly </li>
<li>Compiled queries now correctly detect a change in mapping source and throw </li>
<li>String.StartsWith, EndsWith and Contains now correctly handles ~ in the search string (regular &amp; compiled queries)</li>
<li>Now detects multiple active result sets (MARS) better </li>
<li>Associations are properly created between entities when using eager loading with Table-Valued Functions (TVFs) </li>
<li>Queries that contain sub-queries with scalar projections now work better </li>
</ul>
<h4>Update stability</h4>
<ul>
<li>SubmitChanges no longer silently consumes transaction rollback exceptions </li>
<li>SubmitChanges deals with timestamps in a change conflict scenario properly </li>
<li>IsDbGenerated now honors renamed properties that don&#8217;t match underlying column name </li>
<li>Server-generated columns and SQL replication/triggers now work instead of throwing SQL exception </li>
<li>Improved binding support with the MVC model binder</li>
</ul>
<h4>General stability</h4>
<ul>
<li>Binary types equate correctly after deserialization </li>
<li>EntitySet.ListChanged fired when adding items to an unloaded entity set </li>
<li>Dispose our connections upon context disposal (ones passed in are untouched) </li>
</ul>
<h4>Database&#160; control</h4>
<ul>
<li>DeleteDatabase no longer fails with case-sensitive database servers</li>
</ul>
<h4>SQL Metal</h4>
<ul>
<li>Foreign key property setter now checks all affected associations not just the first </li>
<li>Improved error handling when primary key type not supported </li>
<li>Now skips stored procedures containing table-valued parameters instead of aborting process </li>
<li>Can now be used against connections that use AttachDbFilename syntax </li>
<li>No longer crashes when unexpected data types are encountered </li>
</ul>
<h4>LINQ to SQL class designer</h4>
<ul>
<li>Now handles a single anonymously named column in SQL result set </li>
<li>Improved error message for associations to nullable unique columns </li>
<li>No longer fails when using clauses are added to the partial user class </li>
<li>VarChar(1) now correctly maps to string and not char </li>
<li>Decimal precision and scale are now emitted correctly in the DbType attributes for stored procedures &amp; computed columns</li>
<li>Foreign key changes will be picked up when bringing tables back into the designer without a restart </li>
<li>Can edit the return value type of unidentified stored procedure types</li>
<li>Stored procedure generated classes do not localize the word “Result” in the class name</li>
<li>Opening a DBML file no longer causes it to be checked out of source control</li>
<li>Changing a FK for a table and re-dragging it to the designer surface will show new FK’s</li>
</ul>
<h4>Code generation (SQL Metal + LINQ to SQL class designer)</h4>
<ul>
<li>Stored procedures using original values now compiles when the entity and context namespaces differ </li>
<li>Virtual internal now generates correct syntax </li>
<li>Mapping attributes are now fully qualified to prevent conflicts with user types </li>
<li>KnownTypeAttributes are now emitted for DataContractSerializer with inheritance </li>
<li>Delay-loaded foreign keys now have the correct, compilable, code generated </li>
<li>Using stored procedures with concurrency no longer gets confused if entities in different namespace to context </li>
<li>ForeignKeyReferenceAlreadyHasValueException is now thrown if any association is loaded not just the first </li>
</ul>
<h3></h3>
<h3>Potentially breaking changes</h3>
<p>We worked very hard to avoid breaking changes but of course any potential bug fix is a breaking change if your application was depending on the wrong behavior. The ones I specifically want to call out are:</p>
<h4>Skip(0) is no longer a no-op</h4>
<p>The special-casing of 0 for Skip to be a no-op was causing some subtle issues such as eager loading to fail and we took the decision to stop special casing this. This means if you had syntax that was invalid for a Skip greater than 0 it will now also be invalid for skip with a 0. This makes more sense and means your app would break on the first page now instead of subtlety breaking on the second page. Fail fast :)</p>
<h4>ForeignKeyReferenceAlreadyHasValue exception</h4>
<p>If you are getting this exception where you weren’t previously it means you have an underlying foreign key with multiple associations based on it and you are trying to change the underlying foreign key even though we have associations loaded.Best thing to do here is to set the associations themselves and if you can’t do that make sure they aren’t loaded when you want to set the foreign key to avoid inconsistencies.</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40/feed</wfw:commentRss>
		<slash:comments>83</slash:comments>
		</item>
		<item>
		<title>LINQ to SQL next steps</title>
		<link>http://damieng.com/blog/2008/10/31/linq-to-sql-next-steps?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=linq-to-sql-next-steps</link>
		<comments>http://damieng.com/blog/2008/10/31/linq-to-sql-next-steps#comments</comments>
		<pubDate>Sat, 01 Nov 2008 00:15:14 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[entity framework]]></category>
		<category><![CDATA[linq-to-sql]]></category>

		<guid isPermaLink="false">http://damieng.com/?p=1082</guid>
		<description><![CDATA[There has been a flurry of posts and comments in the last 24 hours over the future of LINQ to SQL so I thought it would be interesting to provide some information on what the LINQ to SQL team have been up to and what we’re working on for .NET Framework 4.0. A little background [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a flurry of posts and comments in the last 24 hours over the future of LINQ to SQL so I thought it would be interesting to provide some information on what the LINQ to SQL team have been up to and what we’re working on for .NET Framework 4.0.</p>
<h3>A little background</h3>
<p>LINQ was a new feature in .NET 3.5 that provides a store-agnostic query language syntax using a provider model.</p>
<p>As part of that initiative the C# team delivered LINQ to SQL – a LINQ provider to SQL Server with additional update and access management via DataContext and mapping tools such as the designer and SQL Metal. The result is a great lightweight solution that is easy to get started with and a good data access solution where your database and objects are closely aligned.</p>
<p>Meanwhile Data Programmability worked on an initiative to provide abstraction between conceptual and physical models of databases to allow applications to operate independently of the database vendor and underlying physical schema. LINQ support was also added in the form of LINQ to Entities and it shipped with it’s management tools in .NET 3.5 SP1.</p>
<p>Which now means we have two object-relational mapping options that overlap in some areas but with very different backgrounds.</p>
<h3>The story so far</h3>
<p>Some time before I started in May LINQ to SQL was handed over to Data Programmability.</p>
<p>One of the first things you notice is that the overlap between the two object-relational mapping solutions Microsoft causes confusion and hesitation.</p>
<blockquote><p>Do I want something lightweight and easy or do I need the extra abstraction with a richer feature set?     <br /> If I want to start with LINQ to SQL today but know that the database won’t stay under my control how would I move to Entity Framework?</p>
</blockquote>
<p>These are the questions that many developers face and our team spent a lot of time looking at the differences between the two stacks, how they behave and which features were missing if you wanted to migrate from LINQ to SQL to Entity Framework v1. We put together code samples, some helpers and documentation which are now being <a href="http://blogs.msdn.com/adonet/">serialized on the ADO.NET blog</a> and left us with a better understanding of the disparity – some of which the EF team have already addressed in v2.</p>
<h3>Where next</h3>
<p>The decision has been made that <a href="http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx">Entity Framework is the recommended solution for LINQ to relational scenarios</a> but we are committed to looking after our users and are approaching this in two ways.</p>
<p>Firstly we are going to make sure LINQ to SQL continues to operate as it should. This doesn’t just mean making sure what we had works in .NET 4.0 but also fixing a number of issues that have arisen as people pick it up for more advanced projects and put it into production environments.</p>
<p>Secondly we will evolve LINQ to Entities to encompass the features and ease of use that people have come to expect from LINQ to SQL. In .NET 4.0 this already includes additional LINQ operators and better persistence-ignorance.</p>
<p>This isn’t to say LINQ to SQL won’t ever get new features. The communities around LINQ to SQL are a continuous source of ideas and we need to consider how they fit the minimalistic lightweight approach LINQ to SQL is already valued for. Where these suggestions fit with this strategy we will be working hard to get them into the product. Some enhancements like the T4 templates can be released independently but runtime elements need to stick to the .NET Framework schedule.</p>
<h3>In conclusion</h3>
<p><font size="5">DON’T PANIC     <br /></font> (in large, friendly letters)</p>
<p>LINQ to SQL will continue to work and EF will better address the needs of LINQ to SQL users with each new release.</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2008/10/31/linq-to-sql-next-steps/feed</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>From the vaults of Twitter</title>
		<link>http://damieng.com/blog/2008/07/10/from-the-vaults-of-twitter?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=from-the-vaults-of-twitter</link>
		<comments>http://damieng.com/blog/2008/07/10/from-the-vaults-of-twitter#comments</comments>
		<pubDate>Thu, 10 Jul 2008 19:50:35 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[c sharp]]></category>
		<category><![CDATA[Envy-Code-R]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://damieng.com/blog/2008/07/10/from-the-vaults-of-twitter</guid>
		<description><![CDATA[I don&#8217;t normally republish my Tweets but are my highlights. damienguard: Methods returning &#34;this&#34; is a hack for fluency. Let&#8217;s get &#34;..&#34; added to the C# compiler to operate on previous object. a.This()..That() lazycoder: @damienguard I can&#8217;t decide if that&#8217;s genius or insanity. Should we add the &#34;~&#34; operator to refer back to the top [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t normally republish <a href="http://twitter.com/damienguard">my Tweets</a> but are my highlights.</p>
<blockquote><p><a href="http://twitter.com/damienguard">damienguard</a>:       <br />Methods returning &quot;this&quot; is a hack for fluency. Let&#8217;s get &quot;..&quot; added to the C# compiler to operate on previous object. a.This()..That() </p>
<p><a href="http://twitter.com/lazycoder">lazycoder</a>:       <br /><a href="http://twitter.com/damienguard">@<b>damienguard</b></a> I can&#8217;t decide if that&#8217;s genius or insanity. Should we add the &quot;~&quot; operator to refer back to the top of the inherit. chain? ;)</p>
</blockquote>
<blockquote><p><a href="http://twitter.com/LostInTangent">LostInTangent</a>:       <br /><a href="http://twitter.com/damienguard">@<b>damienguard</b></a> I&#8217;ve started using Envy Code R for most of my applications (not just VS) and I have to say I&#8217;m loving it.</p>
<p><a href="http://twitter.com/damienguard">damienguard</a>:       <br /><a href="http://twitter.com/LostInTangent">@LostInTangent</a>: Envy Code R PR8 soon &#8211; Greek chars, improved hinting and some glyph revisions subscript/fractions &amp; *96 redone.</p>
</blockquote>
<blockquote><p><a href="http://twitter.com/damienguard">damienguard</a>:       <br />Statically typed languages are not flexible enough to develop dynamically linked libraries.</p>
</blockquote>
<blockquote><p><a href="http://twitter.com/damienguard">damienguard</a>:       <br />Renaming your wifi router StupidRouter does not alas shame it into being more reliable.</p>
</blockquote>
<blockquote><p><a href="http://twitter.com/damienguard">damienguard</a>:       <br /><a href="http://twitter.com/command_tab">@command_tab</a>: Am I the only one who finds paying for pretty UI&#8217;s to leverage free software that took much more effort to develop offensive?</p>
</blockquote>
<blockquote><p><a href="http://twitter.com/damienguard">damienguard</a>:       <br />Just took delivery on my Alps-switched keyboard&#8230; feels good so far&#8230; but let&#8217;s see if co-workers complain about the noise. </p>
<p><a href="http://twitter.com/Plip">Plip</a>:       <br /><a href="http://twitter.com/damienguard">@<b>damienguard</b></a> I CAN&#8217;T HEAR MYSELF THINK FOR THAT INFERNAL CLICKING ! </p>
<p><a href="http://twitter.com/damienguard">damienguard</a>:       <br /><a href="http://twitter.com/lancefisher">@lancefisher</a> The alps keyboard was from DSI USA&#8230; but don’t order one, terrible 2-key limits prevent fast typing.</p>
</blockquote>
<blockquote><p><a href="http://twitter.com/damienguard">damienguard</a>:       <br />Apple should add hobbyist to its OS X line-up. Make kernel easier to switch, remove the h/w lockdown and no support.</p>
</blockquote>
<blockquote><p><a href="http://twitter.com/damienguard">damienguard</a>:       <br />Standard windows font smoothing&#8217;s real problem is lack of scales. Convert a ClearType rendering to greyscale in Photoshop&#8230;</p>
</blockquote>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2008/07/10/from-the-vaults-of-twitter/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Experimental LINQ to SQL template</title>
		<link>http://damieng.com/blog/2008/06/25/experimental-linq-to-sql-template-for-t4?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=experimental-linq-to-sql-template-for-t4</link>
		<comments>http://damieng.com/blog/2008/06/25/experimental-linq-to-sql-template-for-t4#comments</comments>
		<pubDate>Wed, 25 Jun 2008 22:12:46 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[linq-to-sql]]></category>
		<category><![CDATA[t4]]></category>
		<category><![CDATA[text templating]]></category>

		<guid isPermaLink="false">http://damieng.com/?p=922</guid>
		<description><![CDATA[A newer version of this LINQ to SQL template is available. While SQL Metal does a good job of turning your SQL schema into a set of classes for you it doesn&#8217;t let you customize the code generation process. Usefully there is now a templating system built into Visual Studio 2008 called Text Templates (T4 [...]]]></description>
			<content:encoded><![CDATA[<p class="new">A newer version of <a href="http://damieng.com/blog/2009/01/19/linq-to-sql-templates-updated-now-on-codeplex">this LINQ to SQL template is available</a>.</p>
<p>While SQL Metal does a good job of turning your SQL schema into a set of classes for you it doesn&#8217;t let you customize the code generation process.</p>
<p>Usefully there is now a templating system built into Visual Studio 2008 called <a href="http://msdn.microsoft.com/en-us/library/bb126445.aspx">Text Templates</a> (T4 for short).</p>
<p>Here is a short (369 line) experimental proof-of-concept T4 template I wrote last night that will generate a data context and associated entity classes as a starting point similar to that produced by SqlMetal.</p>
<p class="download">Download of this old version no longer available, see the <a href="http://damieng.com/blog/2009/01/19/linq-to-sql-templates-updated-now-on-codeplex">newer article!</a></p>
<p>Once downloaded unzip and drop the DataContext.cs.tt into your project and edit line 17 to set the connection string. You can also edit lines 18 and 19 to set the namespace and class name. The lightweight wrappers around database, table and column can be found at the end of the file &#8211; they simply wrap the SQL Server Information_Schema views as briefly as possible.</p>
<p>Within seconds Visual Studio should have created a code-behind file for the DataContext named DataContext.cs.cs with your generated code ready to use :) If you don&#8217;t like the way the template generates your context you can change it :)</p>
<div class="alert">There are limitations with this experimental proof-of-concept including: </p>
<ul>
<li>Processes all and only tables in the database (no views or SP&#8217;s)</li>
<li>Foreign-key relationships are not implemented</li>
<li>Column attributes for IsDbGenerated, UpdateCheck and AutoSync not implemented</li>
<li>C# only (<a href="http://www.thedatafarm.com/blog/">sorry Julie</a>)</li>
<li>Plural and singular naming rules are incomplete</li>
<li>Can&#8217;t modify schema as you could with a designer stage</li>
</ul>
</div>
<div class="information">To learn more about T4: </p>
<ul>
<li>Watch a <a href="http://msdn.microsoft.com/en-us/vstudio/cc308634.aspx">screencast about T4 in action</a> (download, embedded player is awful)</li>
<li>Grab <a href="http://www.t4editor.net/">T4 Editor</a> for IntelliSense within T4 and <a href="http://dotnet.org.za/hiltong/archive/2008/02/18/t4-template-items.aspx">T4 Template Items</a> for <em>Add New Item&#8230;</em> support</li>
<li>Check out <a href="http://www.olegsych.com/">Oleg Sych&#8217;s blog</a> for great T4 articles including how to <a href="http://www.olegsych.com/2008/02/t4-template-directive/">enable the 3.5 compiler for templates</a></li>
<li>Learn about <a href="http://blogs.msdn.com/garethj/archive/2006/01/09/t4debugging.aspx">T4 debugging</a></li>
</ul>
</div>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2008/06/25/experimental-linq-to-sql-template-for-t4/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Four Windows apps for home-sick Mac users</title>
		<link>http://damieng.com/blog/2008/04/17/four-windows-apps-for-home-sick-mac-users?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=four-windows-apps-for-home-sick-mac-users</link>
		<comments>http://damieng.com/blog/2008/04/17/four-windows-apps-for-home-sick-mac-users#comments</comments>
		<pubDate>Thu, 17 Apr 2008 11:08:16 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[dash]]></category>
		<category><![CDATA[digsby]]></category>
		<category><![CDATA[e text editor]]></category>
		<category><![CDATA[libra]]></category>
		<category><![CDATA[windows applications]]></category>

		<guid isPermaLink="false">http://damieng.com/?p=893</guid>
		<description><![CDATA[Libra (like Delicious Library) Delicious Library is a DVD, game and book organisation tool I&#8217;ve been using since my PowerBook G4 and a 2.0 version has been dangling from Wil Shipley&#8217;s mouth longer than I care to remember. Windows users however will find Libra a very interesting clone and it features some of the same [...]]]></description>
			<content:encoded><![CDATA[<h3>Libra (like Delicious Library)</h3>
<p><a href="http://www.delicious-monster.com/">Delicious Library</a> is a DVD, game and book organisation tool I&#8217;ve been using since my PowerBook G4 and a 2.0 version has been dangling from Wil Shipley&#8217;s mouth longer than I care to remember.</p>
<p>Windows users however will find <a href="http://www.getlibra.com/">Libra</a> a very interesting clone and it features some of the same great features such as bar-code scanning via a web cam, tracking loans, a rendered virtual shelf and fast queries.</p>
<p>Unlike Delicious Library 1.x it also features sharing your library on-line, tweaking the types and rendering and a more advanced query engine and is available free for non-commercial use.</p>
<h3>E Text Editor (like TextMate)</h3>
<p><a href="http://macromates.com/">TextMate</a> is a programming editor for the Mac that can be extended through the use of Bundles to provide additional syntax highlighting, menu options and command processing. It is fast, feels lightweight and therefore incredibly customisable all of which contribute to it&#8217;s success.</p>
<p><a href="http://www.e-texteditor.com/">E Text Editor</a> is a Windows clone of TextMate that doesn&#8217;t just mimic the user interface but also provides compatibility with TextMate bundles allowing you to take advantage of some of the many great enhancements available and at $34 is almost half the price although it doesn&#8217;t feel as snappy as it&#8217;s Mac counterpart.</p>
<h3>Digsby (like Adium)</h3>
<p><a href="http://www.adiumx.com/">Adium</a> is my instant messaging client of choice allowing me a single app to manage MSN, ICQ and Google Talk (I wish they would get basic Skype support in there too).</p>
<p><a href="http://www.digsby.com/">Digsby</a> provides similar functionality whilst also throwing social networking (Facebook, Twitter) and email notification (Hotmail, GMail, Yahoo Mail etc.) into the mix.</p>
<h3>Dash (like Quicksilver)</h3>
<p><a href="http://docs.blacktree.com/quicksilver/what_is_quicksilver">QuickSilver</a> provides a quick keyboard-based entry system for performing a wide variety of tasks and selections within Mac OS X and what it doesn&#8217;t do can often be added with plug-ins.</p>
<p><a href="http://www.trydash.com/">Dash</a> achieves a similar effect on Windows but I have to admit I&#8217;m not really sold on either yet. I think the movement from keyboard to mouse and back every now and then must be a good break for your hands if not for your productivity&#8230;</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2008/04/17/four-windows-apps-for-home-sick-mac-users/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Windows 2008 Server on my MacBook Pro</title>
		<link>http://damieng.com/blog/2008/04/02/windows-2008-server-on-my-macbook-pro?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=windows-2008-server-on-my-macbook-pro</link>
		<comments>http://damieng.com/blog/2008/04/02/windows-2008-server-on-my-macbook-pro#comments</comments>
		<pubDate>Wed, 02 Apr 2008 13:37:06 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[windows 2008 server]]></category>

		<guid isPermaLink="false">http://damieng.com/?p=894</guid>
		<description><![CDATA[A troublesome disk (a story for another time) has forced me to reinstall my MacBook Pro and review my Windows partition. My Boot Camp partition was running Vista Ultimate x86 which felt sluggish, ignored the last 1GB and bugged me with UAC. One Windows update kept failing to install which also prevented SP1 from completing. [...]]]></description>
			<content:encoded><![CDATA[<p>A troublesome disk (a story for another time) has forced me to reinstall my MacBook Pro and review my Windows partition.</p>
<p>My Boot Camp partition was running Vista Ultimate x86 which felt sluggish, ignored the last 1GB and bugged me with UAC. One Windows update kept failing to install which also prevented SP1 from completing.</p>
<p>Apple&#8217;s Boot Camp doesn&#8217;t support 64-bit Windows (except on the Mac Pro) and my 64-bit experiences have been unpleasant so far (no Flash for IE x64, limited 64-bit shell extensions, Live! refusing to install, drivers etc.) The increased x64 memory consumption would also be an issue when running in a 1.5GB virtual machine via Parallels or VMware Fusion.</p>
<p>Windows XP was one option but losing IIS7 and DirectX 10 would see me reinstalling Vista within weeks so I decided to try Windows 2008 Server x86.</p>
<p>Boot Camp happily accepted the 2008 Server x86 CD where I chose the BOOTCAMP partition, formatting it as NTFS and electing for a standard installation. The Boot Camp drivers subsequently installed without complaint, all 4GB of RAM was accessible and there are no 64-bit compatibility issues.</p>
<p>Microsoft are giving away 1 year evaluation copies of Windows 2008 Enterprise Server x86 as part of their Heroes Happen Here launch program for Windows 2008, SQL Server 2008 and Visual Studio 2008 if you don&#8217;t happen to have an MSDN subscription to hand. There are however a few tweaks you need to do to get a more desktop-like experience:</p>
<h3>Install desktop features</h3>
<p>Head into <em>Server Manager</em> and <em>Add Features</em> then choose <em>Desktop Experience</em> to install Windows Media Player, Aero etc.</p>
<p>Go into <em>Services </em>and set the <em>Themes </em>service to <em>Automatic </em>and <em>Start </em>it to make themes available and then choose <em>Browse&#8230;</em> from the <em>Theme Settings</em> in <em>Personalisation </em>to select <em> %windir%\Resources\Themes\Aero.theme</em></p>
<h3>Install wireless networking</h3>
<p>This one had me stumped for a while as I thought my wireless card/drivers weren&#8217;t working. The reality is that 2008 Server has wireless networking removed by default so head into <em>Server Manager &gt; Add Features &gt; Wireless LAN Service </em>to install it.</p>
<h3>Enabling hibernate</h3>
<p>Open a command prompt and enter:</p>
<pre><code>powercfg.exe /hibernate on</code></pre>
<h3>Remove annoying shutdown</h3>
<p>Head into the registry to <em>HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Reliability</em> and change the <em>ShutdownReasonOn </em>DWORD key to <em>0</em>.</p>
<h3>Relaxing local password policy</h3>
<p>A controversial change I&#8217;m sure but I&#8217;d rather choose something complex and unique that will last 90+ days than something memorable every 30.  Head into <em>Local Security Policy</em> &gt; <em>Account Policies</em> &gt; <em>Password Policy</em> &gt; <em>Maximum password age</em> and change it to something more reasonable.</p>
<h3>Going further</h3>
<p>A great guide with <a href="http://www.win2008workstation.com/wordpress/">screen-shots on additional tweaks for a more workstation-like experience</a> also exists &#8211; wish I known about that earlier!</p>
<div class="new"><a href="http://codeclimber.net.nz/archive/2008/04/07/Running-Win2008-on-my-Mac.aspx">Simone Chiaretta</a> has highlighted the that tap-to-click is absent and there are some Bluetooth issues stemming from missing drivers.</div>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2008/04/02/windows-2008-server-on-my-macbook-pro/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Joining the LINQ to SQL team at Microsoft</title>
		<link>http://damieng.com/blog/2008/04/01/joining-the-linq-to-sql-team-at-microsoft?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=joining-the-linq-to-sql-team-at-microsoft</link>
		<comments>http://damieng.com/blog/2008/04/01/joining-the-linq-to-sql-team-at-microsoft#comments</comments>
		<pubDate>Tue, 01 Apr 2008 15:12:24 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[linq-to-sql]]></category>

		<guid isPermaLink="false">http://damieng.com/?p=899</guid>
		<description><![CDATA[I&#8217;ve been quiet on my blog lately largely because I have been preparing to change job and relocate half-way around the world to Vancouver in the beautiful province of British Columbia (where I spent my 2004 summer holiday). In February I travelled out to Redmond for three days of interviews (one position grew to two, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been quiet on my blog lately largely because I have been preparing to change job and relocate half-way around the world to Vancouver in the beautiful province of British Columbia (where I spent my 2004 summer holiday).</p>
<p>In February I travelled out to Redmond for three days of interviews (one position grew to two, then three). Having read the <a href="http://blogs.msdn.com/jobsblog/">Microsoft Jobs Blog</a> I was prepared for long hard days but in reality the process was incredibly enjoyable and exciting.</p>
<p>So much so I wanted to find a desk and move in right then.</p>
<p>With some luck I also found myself at Hanselman&#8217;s geek dinner which involved some great discussions and the chance to meet <a href="http://www.hanselman.com/blog/">Scott</a> himself, <a href="http://bradwilson.typepad.com/">Brad Wilson</a> and <a href="http://www.nikhilk.net/">Nikhil Kothari</a> who I knew from .NET on-line community as well as some 35 other developers from both within Microsoft and the outside world. It was one fun evening and my thanks go to Scott for kindly driving me back to my hotel in Redmond town centre.</p>
<p>Many white-boards and a few lunches later (including an unexpected one with <a href="http://haacked.com/">Phil Haack</a>, Nikhil and two more guys from ASP.NET team &#8211; I wish I could remember all the names of the people I met!) I found myself with the hard task of choosing a position.</p>
<p>I settled on a developer role within the <a href="http://msdn2.microsoft.com/en-us/library/bb425822.aspx">LINQ to SQL</a> team starting mid-May and am counting down the days&#8230;</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2008/04/01/joining-the-linq-to-sql-team-at-microsoft/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Visual Studio, Windows Server and SQL Server 2008 launch in Guernsey</title>
		<link>http://damieng.com/blog/2008/03/19/visual-studio-windows-server-and-sql-server-2008-launch-in-guernsey?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=visual-studio-windows-server-and-sql-server-2008-launch-in-guernsey</link>
		<comments>http://damieng.com/blog/2008/03/19/visual-studio-windows-server-and-sql-server-2008-launch-in-guernsey#comments</comments>
		<pubDate>Wed, 19 Mar 2008 10:08:43 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Guernsey]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[heroes happen here]]></category>
		<category><![CDATA[visual studio 2008]]></category>

		<guid isPermaLink="false">http://damieng.com/blog/2008/03/19/visual-studio-windows-server-and-sql-server-2008-launch-in-guernsey</guid>
		<description><![CDATA[The various Heroes Happen Here community events in the UK/USA to celebrate the launch of Visual Studio 2008 etc. made me envious that we don&#8217;t get such events and goodies here on the little island of Guernsey so I thought I&#8217;d so something about it! We at the Guernsey Software Developer Forum are hosting a [...]]]></description>
			<content:encoded><![CDATA[<p>The various Heroes Happen Here community events in the UK/USA to celebrate the launch of Visual Studio 2008 etc. made me envious that we don&#8217;t get such events and goodies here on the little island of Guernsey so I thought I&#8217;d so something about it!</p>
<p>We at the <a href="http://developers.org.gg">Guernsey Software Developer Forum</a> are hosting a <a href="http://www.heroescommunitylaunch.com/">community event in conjunction with Microsoft</a> to celebrate the launch of Visual Studio 2008, Windows Server 2008 and SQL Server 2008.</p>
<p>The event starts at 6:30pm on March 27th (next Thursday) at <a href="http://www.lesrocquettesguernsey.com/">La Rocquettes hotel</a> in St. Peter Port, Guernsey.</p>
<p>We will be giving away a bunch of goodies including the Heroes Happen Here launch packs with promotional copies of Visual Studio 2008 Standard, Windows 2008 Enterprise Server and SQL Server 2008 Developer as well as demonstrating some of the new features of Visual Studio 2008 and .NET 3.5.</p>
<p><img src="http://www.microsoft.com/heroeshappenhere/images/hero_event.jpg" alt="Heroes Happen Here launch event" style="align:center" /></p>
<p>I&#8217;m hoping this event will be bigger than normal GSDF events given the cool stuff we are giving away and the interest from non-developers in Windows 2008 and SQL Server 2008 so tell your friends (if you&#8217;re in Guernsey of course)</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2008/03/19/visual-studio-windows-server-and-sql-server-2008-launch-in-guernsey/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DLookup for Excel</title>
		<link>http://damieng.com/blog/2008/02/28/dlookup-for-excel?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=dlookup-for-excel</link>
		<comments>http://damieng.com/blog/2008/02/28/dlookup-for-excel#comments</comments>
		<pubDate>Thu, 28 Feb 2008 13:33:02 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[vba]]></category>

		<guid isPermaLink="false">http://damieng.com/blog/2008/02/28/dlookup-for-excel</guid>
		<description><![CDATA[I had to do a couple of ad-hoc Excel jobs today and found that whilst Excel has a VLookup function for spreadsheet/ranges it doesn&#8217;t have one for databases. It&#8217;s been a while since I touched VBA and Access but the DLookup function was quite useful so here it is for Excel. Read the warnings below [...]]]></description>
			<content:encoded><![CDATA[<p>I had to do a couple of ad-hoc Excel jobs today and found that whilst Excel has a VLookup function for spreadsheet/ranges it doesn&#8217;t have one for databases.</p>
<p>It&#8217;s been a while since I touched VBA and Access but the DLookup function was quite useful so here it is for Excel. Read the warnings below before you use it!</p>
<pre><code>
Public Function DLookup(expression As String, domain As String, criteria As String, Optional connectionString As String)

    Dim con As ADODB.connection
    Set con = New ADODB.connection
    If IsMissing(connectionString) Then
        con.Open "Driver={SQL Server};Server=abc;Database=def;Trusted_Connection=Yes;"
    Else
        con.Open connectionString
    End If

    Dim rs As ADODB.Recordset
    Dim sql As String
    sql = "SELECT TOP 1 " + expression + " FROM " + domain + " WHERE " + criteria
    Set rs = con.Execute(sql)
    If Not rs.EOF Then DLookup = rs(0)
    rs.Close
    Set rs = Nothing

    con.Close
    Set con = Nothing

End Function
</code></pre>
<p>Copy and paste the code above into an Excel module and replace the &#8220;Driver=&#8230; with what you want to be your default connection.</p>
<p>Some examples of use:</p>
<p>To select the Name column from the Customers table where the numeric ID is held in column 2.</p>
<pre><code>
=DLookup("Name","Customers","ID=" &#038; A2)
</code></pre>
<p>To return Forename and Surname columns joined together with a space from the Contacts table in the crm database using the postcode from column 5</p>
<pre><code>
=DLookup("Forname + ' ' + Surname","crm..Contact","PostCode='" &#038; A5 &#038; "'")
</code></pre>
<p>To return Description from a Products table held in another connection using a partial like match from column 1:</p>
<pre><code>
=DLookup("Description","Products","OrderCode LIKE '" &#038; A1 &#038; "%'", "DSN=SecondaryDSN")
</code></pre>
<p>I think you get the idea!</p>
<div class="alert">
There are a few caveats you need to be aware of using this function:</p>
<ul>
<li>It only returns the first value of the first row</li>
<li>DLookup&#8217;s are not efficient opening a connection each time it is referenced. This could put a lot of strain on your server.</p>
<li>DLookup syntax is open-ended and has some attack vectors.</li>
</ul>
</div>
<p>If that doesn&#8217;t scare you then give it a shot. As usual no warranty expressed or implied!</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2008/02/28/dlookup-for-excel/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Microsoft opens Office binary file format specifications</title>
		<link>http://damieng.com/blog/2008/02/18/microsoft-opens-office-binary-file-format-specifications?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=microsoft-opens-office-binary-file-format-specifications</link>
		<comments>http://damieng.com/blog/2008/02/18/microsoft-opens-office-binary-file-format-specifications#comments</comments>
		<pubDate>Mon, 18 Feb 2008 13:28:05 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://damieng.com/blog/2008/02/18/microsoft-opens-office-binary-file-format-specifications</guid>
		<description><![CDATA[Microsoft have released the binary file format specifications to their Office suite (the XML ones are already published) under their Open Specification Promise. I am not a lawyer but as far as I understand this means you are free to implement the standards with a promise that Microsoft will not use any patents under its [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft have released the <a href="http://www.microsoft.com/interop/docs/OfficeBinaryFormats.mspx">binary file format specifications to their Office suite</a> (the XML ones are already published) under their <a href="http://www.microsoft.com/interop/osp/">Open Specification Promise</a>.</p>
<p>I am not a lawyer but as far as I understand this means you are free to implement the standards with a promise that Microsoft will not use any patents under its control that are required to implement the specification against you.</p>
<p>Hopefully Apple will now address Keynote&#8217;s PowerPoint support bug so exported PPT&#8217;s works with Office 2007.</p>
<p>Now that the .NET Framework 3.5 source is available (for reference) and <a href="http://www.microsoft.com/presspass/exec/guthrie/default.mspx">Scott Guthrie (now VP)</a> announcing the <a href="http://weblogs.asp.net/scottgu/archive/2008/02/12/asp-net-mvc-framework-road-map-update.aspx">MVC framework will be user-buildable and patchable</a> (not redistributable) and include project templates for a number of open-source testing frameworks the future is looking very rosy.</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2008/02/18/microsoft-opens-office-binary-file-format-specifications/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>What being open means to Apple &amp; Microsoft</title>
		<link>http://damieng.com/blog/2008/01/26/what-being-open-means-to-apple-microsoft?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=what-being-open-means-to-apple-microsoft</link>
		<comments>http://damieng.com/blog/2008/01/26/what-being-open-means-to-apple-microsoft#comments</comments>
		<pubDate>Sat, 26 Jan 2008 01:29:13 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[open policies]]></category>

		<guid isPermaLink="false">http://damieng.com/blog/2008/01/26/what-being-open-means-to-apple-microsoft</guid>
		<description><![CDATA[Apple Former Apple engineer Jens Alfke believes Apple&#8217;s external image has been polished until featureless. The restrictive staff blogging policies, the veil of secrecy around future plans and a carefully orchestrated three-person spokes-team of Jobs, Schiller and Ive lead to a very impersonal closed business. It certainly wasn&#8217;t always this way. The original Mac team [...]]]></description>
			<content:encoded><![CDATA[<h3>Apple</h3>
<p>Former Apple engineer Jens Alfke believes <a href="http://mooseyard.com/Jens/2008/01/gone-indie/">Apple&#8217;s external image has been polished until featureless</a>. The restrictive staff blogging policies, the veil of secrecy around future plans and a carefully orchestrated three-person spokes-team of Jobs, Schiller and Ive lead to a very impersonal closed business.</p>
<p>It certainly wasn&#8217;t always this way. The <a href="http://www.folklore.org/ProjectView.py?project=Macintosh&#038;index=3&#038;sortOrder=Sort%20by%20Date&#038;detail=medium&#038;gallery=1">original Mac team appeared in Rolling Stone magazine</a> with credit in about boxes, a practice that was continued at NeXT but abolished by Mac OS X Beta. Jobs makes regular comparisons between engineers and artists and touted individual thinking in the <a href="http://en.wikipedia.org/wiki/Think_Different">Think Different campaign</a> and artists like recognition with signatures on art and credits on film.</p>
<p>Conversely Apple&#8217;s Mac OS X operating system is built on open software and standards. The kernel is derived from open elements bundled up as Darwin which Apple provides back along with compilers, debug tools, programming language, command line tools, Bonjour, device driver kit and a bunch of drivers. All are open.</p>
<p>The web rendering technology in Safari (WebKit based on KHTML) is also open and changes rolled back to the communities often reveal unannounced insights into Apple&#8217;s plans (e.g. Safari for Windows).</p>
<p>And yet how many engineers write or talk about Apple? Do you know the names of any product managers? Could you find any out with Google? (LinkedIn doesn&#8217;t count ;-)</p>
<p>These aren&#8217;t academic questions, what if you have a great idea for a feature you&#8217;d like to see added? How can you discuss how a product could evolve to fit your needs? What about a simple bug report or advanced access to technology? (The answers are &#8220;send it to feedback@apple.com and don&#8217;t hold your breath&#8221;, &#8220;you can&#8217;t&#8221; and &#8220;join the developer program&#8221;) </p>
<p>Heaven forbid you do actually find out what their plans might be &#8211; you could find yourself talking to their lawyers like the ill-fated ThinkSecret site that featured rumors, speculation and the occasional insider info.</p>
<h3>Microsoft</h3>
<p>Jens makes a passing mention to Microsoft&#8217;s relaxed blogging policies.</p>
<p>Microsoft is a company that rarely provides the source, never ships or builds upon existing free software and yet not only discusses plans and roadmaps but actively solicits feedback in the design process through conferences, user groups, forums, mailing lists and even on-site review teams. Employees such as <a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> and <a href="http://blogs.msdn.com/brada/">Brad Abrams</a> have become quite well known within .NET communities often being the first to break announcements and provide quick feedback through their blogs.</p>
<p>The centre of this effort is engineering thanks to sites like <a href="http://channel9.msdn.com/">Channel 9</a> providing regular interviews, <a href="http://research.microsoft.com/">Microsoft Research</a> providing experiments to play with and <a href="http://www.codeplex.com/">CodePlex</a> hosting open projects.</p>
<p>But they aren&#8217;t the only ones reaching out.</p>
<p>Microsoft&#8217;s <a href="http://blogs.msdn.com/jobsblog/">HR &#038; recruiting team</a> and <a href="http://blogs.msdn.com/heatherleigh/">individuals</a> are also putting up interesting insights and thoughts on how the company operates and head of the Xbox Live! is so active in this area that the name <a href="http://www.majornelson.com/">Major Nelson</a> is known to any serious 360 owner.</p>
<h3>Being open</h3>
<p>How strange that Apple embraces open technologies yet keeps communication closed and Microsoft&#8217;s technologies are still quite closed yet communication is very much open.</p>
<p>What does it mean to be open and where will each company&#8217;s approach lead them?</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2008/01/26/what-being-open-means-to-apple-microsoft/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>When SQL Server replication eats disk space</title>
		<link>http://damieng.com/blog/2007/12/17/when-sql-server-replication-eats-disk-space?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=when-sql-server-replication-eats-disk-space</link>
		<comments>http://damieng.com/blog/2007/12/17/when-sql-server-replication-eats-disk-space#comments</comments>
		<pubDate>Mon, 17 Dec 2007 15:02:28 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[sql-server]]></category>

		<guid isPermaLink="false">http://damieng.com/blog/2007/12/17/when-sql-server-replication-eats-disk-space</guid>
		<description><![CDATA[Part of my job involves revising our SQL Server architecture. My plan includes the addition of a read-only reporting SQL pair for non-critical enquiries and reports. This allows the heavy and unpredictable load from reporting away from from the primary SQL pair responsible for critical operations (shipping orders). We utilised SQL Server&#8217;s publisher-subscriber replication on [...]]]></description>
			<content:encoded><![CDATA[<p>Part of my job involves revising our SQL Server architecture. My plan includes the addition of a read-only reporting SQL pair for non-critical enquiries and reports. This allows  the heavy and unpredictable load from reporting away from from the primary SQL pair responsible for critical operations (shipping orders).</p>
<p>We utilised SQL Server&#8217;s publisher-subscriber replication on the required databases which, given their legacy nature, had some cross-database dependencies that were added without due consideration.</p>
<p>The reporting SQL pair needed to be rebuilt so the subscriptions were removed whilst they were being rebuilt. Within three days our primary servers were out of disk space and we had a problem that needed to be solved quickly.</p>
<p>Our first step was to remove the new publications. This released a small amount of space in the <em>distribution</em> database (now 100GB) and allowed the replicated databases logs to be truncated and shrunk. We now had a little breathing room.</p>
<p>One publication would not remove in a reasonable time (10+ hours) and even trying to remove individual articles caused a slow-running operation sat on <em>PAGEIOLATCH_SH</em> (which Microsoft describe as waiting on disk IO). A quick investigation revealed a complex query on internal system tables with no indexes &#8211; presumably for fast insert performance.<br />
In the mean-time this slow-running operation would block the replication agents which are also used by IBM&#8217;s DataMirror product to replicate data back to the iSeries (AS/400) in real time. This blocking would prevent us shipping orders and was therefore unacceptable.</p>
<p>The database in question is a home-grown data warehousing application rebuilt each night and on reflection was a terrible idea to replicate using this method. Each night it generated over twice it&#8217;s own size in replication activity. Given we have a 72 hour replication retention and the size of the database that alone was enough to wipe out the disk space on our server within 3 days.</p>
<p><em>Reinitialize All Subscriptions </em>was the magic bullet which ran in just a minute allowing the publication to be subsequently instantly deleted. The replicated databases transaction logs were then truncated and shrunk giving us ample breathing space on the storage front.</p>
<p>The distribution database was still huge but heading into <em>Replication Monitor&#8217;s Common Jobs</em> and starting the <em>Distribution clean up: distribution job</em> was our final step.</p>
<p>The job might take all day but did not block any other replication activity :)</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2007/12/17/when-sql-server-replication-eats-disk-space/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQL Server replication blocking on cleanup job</title>
		<link>http://damieng.com/blog/2007/11/09/sql-server-replication-blocking-on-cleanup-job?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sql-server-replication-blocking-on-cleanup-job</link>
		<comments>http://damieng.com/blog/2007/11/09/sql-server-replication-blocking-on-cleanup-job#comments</comments>
		<pubDate>Fri, 09 Nov 2007 16:55:47 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[sql-server]]></category>

		<guid isPermaLink="false">http://damieng.com/blog/2007/11/09/sql-server-replication-deadlocking-on-cleanup-job</guid>
		<description><![CDATA[For some time my primary workplace has been having a problem with SQL Server replication delaying for several minutes at a time which is surprising given the 12GB of RAM and quad processor hardware behind it. Activity Monitor showed a number of processes on the distribution database used for SQL Server&#8217;s replication were blocked by [...]]]></description>
			<content:encoded><![CDATA[<p>For some time my primary workplace has been having a problem with SQL Server replication delaying for several minutes at a time which is surprising given the 12GB of RAM and quad processor hardware behind it.</p>
<p>Activity Monitor showed a number of processes on the distribution database used for SQL Server&#8217;s replication were blocked by another process which was in turn blocked by a SQL Agent &#8211; TSQL Job executing on the distribution database.</p>
<p>This process&#8217;s job GUID that did not match any of our jobs and appeared to be an internal job that regularly executes:</p>
<pre><code>EXEC dbo.sp_MSdistribution_cleanup @min_distretention = 0, @max_disretention = 32760</code></pre>
<p>This would sit on the <em>PAGEIOLATCH_SH</em> status for over 10 minutes at a time most most likely because it was operating on an <em>MSrepl_commands</em> table with 3.4 million records and a <em>MSrepl_transactions</em> table of 600k records.</p>
<p>The default max_disretention is 72 (hours) and specifies how long to hold the replication history for. This means if a subscriber is down for longer than this period it will loose transactions.</p>
<p>Quite how this system obtained the value 32760 (3.7 years) is a bit of a mystery and I&#8217;m assuming that it actually uses a lower value as there have been more than 3.4 million updates in that period.</p>
<p>Setting this value to 84 hours (3.5 days) in <em>Management Studio&#8217;s Replication &gt; Distributor Properties &gt; Transaction Retention</em> soon dropped those large MS tables down to 406 records and 300 respectively and resulted in <em>sp_MSdistribution_cleanup</em> executing in a couple of seconds.</p>
<p>It&#8217;s a very specific scenario but perhaps this blog post will be of use to somebody else!</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2007/11/09/sql-server-replication-blocking-on-cleanup-job/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Live Writer on Windows x64</title>
		<link>http://damieng.com/blog/2007/11/08/windows-live-writer-on-windows-x64?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=windows-live-writer-on-windows-x64</link>
		<comments>http://damieng.com/blog/2007/11/08/windows-live-writer-on-windows-x64#comments</comments>
		<pubDate>Thu, 08 Nov 2007 21:42:58 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[live writer]]></category>
		<category><![CDATA[windows x64]]></category>

		<guid isPermaLink="false">http://damieng.com/blog/2007/11/08/windows-live-writer-on-windows-x64</guid>
		<description><![CDATA[This article is now out of date and a x64 compatible installer can be found at the Windows Live! Writer home page. Windows Live Writer has finally been released but refuses to install on Windows x64 (64-bit) despite the promises made in the release notes of the previous beta. In fact it has an incredibly [...]]]></description>
			<content:encoded><![CDATA[<div class="new">This article is now out of date and a x64 compatible installer can be found at the <a href="http://windowslivewriter.spaces.live.com/">Windows Live! Writer home page</a>.</div>
<p>Windows Live Writer has finally been released but refuses to install on Windows x64 (64-bit) despite the promises made in the release notes of the previous beta. In fact it has an <a href="http://blogs.dovetailsoftware.com/blogs/kmiller/archive/2007/11/08/is-the-software-installer.aspx">incredibly confusing installer</a>.</p>
<p>This is especially annoying considering it&#8217;s such a great tool and that the new version finally supports a UK spell checker.</p>
<p><em>[)amien</em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2007/11/08/windows-live-writer-on-windows-x64/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Returned from Redmond</title>
		<link>http://damieng.com/blog/2007/10/27/returned-from-redmond?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=returned-from-redmond</link>
		<comments>http://damieng.com/blog/2007/10/27/returned-from-redmond#comments</comments>
		<pubDate>Sat, 27 Oct 2007 18:21:02 +0000</pubDate>
		<dc:creator>Damien Guard</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[redmond]]></category>

		<guid isPermaLink="false">http://damieng.com/blog/2007/10/27/returned-from-redmond</guid>
		<description><![CDATA[It&#8217;s been an overwhelming few days listening and interacting with bright people from the .NET community and within Microsoft itself (wish I could say more but I can&#8217;t). Here are just a few of those names, I wish I knew them all but I was so busy listening to what they had to say I [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been an overwhelming few days listening and interacting with bright people from the .NET community and within Microsoft itself (wish I could say more but I can&#8217;t).  Here are just a few of those names, I wish I knew them all but I was so busy listening to what they had to say I often forgot to ask for a card:</p>
<ul>
<li><a href="http://lostintangent.com/">Jonathan Carter</a></li>
<li><a href="http://dotnetaddict.dotnetdevelopersjournal.com/">Kevin Huffman</a></li>
<li><a href="http://blog.eleutian.com/">Aaron Jensen</a></li>
<li><a href="http://blogs.telerik.com/blogs/dimitar_kapitanov/default.aspx">Dimitar Kapitanov</a></li>
<li><a href="http://www.jameskovacs.com/blog/">James Kovaks</a></li>
<li><a href="http://blogs.devsource.com/devlife/">Julia Lerman</a></li>
<li><a href="http://codebetter.com/blogs/jeffrey.palermo/">Jeffrey Palmero</a></li>
<li><a href="http://blogs.telerik.com/blogs/vt/default.aspx">Vassil Terziev</a></li>
</ul>
<p>And from the Microsoft side of the fence</p>
<ul>
<li><a href="http://blogs.msdn.com/brada/">Brad Abrams</a></li>
<li><a href="http://blogs.msdn.com/pablo/">Pablo Castro</a></li>
<li>Simon Calvert</li>
<li><a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a></li>
<li><a href="http://weblogs.asp.net/leftslipper/archive/2007/12/10/asp-net-mvc-design-philosophy.aspx">Eilon Lipton</a></li>
<li><a href="http://weblogs.asp.net/lanceo/">Lance Olson</a></li>
</ul>
<p>Congratulations go out to Rob Conery who is now getting <a href="http://blog.wekeroad.com/2007/10/26/microsoft-subsonic-and-me/">paid by Microsoft to work on SubSonic</a>!</p>
<p>How cool is that!</p>
<p><em>[)amien </em></p>
]]></content:encoded>
			<wfw:commentRss>http://damieng.com/blog/2007/10/27/returned-from-redmond/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
