<?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>Strobaek Blog &#187; Tips</title>
	<atom:link href="http://blog.strobaek.org/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.strobaek.org</link>
	<description>Karsten Strøbæk&#039;s blog about current projects, code and life in general</description>
	<lastBuildDate>Fri, 30 Dec 2011 18:33:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>More on TFS and xUnit</title>
		<link>http://blog.strobaek.org/2011/10/18/more-on-tfs-and-xunit/</link>
		<comments>http://blog.strobaek.org/2011/10/18/more-on-tfs-and-xunit/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 07:30:30 +0000</pubDate>
		<dc:creator>strobaek</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[UnitTest]]></category>
		<category><![CDATA[TFS]]></category>
		<category><![CDATA[xUnit]]></category>

		<guid isPermaLink="false">http://blog.strobaek.org/?p=727</guid>
		<description><![CDATA[In my previous post on TFS and xUnit I tried to describe how to get the unit testing framework xUnit to work with TFS. I have got a couple of comments about not being able to get things to work. Unfortunately I have not had time to dive deep into why this may be so. It [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous <a href="http://blog.strobaek.org/2011/10/03/howto-team-foundation-server-and-xunit/">post </a>on TFS and xUnit I tried to describe how to get the unit testing framework <a href="http://xunit.codeplex.com/">xUnit</a> to work with TFS.</p>
<p>I have got a couple of comments about not being able to get things to work. Unfortunately I have not had time to dive deep into why this may be so. It may well be because the description is flawed, for which I apologize.</p>
<p>A few observations:</p>
<ul>
<li>Concerning <a href="http://nunit4teambuild.codeplex.com/">NUnitTFS</a>: apart from different arguments, it also seems like the functionality is different. Using the newest version I get the following error:<a href="http://blog.strobaek.org/wp-content/uploads/xunit2-01a.jpg"><img class="aligncenter size-medium wp-image-733" title="xunit2-01a" src="http://blog.strobaek.org/wp-content/uploads/xunit2-01a-300x95.jpg" alt="" width="300" height="95" /></a>
<p>However, using a previous (alpha) version all works as expected:</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit2-03.jpg"><img class="aligncenter size-medium wp-image-731" title="xunit2-03" src="http://blog.strobaek.org/wp-content/uploads/xunit2-03-300x93.jpg" alt="" width="300" height="93" /></a></li>
<li>If you forget to define the endpoints in the <em>NUnitTfs.exe.config</em>-file you will get an error similar to the following:<a href="http://blog.strobaek.org/wp-content/uploads/xunit2-02.jpg"><img class="aligncenter size-medium wp-image-730" title="xunit2-02" src="http://blog.strobaek.org/wp-content/uploads/xunit2-02-300x80.jpg" alt="" width="300" height="80" /></a></li>
<li>Download the <a title="TFS Template XAML-file" href="http://blog.strobaek.org/wp-content/uploads/XUnitBuildProcessTemplate.xaml">xaml </a>and <a title="NUnitTFS" href="http://blog.strobaek.org/wp-content/uploads/NUnitTfs.zip">NUnitTFS </a>I have used and try it out.</li>
</ul>
<p>&nbsp;</p>
<p>Using the <em>InvokeProcess</em> component (from the Toolbar) it should be possible to integrate any external tool into the workflow.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.strobaek.org/2011/10/18/more-on-tfs-and-xunit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Team Foundation Server and xUnit</title>
		<link>http://blog.strobaek.org/2011/10/03/howto-team-foundation-server-and-xunit/</link>
		<comments>http://blog.strobaek.org/2011/10/03/howto-team-foundation-server-and-xunit/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 10:29:39 +0000</pubDate>
		<dc:creator>strobaek</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[UnitTest]]></category>
		<category><![CDATA[TFS]]></category>
		<category><![CDATA[xUnit]]></category>

		<guid isPermaLink="false">http://blog.strobaek.org/?p=678</guid>
		<description><![CDATA[For quite some time I have been doing TDD and Continuous Integration (CI), both in my private projects as well as my professional ones. My preferred unit testing framework is xUnit and I recently had to set this up with Team Foundation Server (TFS) to do CI. It turned out this was not a trivial task. [...]]]></description>
			<content:encoded><![CDATA[<p>For quite some time I have been doing TDD and Continuous Integration (CI), both in my private projects as well as my professional ones. My preferred unit testing framework is xUnit and I recently had to set this up with Team Foundation Server (TFS) to do CI. It turned out this was not a trivial task. One think was to get TFS to run the tests, another was to get TFS Reporting to work and show the test results. This blog post will show the different steps I took. I hope it will be an inspiration to others and help them avoid some of the issues and fustrations I ran into. Any comments or feedback will be greatly appreciated.</p>
<p>First step is to install TFS 2010. The following will describe how to install it on Windows Server 2008 and SQL Server 2008. However, the steps are the same for Windows Server 2008R2 and SQL Server 2008 R2.</p>
<p>I will not go into great details of how to install the server products. There are already great guides available on the web, so please drop me a mail og reach me on twitter if you require assistance with this part of the process.</p>
<p>Install Windows Server 2008 (Enterprise) on a server and apply Service Pack 2 (SP2).</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit01.jpg"><img class="aligncenter size-medium wp-image-681" title="xunit01" src="http://blog.strobaek.org/wp-content/uploads/xunit01-300x226.jpg" alt="" width="300" height="226" /></a></p>
<p>Create a User named, e.g. TFS and add this user to the Administrators group.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit02.jpg"><img class="aligncenter size-medium wp-image-682" title="xunit02" src="http://blog.strobaek.org/wp-content/uploads/xunit02-300x241.jpg" alt="" width="300" height="241" /></a></p>
<p>Install SQL Server 2008 (Enterprise Edition) with all components. I’ve also selected to install the <em>Business Intelligence Development Studio</em>, which will allow me to create TFS Reports.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit03.jpg"><img class="aligncenter size-medium wp-image-683" title="xunit03" src="http://blog.strobaek.org/wp-content/uploads/xunit03-300x224.jpg" alt="" width="300" height="224" /></a></p>
<p>Install Reporting Services in Native mode, but select the option of NOT configuring the Reporting Services now. Do not install it in SharePoint Integrated mode.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit04.jpg"><img class="aligncenter size-medium wp-image-684" title="xunit04" src="http://blog.strobaek.org/wp-content/uploads/xunit04-300x224.jpg" alt="" width="300" height="224" /></a></p>
<p>Add the TFS user as Login to the SQL Server just installed.</p>
<p>Install WSS (Windows Sharepoint Services) 3.0 and Service Pack 2. Do not run the <em>Configuration Wizard</em> at the end.</p>
<p>At this point you should be able to see the default SharePoint site at <a href="http://localhost">http://localhost</a>.</p>
<p>Open the <em>SQL Server Reporting Services Configuration Tool</em> and configure the Reporting Services now.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit05.jpg"><img class="aligncenter size-medium wp-image-685" title="xunit05" src="http://blog.strobaek.org/wp-content/uploads/xunit05-238x300.jpg" alt="" width="238" height="300" /></a></p>
<p>The tool will take you through the configuration step by step and will allow you to specify User, Create database etc. When asked for user credentials specify the User created earlier.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit06.jpg"><img class="aligncenter size-medium wp-image-686" title="xunit06" src="http://blog.strobaek.org/wp-content/uploads/xunit06-209x300.jpg" alt="" width="209" height="300" /></a></p>
<p>When configuring the <em>Database </em>keep the default setting to <em>Native Mode </em>when asked for <em>Report Server Mode.</em></p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit07.jpg"><img class="aligncenter size-medium wp-image-687" title="xunit07" src="http://blog.strobaek.org/wp-content/uploads/xunit07-300x112.jpg" alt="" width="300" height="112" /></a>When the configuration has completed it should be possible to see the Reporting Service Portal and Web Service, e.g.  on <a href="http://localhost/Reports">http://localhost/Reports</a> and <a href="http://localhost/ReportServer">http://localhost/ReportServer</a>.</p>
<p>Now it is time to install TFS. Initiate the installation and select the features you wish to install, most likely all but the Team Foundation Server Proxy.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit08.jpg"><img class="aligncenter size-medium wp-image-688" title="xunit08" src="http://blog.strobaek.org/wp-content/uploads/xunit08-300x148.jpg" alt="" width="300" height="148" /></a></p>
<p>You properly need to restart the server during the installation – after all this is Microsoft – but otherwise the installation should run smoothly.</p>
<p>Once done, press the <em>Configure </em>buton, to launch the Configuration Tool. Select the configuration appropriate to your needs. I selected the <em>Standard </em>configuration for this lab.</p>
<p>When asked for the Service Account, enter the user you created previously.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit09.jpg"><img class="aligncenter size-medium wp-image-689" title="xunit09" src="http://blog.strobaek.org/wp-content/uploads/xunit09-300x37.jpg" alt="" width="300" height="37" /></a></p>
<p>If you are not able to pass all the verification checks, just correct then and re-run the verification. Once all is green, you should be able to complete the configuration.</p>
<p>If you want to read more about TFS, check out the blog posts by <a href="http://www.richard-banks.org/2010/07/how-to-versioning-builds-with-tfs-2010.html" target="_blank">Richard Banks</a> and <a href="http://www.ewaldhofman.nl/post/2010/04/20/Customize-Team-Build-2010-e28093-Part-1-Introduction.aspx" target="_blank">Ewald Hofman</a>.</p>
<p>You now have a running TFS, but we are far from finished. To finish what we set out to do we now have to create and modify a build configuration.</p>
<p>A disclaimer: the following example will have some hardcoded values. The correct way to do things would be to create a <em>custom action</em>, put it in TFS and refer this, but this I will leave<br />
for another post.</p>
<p>In order to run our unit tests using xUnit and publish the results, we need to copy to items to the TFS server: <a href="http://xunit.codeplex.com/" target="_blank">xUnit </a>and <a href="http://nunit4teambuild.codeplex.com/" target="_blank">NUnitTFS</a>.</p>
<p>I placed then in C:\Tools\. Do not put any spaces in the folder names; this will make your life easier later on.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit10b.jpg"><img class="aligncenter size-full wp-image-722" title="xunit10b" src="http://blog.strobaek.org/wp-content/uploads/xunit10b.jpg" alt="" width="254" height="57" /></a></p>
<p>A little tweaking is most likely required of the configuration of NUnit. You need to ensure that the client endpoints are set correctly in the config-file. By default they point to http://teamfoundation.</p>
<p>First step is to create a copy of the <em>DefaultTemplate.xaml</em> file, rename it to something – I called mine <em>xUnitTemplate.xaml</em> – and add it to TFS.</p>
<p>Open the new template in Visual Studio.</p>
<p>We need two arguments, one for the path to the xUnit console and one for the path to the NUnitTFS.exe.</p>
<p>Select <em>Arguments </em>and click <em>Create Argument.</em></p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit11.jpg"><img class="aligncenter size-medium wp-image-691" title="xunit11" src="http://blog.strobaek.org/wp-content/uploads/xunit11-300x69.jpg" alt="" width="300" height="69" /></a></p>
<p>Create the two arguments: <em>xUnit</em> and <em>TFSPublish</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit12.jpg"><img class="aligncenter size-medium wp-image-692" title="xunit12" src="http://blog.strobaek.org/wp-content/uploads/xunit12-300x18.jpg" alt="" width="300" height="18" /></a></p>
<p>Click the <em>Arguments </em>to close the list.</p>
<p>Select <em>Variables </em>and create one called <em>XUnitResult</em>. This will contain the output from one of the new processes we create.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit13.jpg"><img class="aligncenter size-medium wp-image-693" title="xunit13" src="http://blog.strobaek.org/wp-content/uploads/xunit13-300x33.jpg" alt="" width="300" height="33" /></a></p>
<p>Note the <em>Variable Type </em>and <em>Scope</em>.</p>
<p>Now scroll down into the processes and locate the <em>If Statement</em> called <em>If Not Disable Tests</em> and the <em>Sequence </em>called <em>Run Tests</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit14.jpg"><img class="aligncenter size-medium wp-image-694" title="xunit14" src="http://blog.strobaek.org/wp-content/uploads/xunit14-300x71.jpg" alt="" width="300" height="71" /></a></p>
<p>We want to delete the content of the <em>Run Tests</em> sequence and enter our own. Easiest way to do this is right click on <em>Run Tests</em> and select <em>Delete.</em> This will leave you with something like the following</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit15.jpg"><img class="aligncenter size-medium wp-image-695" title="xunit15" src="http://blog.strobaek.org/wp-content/uploads/xunit15-300x141.jpg" alt="" width="300" height="141" /></a></p>
<p>Now from the Toolbox find the Sequence (located under Control Flow) and drop one on the <em>Then </em>box. Rename it to <em>Run Tests</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit16.jpg"><img class="aligncenter size-medium wp-image-696" title="xunit16" src="http://blog.strobaek.org/wp-content/uploads/xunit16-300x138.jpg" alt="" width="300" height="138" /></a></p>
<p>Add an Invoke Process to the Sequence and name it <em>Invoke xUnit Console</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit17.jpg"><img class="aligncenter size-full wp-image-697" title="xunit17" src="http://blog.strobaek.org/wp-content/uploads/xunit17.jpg" alt="" width="239" height="279" /></a></p>
<p>The reason for the red exclamation marks is that we need to configure the new control. Open the properties and set the following:</p>
<ul>
<li>Arguments: &#8220;xUnit.Test.dll /silent /nunit results.xml&#8221; (including quotes)</li>
<li>FileName: xUnit</li>
<li>Result: XUnitResult</li>
<li>WorkingDirectory: outputDirectory</li>
</ul>
<p>As you can see we here have a hard coded value, namely the name of the assembly containing the unit tests. “It can be easily seen” as we used to say at University, when the math proof was too easy, so I will leave this as a small home assignment to you, my dear reader <img src='http://blog.strobaek.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You also want to add two activities to output the build messages and build errors (if any).</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit18.jpg"><img class="aligncenter size-medium wp-image-698" title="xunit18" src="http://blog.strobaek.org/wp-content/uploads/xunit18-300x143.jpg" alt="" width="300" height="143" /></a></p>
<p>In the properties, set the <em>Message</em> to <em>stdOutput</em> and <em>errOutput</em> respectively.</p>
<p>We are almost done. Add a second <em>Invoke Process</em> under the newly created and name it e.g. <em>Publish xUnit Results</em>.</p>
<p>Set the <em>Argument to the following:</em></p>
<p>String.Format(&#8220;-n {0} -t {1} -p &#8221;"{2}&#8221;" -f {3} -b &#8220;&#8221;{4}&#8221;" &#8220;,<br />
&#8220;results.xml&#8221;,<br />
BuildDetail.TeamProject,<br />
BuildSettings.PlatformConfigurations(0).Platform,<br />
BuildSettings.PlatformConfigurations(0).Configuration,<br />
BuildDetail.BuildNumber)</p>
<p>And the <em>FileName </em>to <em>TFSPublish</em>  and <em>WorkingDirectory </em>to <em>outputDirectory</em> and lastly add two output handlers as above.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit19.jpg"><img class="aligncenter size-full wp-image-699" title="xunit19" src="http://blog.strobaek.org/wp-content/uploads/xunit19.jpg" alt="" width="246" height="215" /></a></p>
<p>Save the template and check it in.</p>
<p>Next step is to create a new build definition that uses the new template.</p>
<p>Open the Team Explorer, right click on <em>Builds</em> and select <em>New Build Definition</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit20.jpg"><img class="aligncenter size-medium wp-image-700" title="xunit20" src="http://blog.strobaek.org/wp-content/uploads/xunit20-300x210.jpg" alt="" width="300" height="210" /></a></p>
<p>Set the name to something meaningful</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit21.jpg"><img class="aligncenter size-medium wp-image-701" title="xunit21" src="http://blog.strobaek.org/wp-content/uploads/xunit21-300x64.jpg" alt="" width="300" height="64" /></a></p>
<p>And the Trigger to <em>Continuous Integration</em></p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit22.jpg"><img class="aligncenter size-medium wp-image-702" title="xunit22" src="http://blog.strobaek.org/wp-content/uploads/xunit22-300x65.jpg" alt="" width="300" height="65" /></a></p>
<p>In Workspace, ensure that the folders you wish to include are active. Here we only got one.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit23.jpg"><img class="aligncenter size-medium wp-image-703" title="xunit23" src="http://blog.strobaek.org/wp-content/uploads/xunit23-300x50.jpg" alt="" width="300" height="50" /></a></p>
<p>Under Build Defaults set the <em>Build controller</em> and the <em>drop  folder</em>. For this test I have just shared a drive on my TFS server.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit24.jpg"><img class="aligncenter size-medium wp-image-704" title="xunit24" src="http://blog.strobaek.org/wp-content/uploads/xunit24-300x125.jpg" alt="" width="300" height="125" /></a></p>
<p>Under Process we need to set the <em>Build process template</em>. Click on <em>Show Details</em> to expand the panel.</p>
<p>Click on <em>New</em> to  set the new template we have created earlier.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit25.jpg"><img class="aligncenter size-medium wp-image-705" title="xunit25" src="http://blog.strobaek.org/wp-content/uploads/xunit25-300x63.jpg" alt="" width="300" height="63" /></a></p>
<p>Select the <em>Select an  existing XAML file</em> and click on <em>Browse…</em></p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit26.jpg"><img class="aligncenter size-medium wp-image-706" title="xunit26" src="http://blog.strobaek.org/wp-content/uploads/xunit26-277x300.jpg" alt="" width="277" height="300" /></a></p>
<p>Select the template we just created and press <em>OK</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit27.jpg"><img class="aligncenter size-medium wp-image-707" title="xunit27" src="http://blog.strobaek.org/wp-content/uploads/xunit27-300x152.jpg" alt="" width="300" height="152" /></a></p>
<p>Press <em>OK</em> again to  get back to the initial screen (still under Process).</p>
<p>Under <em>4. Misc</em> you  should see the two arguments we created. Enter the values as shown below. <em></em></p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit28a.jpg"><img class="aligncenter size-medium wp-image-723" title="xunit28a" src="http://blog.strobaek.org/wp-content/uploads/xunit28a-300x38.jpg" alt="" width="300" height="38" /></a></p>
<p>If you are still seeing a yellow exclamation mark, it may be because you have to set the <em>Configurations to build</em> under <em>1. Required | Items to Build</em>.</p>
<p>To test that this is actually working, create a solution and  add a class library to hold your unit tests. Remember to name the library  xUnit.Test (or rather ensure that the assembly is named xUnit.Test.dll).</p>
<p>When you check in the test, the new build should commence.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit29.jpg"><img class="aligncenter size-medium wp-image-709" title="xunit29" src="http://blog.strobaek.org/wp-content/uploads/xunit29-300x130.jpg" alt="" width="300" height="130" /></a></p>
<p>And when done the result is shown:</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit30.jpg"><img class="aligncenter size-medium wp-image-710" title="xunit30" src="http://blog.strobaek.org/wp-content/uploads/xunit30-300x158.jpg" alt="" width="300" height="158" /></a></p>
<p>I made two small tests: one that would pass and one that would  not.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit31.jpg"><img class="aligncenter size-medium wp-image-711" title="xunit31" src="http://blog.strobaek.org/wp-content/uploads/xunit31-300x150.jpg" alt="" width="300" height="150" /></a></p>
<p>If you create a TFS report looking at the test runs (using ReportBuilder), you can see something like the following:</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/xunit32.jpg"><img class="aligncenter size-medium wp-image-712" title="xunit32" src="http://blog.strobaek.org/wp-content/uploads/xunit32-300x97.jpg" alt="" width="300" height="97" /></a></p>
<p>We are done!</p>
<p>A few things to note:</p>
<ul>
<li>To get TFS to compile and run the tests using xUnit, I create a solution folder (e.g. called <em>Lib)</em> on the same level as my projects and add all the xUnit files to this folder. I then reference <em>xunit.dll</em> from this folder.</li>
<li>NUnitTFS seems to have changed from  the Alpha version, where it was possible to give an argument “-v”. This is not  longer possible with newer versions.</li>
<li>Be sure that the process running the build has access to the drop location.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.strobaek.org/2011/10/03/howto-team-foundation-server-and-xunit/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HowTo: Install a SQL failover cluster (in a virtual lab environment)</title>
		<link>http://blog.strobaek.org/2011/09/22/howto-install-a-sql-failover-cluster-in-a-virtual-lab-environment/</link>
		<comments>http://blog.strobaek.org/2011/09/22/howto-install-a-sql-failover-cluster-in-a-virtual-lab-environment/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 10:52:06 +0000</pubDate>
		<dc:creator>strobaek</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://blog.strobaek.org/?p=628</guid>
		<description><![CDATA[I have a couple of times had to set up a SQL Server cluster, both at clients and in my own lab. At clients the underlying Windows cluster setup is often handled by their own infrastructure people, so this is seldom a problem &#8211; if we assume they know what they are doing, which I grant, [...]]]></description>
			<content:encoded><![CDATA[<p>I have a couple of times had to set up a SQL Server cluster, both at clients and in my own lab. At clients the underlying Windows cluster setup is often handled by their own infrastructure people, so this is seldom a problem &#8211; if we assume they know what they are doing, which I grant, is not always the case. However, as I don’t have an ops person standing around behind glass, to be called upon when I need her – it should of course be a her – I need to do it myself (reminds me of a saying I once heard: it is cheaper to do it yourself, but it is a lot more fun with someone else. Can’t remember what it was about …)</p>
<p>This blog post will describe the different steps required to create a small SQL Cluster with two nodes. The following is assumed:</p>
<ul>
<li>You have a domain controller. Mine is running Windows Server 2008, but you can use an earlier version if you wish to have a small footprint.</li>
<li>You have installed Windows Server 2008 R2 on three servers. Two will be used for the cluster nodes and one as shared storage. All three servers have been joined to the domain and preferable been given a static IP-address.</li>
</ul>
<p>Until Windows 8 I am running my lab using <a href="http://www.virtualbox.org/" target="_blank">VirtualBox</a> from Oracle. This allows me to run 64-bit virtual machines on my Windows 7 laptop, without having to boot into WS2008.</p>
<p>In summary we will construct the following:</p>
<ul>
<li>Two SQL2008R2 nodes running on WS2008R2</li>
<li>One WS2008R2 server used as shared storage.</li>
</ul>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-1.jpg"><img class="aligncenter size-medium wp-image-632" title="cluster 1" src="http://blog.strobaek.org/wp-content/uploads/cluster-1-236x300.jpg" alt="" width="236" height="300" /></a></p>
<p>&nbsp;</p>
<p>First thing to do is to create a Windows cluster. I use iSCSI and install the <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=45105d7f-8c6c-4666-a305-c8189062a0d0" target="_blank">Microsoft iSCSI Software Target 3.3</a> on the storage box. There are other options. The important thing is, that you cannot create a SQL cluster, if the nodes are not able to see the same disk.</p>
<p>Run the install to unpack the files. This will open a web-page (index.htm). Select <em>Install</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-2.jpg"><img class="aligncenter size-medium wp-image-633" title="cluster 2" src="http://blog.strobaek.org/wp-content/uploads/cluster-2-300x169.jpg" alt="" width="300" height="169" /></a></p>
<p>&nbsp;</p>
<p>Accept all the default values and the install is completed swiftly.</p>
<p>Start the Microsoft iSCSI Software Target console.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-3.jpg"><img class="aligncenter size-full wp-image-634" title="cluster 3" src="http://blog.strobaek.org/wp-content/uploads/cluster-3.jpg" alt="" width="260" height="189" /></a></p>
<p>Select the iSCSI Target node, right click and select <em>Create iSCSI Target</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-4.jpg"><img class="aligncenter size-medium wp-image-635" title="cluster 4" src="http://blog.strobaek.org/wp-content/uploads/cluster-4-288x300.jpg" alt="" width="288" height="300" /></a></p>
<p>Enter a name for the iSCSI target and alternatively a description. Note, that the name cannot contain spaces.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-5.jpg"><img class="aligncenter size-medium wp-image-636" title="cluster 5" src="http://blog.strobaek.org/wp-content/uploads/cluster-5-300x122.jpg" alt="" width="300" height="122" /></a></p>
<p>In the iSCSI Initiators Identifiers dialog, press the <em>Advanced</em> button.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-6.jpg"><img class="aligncenter size-medium wp-image-637" title="cluster 6" src="http://blog.strobaek.org/wp-content/uploads/cluster-6-300x229.jpg" alt="" width="300" height="229" /></a></p>
<p>Enter the IP-address of the two nodes on which the SQL cluster will be installed.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-7.jpg"><img class="aligncenter size-medium wp-image-638" title="cluster 7" src="http://blog.strobaek.org/wp-content/uploads/cluster-7-300x127.jpg" alt="" width="300" height="127" /></a></p>
<p>Finish the target setup.</p>
<p>Right click the newly created iSCSI Target and select <em>Create Virtual Disk for iSCSI Target</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-8.jpg"><img class="aligncenter size-medium wp-image-639" title="cluster 8" src="http://blog.strobaek.org/wp-content/uploads/cluster-8-300x182.jpg" alt="" width="300" height="182" /></a></p>
<p>Set location and size of virtual disk and finish the wizard. Upon completion you should see the newly created vdisk under the iSCSI target.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-9.jpg"><img class="aligncenter size-medium wp-image-640" title="cluster 9" src="http://blog.strobaek.org/wp-content/uploads/cluster-9-300x62.jpg" alt="" width="300" height="62" /></a></p>
<p>&nbsp;</p>
<p>Next step is to connect the just created storage with the two cluster nodes.</p>
<p>On one of the nodes, open the Control Panel and select <em>iSCSI Initiator</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-10.jpg"><img class="aligncenter size-full wp-image-641" title="cluster 10" src="http://blog.strobaek.org/wp-content/uploads/cluster-10.jpg" alt="" width="296" height="114" /></a></p>
<p>If you see the following dialog</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-11.jpg"><img class="aligncenter size-medium wp-image-642" title="cluster 11" src="http://blog.strobaek.org/wp-content/uploads/cluster-11-300x119.jpg" alt="" width="300" height="119" /></a></p>
<p>just select Yes.</p>
<p>Enter the IP-address of the Storage box and press <em>Quick Connect</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-12.jpg"><img class="aligncenter size-medium wp-image-643" title="cluster 12" src="http://blog.strobaek.org/wp-content/uploads/cluster-12-300x154.jpg" alt="" width="300" height="154" /></a></p>
<p>You should now see the storage server under Discovered targets.</p>
<p>Go to the <em>Volumes and Devices</em> tab a press <em>Auto Configure</em>.</p>
<p>You should now see an entry under Volume List.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-13.jpg"><img class="aligncenter size-medium wp-image-644" title="cluster 13" src="http://blog.strobaek.org/wp-content/uploads/cluster-13-300x247.jpg" alt="" width="300" height="247" /></a></p>
<p>Click OK to close the iSCSI configuration.</p>
<p>Go to the second node and repeat the above steps.</p>
<p>Open the Server Manager and go to Storage and Disk Management. You should see the disk here.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-14.jpg"><img class="aligncenter size-medium wp-image-645" title="cluster 14" src="http://blog.strobaek.org/wp-content/uploads/cluster-14-300x63.jpg" alt="" width="300" height="63" /></a></p>
<p>Now go back to the first node, set the disk online and initialize it. This step will ensure that the disk is visible in the Cluster Manager when assigning disks.</p>
<p>We now have the foundation to setup a Windows Cluster. Next step is to enable clustering on both nodes. Start the Server Manager on each node, select Features and Add Feature.</p>
<p>Check the <em>Failvoer Clustering</em> click Next and complete the setup.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-15.jpg"><img class="aligncenter size-medium wp-image-646" title="cluster 15" src="http://blog.strobaek.org/wp-content/uploads/cluster-15-238x300.jpg" alt="" width="238" height="300" /></a></p>
<p>On one of the nodes go to Start -&gt; All Programs -&gt; Administrative Tools and select <em>Failover Cluster Manager</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-16.jpg"><img class="aligncenter size-full wp-image-647" title="cluster 16" src="http://blog.strobaek.org/wp-content/uploads/cluster-16.jpg" alt="" width="251" height="152" /></a></p>
<p>Select <em>Create a Cluster</em> in the middle of the page.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-17.jpg"><img class="aligncenter size-full wp-image-648" title="cluster 17" src="http://blog.strobaek.org/wp-content/uploads/cluster-17.jpg" alt="" width="287" height="48" /></a></p>
<p>Add the two nodes to the list of servers that should be included in the cluster.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-18.jpg"><img class="aligncenter size-medium wp-image-649" title="cluster 18" src="http://blog.strobaek.org/wp-content/uploads/cluster-18-300x108.jpg" alt="" width="300" height="108" /></a></p>
<p>In the next step one can run a verification report. It will take some time to complete the report, but I recommend that it is done to avoid any needless frustration later on.</p>
<p>Give the cluster a name and an IP address.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-19.jpg"><img class="aligncenter size-medium wp-image-650" title="cluster 19" src="http://blog.strobaek.org/wp-content/uploads/cluster-19-300x136.jpg" alt="" width="300" height="136" /></a></p>
<p>Press Next and finish the setup.</p>
<p>To complete the setup the disk from before needs to be allocated or assigned to the cluster. Select Storage in the tree to the left and click <em>Add a disk</em> to the right.</p>
<p>This should display something similar to the following:</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-20.jpg"><img class="aligncenter size-medium wp-image-651" title="cluster 20" src="http://blog.strobaek.org/wp-content/uploads/cluster-20-300x88.jpg" alt="" width="300" height="88" /></a></p>
<p>&nbsp;</p>
<p>Press OK to continue.</p>
<p>So far so good. We now have the foundation on which we can install SQL Server.</p>
<p>SQL Sever 2008 R2 requires the .NET Framework 3.5. If you have not already done so, add it to your servers using the Server Manage and Add Feature.</p>
<p>On the node that “owns” the shared disk, run the installation. I know that it is not really correct to talk about ownership as it is the service that owns the resource and not the node itself, but I think you get the picture.</p>
<p>From the Installation Center, select Installation and then the second option <em>New SQL Server failover cluster installation</em>. The third option will be used to add node(s) to the cluster, once it has been set up.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-21.jpg"><img class="aligncenter size-medium wp-image-652" title="cluster 21" src="http://blog.strobaek.org/wp-content/uploads/cluster-21-300x74.jpg" alt="" width="300" height="74" /></a></p>
<p>Continue through the dialogs until the Setup Support files are installed. Once this has completed a “report” is run to identify any issues. There should be no Red Lights, and only Yellow of no importance or  that can be rectified later, e.g. the network binding order.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-22.jpg"><img class="aligncenter size-medium wp-image-653" title="cluster 22" src="http://blog.strobaek.org/wp-content/uploads/cluster-22-300x258.jpg" alt="" width="300" height="258" /></a></p>
<p>On the Feature Selection page, select the features that should be installed and press Next.</p>
<p>On the Instanced Configuration page, a <em>SQL Server Network Name</em> must be specified. This is the “virtual” name applications will use to connect to.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-23.jpg"><img class="aligncenter size-medium wp-image-654" title="cluster 23" src="http://blog.strobaek.org/wp-content/uploads/cluster-23-300x45.jpg" alt="" width="300" height="45" /></a></p>
<p>Accept the default values for the <em>Cluster Resource Group</em> and the <em>Cluster Disk Selection</em>.</p>
<p>On the <em>Cluster Network Configuration</em> specify an IP-address.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-24.jpg"><img class="aligncenter size-medium wp-image-655" title="cluster 24" src="http://blog.strobaek.org/wp-content/uploads/cluster-24-300x50.jpg" alt="" width="300" height="50" /></a></p>
<p>Continue through the setup until the <em>Database Engine Configuration</em>.</p>
<p>Supply the information for the Account Provisioning. On the Data Directories tab it can be seen that the shared or clustered drive has been selected. If you had multiple disks in your cluster and had selected them in the Cluster Disk Selected step, it would here be possible to place the data one one disk and the logs on another. For this test-lab all is installed on the same disk.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-25.jpg"><img class="aligncenter size-medium wp-image-656" title="cluster 25" src="http://blog.strobaek.org/wp-content/uploads/cluster-25-300x127.jpg" alt="" width="300" height="127" /></a></p>
<p>Continue with the configuration and end by pressing the Install button.</p>
<p>At this point it would be a good idea to get a cup of coffee as the installation might take some time.</p>
<p>Eventually something like this should be displayed</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-26.jpg"><img class="aligncenter size-medium wp-image-657" title="cluster 26" src="http://blog.strobaek.org/wp-content/uploads/cluster-26-300x40.jpg" alt="" width="300" height="40" /></a></p>
<p>We have now configured and installed the first node in our failover SQL Cluster and we now just have to add the second node and we are done.</p>
<p>Start the install from the second node, select the Installation menu item, and as previous noted, select the third menu option <em>Add node to a SQL Server failover cluster</em>.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-27.jpg"><img class="aligncenter size-medium wp-image-658" title="cluster 27" src="http://blog.strobaek.org/wp-content/uploads/cluster-27-300x74.jpg" alt="" width="300" height="74" /></a></p>
<p>As before the installation process will begin by installing a number of setup files.</p>
<p>On the <em>Cluster Node Configuration</em> screen select the cluster to join.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-28.jpg"><img class="aligncenter size-medium wp-image-659" title="cluster 28" src="http://blog.strobaek.org/wp-content/uploads/cluster-28-300x86.jpg" alt="" width="300" height="86" /></a></p>
<p>Continue through the rest of the setup and press Install at the end.</p>
<p>If all goes well, the completion screen will be displayed.</p>
<p><a href="http://blog.strobaek.org/wp-content/uploads/cluster-29.jpg"><img class="aligncenter size-medium wp-image-660" title="cluster 29" src="http://blog.strobaek.org/wp-content/uploads/cluster-29-300x37.jpg" alt="" width="300" height="37" /></a></p>
<p>That’s it! We now have a two node SQL failover cluster.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.strobaek.org/2011/09/22/howto-install-a-sql-failover-cluster-in-a-virtual-lab-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>From the Trenches: SQL Cluster Installation</title>
		<link>http://blog.strobaek.org/2011/07/15/from-the-trenches-sql-cluster-installation/</link>
		<comments>http://blog.strobaek.org/2011/07/15/from-the-trenches-sql-cluster-installation/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 17:54:28 +0000</pubDate>
		<dc:creator>strobaek</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://blog.strobaek.org/?p=584</guid>
		<description><![CDATA[I recently had to install a SQL Server 2008 R2 cluster at a client. My previous experience was, that once the underlying Windows cluster and the shared storage, e.g. in form of a SAN have been set up, the installation of SQL server is relatively straight forward. Well, not this time around. Before you begin [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to install a SQL Server 2008 R2 cluster at a client. My previous experience was, that once the underlying Windows cluster and the shared storage, e.g. in form of a SAN have been set up, the installation of SQL server is relatively straight forward.</p>
<p>Well, not this time around.</p>
<p>Before you begin the installation of the SQL cluster, you can run some verifying tests of the Windows cluster. These were all green. During the SQL installation process all the Setup Support Rules are checked, and these were also all green.</p>
<p>The actual installation completed, but at the very end I got the following error:</p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://blog.strobaek.org/wp-content/uploads/trenches_sql_1.jpg" alt="image" width="594" height="166" border="0" /></p>
<p>Looking in the event log, the following error could be seen:</p>
<p><em><span style="color: #0000ff;">Cluster network name resource &#8216;SQL Network Name (BJSQCON)&#8217; failed to create its associated computer object in domain &#8216;xxxx.com&#8217; for the following reason: Unable to create computer account.</span></em></p>
<p><em><span style="color: #0000ff;">The text for the associated error code is: Access is denied.</span></em></p>
<p>“Access is denied”. This sounds like an AD problem, but the installing user should have all the required access rights (this at least according to the infrastructure team).</p>
<p>After some investigation I opened the (advanced) properties in AD for the computer object of the SQL cluster (sorry for the black; client confidentiality)</p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://blog.strobaek.org/wp-content/uploads/trenches_sql_2.jpg" alt="image" width="411" height="459" border="0" /></p>
<p>What was missing was the computer object for the Windows cluster, here shown after being added.</p>
<p>So after having pre-staged the AD, I removed the SQL node from the cluster and tried the installation again and this time all went fine.</p>
<p>Interested parties can read more about Failover Cluster setup and pre-staging here <a title="http://technet.microsoft.com/en-us/library/cc731002(WS.10).aspx#BKMK_steps_precreating" href="http://technet.microsoft.com/en-us/library/cc731002(WS.10).aspx#BKMK_steps_precreating">http://technet.microsoft.com/en-us/library/cc731002(WS.10).aspx#BKMK_steps_precreating</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.strobaek.org/2011/07/15/from-the-trenches-sql-cluster-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing Data to SQL Server</title>
		<link>http://blog.strobaek.org/2011/03/13/importing-data-to-sql-server/</link>
		<comments>http://blog.strobaek.org/2011/03/13/importing-data-to-sql-server/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 14:04:42 +0000</pubDate>
		<dc:creator>strobaek</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://blog.strobaek.org/2011/03/13/importing-data-to-sql-server/</guid>
		<description><![CDATA[I was recently asked to help a client migrate some data from IBM DB2 to SQL Server. It was about 900 tables and a couple of terabytes of data. Before I came onsite, the client had extracted the data from DB2, a process which alone took a couple of days. Was I was presented with [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently asked to help a client migrate some data from IBM DB2 to SQL Server. </p>
<p>It was about 900 tables and a couple of terabytes of data. Before I came onsite, the client had extracted the data from DB2, a process which alone took a couple of days.</p>
<p>Was I was presented with was the following: one file for each table containing INSERT INTO statements for each row to be inserted into SQL. The largest file was about 2 GB, the smallest one a few K. Due to time constraints it was not possible to re-extract the data into a format there e.g. BULK INSERT or SSMI could be used.</p>
<p>The client had tried to import one of the larger ones – around 1.3 GB with about 3.2 million lines &#8211; using the command utility OSQL. After 14 hours we stopped the process.</p>
<p>My first thought was to insert explicit transactions into the files getting a structure of something like this:</p>
<p><font face="Courier New">BEGIN TRANSACTION     <br />INSERT INTO …      <br />…      <br />INSERT INTO …      <br />COMMIT TRANSACTION</font></p>
<p>I wrote a small utility which would transform the original files into the above structure given the overall size of the file and maximum allowed batch size, e.g. lines in each transaction.</p>
<p>This did not really help at all. The aforementioned file still took ages.</p>
<p>As we were running out of time, a request was made to upgrade the SQL server from 2 to 4 cores and to 16 GB Ram. This of course did not solve our import problem, but at least we got some more juice to play with.</p>
<p>I next made two changes, which turned out to solve the problem:</p>
<ol>
<li>Used SQLCMD instead of OSQL</li>
<li>Split input files up into smaller chunks</li>
</ol>
<p>SQLCMD was introduces with SQL Server 2005. It is using OLE DB and not ODBC for connectivity and it is 64 bit. Both of these will of course speed up performance.</p>
<p>To split up the files into smaller chunks I found a small utility called <a href="http://www.systemwidgets.com/Products/TextFileSplitter/Overview/tabid/119/Default.aspx" target="_blank">TextFileSplitter</a>. The utility is free to use and comes with both a UI and command line interface.</p>
<p>Writing a small CMD-files automated the process of splitting up the largest files into chunks of 100K lines each.</p>
<p><font face="Courier New">SET INPUT=C:\Input     <br />SET OUTPUT=C:\Output      <br />SET LINES=100000</font></p>
<p><font face="Courier New">FOR %%F IN (%INPUT%\*.*) DO TextFileSplitterConsole -i=%%F -o=%OUTPUT% -splitstrategy:ls:%LINES%</font>    </p>
<p>&#160;</p>
<p>Once we had the smaller files I started three other “CMD-file processes” to execute all the INSERT INTO statements using SQLCMD.</p>
<p>All in all it took a couple of hours for the splitting and inserting of data. </p>
<p>End result: happy client.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.strobaek.org/2011/03/13/importing-data-to-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working from home</title>
		<link>http://blog.strobaek.org/2010/06/08/working-from-home/</link>
		<comments>http://blog.strobaek.org/2010/06/08/working-from-home/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 19:38:07 +0000</pubDate>
		<dc:creator>strobaek</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[commute]]></category>
		<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://blog.strobaek.org/?p=281</guid>
		<description><![CDATA[Working from home from time to time is one of the benefits I really enjoy. My daily commute is around an hour each way, and even though I can fill this time with podcasts and audio books, it is nice to be without it. You should be careful not to over do it, though, as [...]]]></description>
			<content:encoded><![CDATA[<p>Working from home from time to time is one of the benefits I really enjoy. My daily commute is around an hour each way, and even though I can fill this time with podcasts and audio books, it is nice to be without it.</p>
<p>You should be careful not to over do it, though, as it can spoil the good synergies you have with your colleagues. However, let&#8217;s be honest: working from home is a good thing. You save the transportation, you can spend the morning with your kids and open the door for the plumber, should she decide to swing by.</p>
<p>I came across the following guidelines of what to do and what to avoid, if you are so lucky that you can work from home:</p>
<ol>
<li>Do not leave your cell phone at home if you leave the house to go shopping or eat lunch.</li>
<li>Pick up your phone – also if you are in the bathroom.</li>
<li>Arrange some short phone meetings with people at work. They hate your guts because you are working from home and this will show them your commitment to your work – also when you are working from home.</li>
<li>Avoid long and complex mail threads with your boss to early in the day as this may result in a call where you have to answer the question of where you are (even if you have been granted permission to work from home, then do not remind your boss of this).</li>
<li>Do not drink alcohol early in the day, just because you are home. This also includes beer for lunch.</li>
<li>Remember to send the long e-mail with lots of attached spreadsheets that your colleagues have been waiting several weeks for. This serves two purposes: 1) It demonstrates that you are in fact doing something and 2) You can be sure no one will react to what you have sent. It is far to complex and takes to much time to read so you get some peace and quiet.</li>
<li>Do not leave your Elvis Costello album playing on the stereo with the volume turned to full throttle when you talk on the phone to your colleagues.</li>
<li>Do not take the phone when you sleep. Let it wake you up. Splash then some cold water in your face. Then call back and say you were in the middle of something important. It may well be your colleagues are looking straight through you, but it was worth the try.</li>
<li>Try to reach your boss very late in the day, but be absolutely sure he has left the office. This is the kind of attitude a boss likes. You are so engaged in your work, that you did not consider your boss might have left for the day when you called.</li>
<li>Dress properly – do not work in your underwear. People will know. No one knows why, but people know if you are talking to them only wearing your undies or g-string.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.strobaek.org/2010/06/08/working-from-home/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Business Travels</title>
		<link>http://blog.strobaek.org/2010/01/30/business-travels/</link>
		<comments>http://blog.strobaek.org/2010/01/30/business-travels/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 18:22:42 +0000</pubDate>
		<dc:creator>strobaek</dc:creator>
				<category><![CDATA[Private]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://blog.strobaek.org/?p=226</guid>
		<description><![CDATA[It happens I meet people, harboring the notion that business travels are romantic. They believe you get to travel to far and exotic places, get to see mysterious cultures and eat different and unusual dishes. They could not be more wrong! The reality is, that all you see is the airport and your hotel, which [...]]]></description>
			<content:encoded><![CDATA[<p>It happens I meet people, harboring the notion that business travels are romantic. They believe you get to travel to far and exotic places, get to see mysterious cultures and eat different and unusual dishes.</p>
<p>They could not be more wrong!</p>
<p>The reality is, that all you see is the airport and your hotel, which is often located right next to the airport, hence there is nothing to do in the evenings and you don&#8217;t event see the city you are in through a cab window &#8211; or get the change to visit the bars and restaurants in the evening. One airport looks pretty much like the next and hotel food is just not that interesting.</p>
<p>In my everyday life I am an &#8220;Information Technology Professional&#8221; &#8230; which is code for I know a bit more about computers than a box of rocks. During my professional career I have done quite a lot of business related travels. The following are some survival trips to make your experiences more pleasant and efficient.</p>
<p>The first thing you should do especially if you travel a lot is sign up with all the reward programs that airlines, hotels and maybe car rental services offer. If possible try to pick a (few) favorites and stay with those. A lot of companies will let you keep the frequent flier miles; I have gotten a lot of free plane ticket on this account. One thing is for sure: if you travel a lot and don&#8217;t sign up for these programs, you are plain stupid.</p>
<p>My second advise would be to never check bags with an airline. Take a course in &#8220;how to fit all your baggage into one suitcase without ruining your shirts and suits&#8221; if you have to (or ask your wife to do your packing). I have several times lost my bag and trust me, it is no fun. On a site note, you might want to memorize the location of the nearest store selling menswear at your destination, if you can&#8217;t manage with only carry-on. This reminds me of a time where I was flying into Zurich, lost my bag, and with less than an hour to my meeting ran into a department store and asked a clerk &#8211; a most distinguished older gentlemen &#8211; for a dark suit, a tie, two shirts (french cuffs), some underwear, socks and a pair of black dressshoes. He looked at me and said: Have you lost your suitcase, Sir?</p>
<p>These days security in airports can be a nightmare, so dress comfortably. I try to wear slip on shoes (sneaker) as these can quickly be taken on and off if required.</p>
<p>Sleep, sleep and more sleep. Make sure to get plenty of sleep before, during, and after your trip.</p>
<p>Try to eat resonably and stay hydrated.</p>
<p>Bring reading material like books or magazines or do like me: stack up your Kindle.</p>
<p>Use Skype. I have for a long time used Skype to keep contact with the folks at home. It is just more fun seeing the person you talk to than just hearing them and then it is cheaper too.</p>
<p>Delays in travel are inevitable. Try to be nice to the airline or travel employees. Even though they might be dorks, screaming at them won&#8217;t get you anywhere. Remember that you are only late, when your trip is over, and you are actually late. Instead open your Kindle and bury yourself in your favorite book.</p>
<p>The last but properly most important thing about business travels is having an understanding spouse.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.strobaek.org/2010/01/30/business-travels/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

