Log et al – Peter Curd

An irreverent peek into the inner rumblings of Peter Curd

Mar

7

Twitter Weekly Updates for 2010-03-07

By pcurd

  • RT @timmorgan: Looking forward to seeing Hed(pe) on Wednesday with @PCurd <- me too! I love spending time with @PCurd ;) #
  • I'm not sure if this is a bad translation, a passive aggressive suggestion or an insult in Palringo IM client http://twitpic.com/160u1f #
  • Hey, @PCurd? Do you like spending time with me or do you just tolerate me for a sniff of my awesome aftershave? #
  • Nothing personal @PCurd, but since you got friends, I'm just not feeling it anymore. It's not you, it's me. #
  • Seeing (hed) pe (@ Sub 89) http://4sq.com/aucFWg #
  • I give Atilla 6/10! Not bad for opening band! #livemusic #
  • Just saw some band who's name I didn't catch from the You Ess of Ay. Not impressed :( next up is #Hedpe #
  • w/ @timmorgan (@ Pavlov's Dog) http://4sq.com/9RW5An #
  • Amazingly awesome night seeing (hed) pe w/@timmorgan. I met & fist pumped Jared and got a signed CD. I'm blown away that they came to #rdg #
  • Well here I am, 1:30 and at work. I just wish I had a product to show for it! #
  • New Photoblog: Sunrise over Finchampstead http://photos.pcurd.co.uk/index.php/2010/03/05/sunrise-over-finchampstead/ #
  • My 'day' in numbers: coffees: 10. Cokes: 5. Hours: 30. Biscuits: 2. Viruses killed: 12. Sanity: 18%. Genius moments: -3. #
  • Day of many days is now over. 34 hours straight. **sigh** so much still to do #
  • Receieved a free Starbucks Via sample today and it's really good. Will be buying a couple of packs for sure! #
  • Setting alarms for 6 am at 2 am is bad. Shouldn't be allowed! #

Powered by Twitter Tools

Mar

4

Renaming Microsoft SQL Server servers and the effects on SPNs

By pcurd

Last week I saw a post on Simon Sabin’s blog about SQL Server service accounts and SPNs and made a comment about the importance of SPNs when renaming a SQL Server or migrating several servers into .. less than several. I felt this an area worth expanding a little more.

I’ll describe a hypothetical SQL Server infrastructure, changes to be made and how I would resolve the Kerberos issues that would result.

The base infrastructure:

A simple SQL Server environment with two Microsoft SQL Servers – SQLA and SQLB. The dataset on these two servers is different, no databases are shared. The domain for this company is “example” and the DC is “example.com” and so their usernames are formed “example/UserName”.

The new infrastructure:

A new SQL Server is purchased with power enough to run the entire dataset and it is to be called SQLA. The service account is to be a domain user called “sqlservice”.

However, there are a lot of applications that link to SQLB by name and recoding them all is considered too much work. (A classic example is Access which doesn’t make changing the source of tables easy without relinking)

A solution:

Migrate the total dataset to the new server, assign it a name of SQLA and take account of Simon’s SPN advice – i.e. use Network Service or a domain account to run the SQL Service. Use DNS to create a record for “SQLB” pointing to SQLA. If you want to be really fancy, assign the original IP address of SQLB as an additional IP on SQLA.

The result:

Connecting to “SQLA” via NTLM, SQL Database logins (assuming they were migrated too) and Kerberos works fine – as you’d expect. However, connecting to “SQLB” only works for NTLM and SQL Database logins – Kerberos fails along the lines of “Cannot generate SSPI Context”.

The solution:

As you may have guessed from the title of this article, the solution lies with SPNs. When you register for a Kerberos token you are doing so against a server name – and in this case, when talking to “SQLB”, that server name is wrong. So how does one send the correct name? Well in the example above, you can’t. You are stuck sending “SQLB”. The only solution is to make the name not wrong. To do this, we register another SPN against SQLA – effectively allowing it to understand and use the tokens made against “SQLB”.

The syntax is along these lines: (Please note, written from memory so some tweaking may be in order)

SetSPN -a mssqlsrv/SQLB.example.com:1433 example\sqlservice
SetSPN -a mssqlsrv/SQLB.example.com example\sqlservice
SetSPN -a host/SQLB.example.com
SetSPN -a host/SQLB

More details on SetSPN can be found on MSDN at http://msdn.microsoft.com/en-us/library/ms178119.aspx (Registering Kerberos Service Principle Names by Using Http.sys).

Feb

28

Twitter Weekly Updates for 2010-02-28

By pcurd

  • I really want NHibernate support in TweetSharp – so I'm going to build it in – should be easy, just an interface I think. #
  • Worst part of Sunday – moving the alarm back 2 hours and knowing I might actually happen to get up when it goes off. #
  • Actually worst part of this Sunday is being on the last episode in the season of Criminal Minds and knowing it might be a two parter. #
  • RT @PatParslow: Any clever Ruby ppl out there?Gem loads in console, but not found when mongrel starts (feed_tools) what's wrong? @fringley #
  • RT @fringley: http://twitpic.com/14wwau – The face of someone whos colleague won't make the tea (@looseend) <- #world #039;s smallest violin# #
  • After @chris_alexander's Steel Panther suggestion I'm now onto Motley Crue.. is this good? You decide. #
  • RT @MariaLKanellis Words for the day, "I am a wolf in sheep's clothing. Kind and fluffy on the outside. Mean and hungry on the inside." #
  • On Her Majesty's Secret Service : System.ServiceProcess.ServiceBase #FilmsAboutSoftware #
  • The List<List<T>>
    Or The System.Drawing.Drawing2D.Matrix #FilmsAboutSoftware #
  • I have a really bad twinge in my lower back today, off to both sides but not in the middle. Any stretching advice to clear it? #
  • RT @emmaguy: @plip really tempted to do a: RT @Plip: I am having a WANK #chineseretweet <- #epic #
  • RT @amykate: @pcurd I like this one of you, and the previous one http://flic.kr/p/7Fspmk <- It's a good picture :) Thank you! #
  • RT @talldavek: @PCurd: Not quite the same software movie title but: http://www.snorgtees.com/snakesonaplane-p-1036.html <- That's AWESOME! #
  • RT @amykate: Evil Amy is Evil http://flic.kr/p/7Fwk9j <- this is Amy trying to "GRRRRRAWR" #
  • RT @virginmedia: NEWS:: Virgin Media to launch flagship 100Mb broadband – http://bit.ly/8YZnEt .AA <- I wants it nao #
  • Yay my @NovatechLtd pen arrived :-D Thank you! http://twitpic.com/158r8z #
  • Just wrote my first CTE and it's like coding in access all over again :-D #
  • Awesome, @giraffetweet on @vouchercloud http://bit.ly/bnbjYj #
  • Mmm late night coding feels good. But ask me how it feels in the morning :-D #
  • I just got a tweet from a random user in Ghana asking for help with a Windows 7 key… I can be famouz? #
  • Just found out that a friend from college died last week – he was 26. RIP Jon. #
  • RT @blowdart: @chris_alexander OK then, what's with the miami vice profile pic. Blazer and t-shirt? But with a bowl haircut too? <- #haha #
  • Could @Choosy_Cat help me choose between a cup of tea or a mug of coffee? in reply to Choosy_Cat #
  • RT @Choosy_Cat: @PCurd Mug of tea. <- That wasn't one of the options! You're getting too big for your furry boots! :-P #
  • Peeps of #rdg – we need to convince #TheForster to come out tonight. Go! @TheForster #
  • I just found a select * in production SQL ! Time to play slap a dev. #
  • RT @craigyd: How's this for a NUS card pic? http://tweetphoto.com/12578147 Yes/No? :D <- That's just freaky! :-P #
  • Odd – historical me used select top 100 percent a lot.. I wonder why #
  • Still at work – terminal server down, licensing server acting up and the team needs me. Le sigh. #
  • Just got home after the longest half day I've ever worked. Annoying thing is I doubt I'll even get paid for it. :( missed out on pizza too! #
  • In an effort to reset my sleep patterns ahead of a week of early starts beginning in 5 days, I have stayed up all night. Now – what to do? #
  • RT @wilw: @BrentSpiner She said you'd think that song was about you. <- well that proves it, it must be true! #
  • Debating breakfast. Carluccio's… @giraffetweet … Not so fun on my own though. #
  • Morning coffee! (@ Starbucks – Butter Market) http://4sq.com/88DRu5 #
  • I'm at Giraffe Reading w/ @amykate. http://4sq.com/5OfoyL #

Powered by Twitter Tools

Feb

21

Twitter Weekly Updates for 2010-02-21

By pcurd

  • My car failed the MOT badly so I think it's time to retire the old girl and get a new one. Anyone know any being sold? #
  • #RATM #fail I can't even get @seetickets website up – this is 2010 – never heard of cloud computing?!? Plus it's a stupid lottery. #
  • I got #RATM tickets after 1 hour, 45 minutes @seetickets #fail #
  • Anyone trying to get #RATM tickets try this link – it bypasses the first "click on what ticket type you want" http://bit.ly/9nCUS6 #
  • New Photoblog: My new finger mouse http://photos.pcurd.co.uk/index.php/2010/02/17/my-new-finger-mouse/ #
  • RT @PCurd: @PatParslow it takes some practice but you can do it if you hold your hand just right <- #TWSS #
  • RT @NovatechLtd: still giving away window stickers… just got another 100, so if you want one DM us!! <- I got one! #
  • Who was it that told me that the female Holly was dead – she's not! Neither is Norman Lovett! #
  • Just spoke to @NovatechLtd corporate, sound like a nice bunch of people. #noIwasn #039;tpaidforthistweet #
  • I just used an emoticon in an email to the FD – let's see if I'm still employed tomorrow \O/ #
  • HUZZAH! Just received the confirmation of my #RATM ticket! #
  • FD made a joke back! I think I'm safe! #
  • For pre #rdgtweetup food! (@ Burger King) http://4sq.com/cYHkXn #
  • RT @deepwire: @PCurd We're watching you! <- my paranoia is right, they ARE after me :) #
  • Today @exceptioneer let me be notified about, diagnose and fix a SQL permissions problem from one email. Very pleased! #
  • RT @craigyd: @timmorgan LOL brilliant bluewaffle.net definition of foulness there :P <- that's one for the scrapbook! #nsfw #
  • One of the more technical users here has picked up a virus and it's a nasty one. #
  • RT @gazimoff: Go to http://panopticlick.eff.org/ and see why Google don't need to track you via cookies any more (via @Maxicom )<-I'm unique #
  • RT @NovatechLtd: @PCurd okay okay…. we will send you one :o ) <- \O/ #
  • Agravated with Reading Buses – the stupid new timetable on the number 9 means I have an hour wait for a bus after work and the bus driver #
  • Of the number 6 saw me running for the bus and just drove past the stop. And he was 2 minutes early. Now have stood in the cold for 55 mins. #
  • RT @Choosy_Cat: @PCurd Coosy cat points his face at a White Russian. Damn honky. <- Choosy Cat has spoken http://twitpic.com/147g5d #
  • I really should play Dragon Age Origins today but loafing watching a film is so much more loafing. #
  • I'm so pretentious that even my rubbish is in John Lewis carrier bags :) http://twitpic.com/14dpv1 #

Powered by Twitter Tools

Feb

14

Twitter Weekly Updates for 2010-02-14

By pcurd

  • RT @RdgGeek: Another talk lined up for tomorrow nights #rdggeek night. Luke Smith will be demoing Linq2JS http://is.gd/7VGKg <- awesome :) #
  • I have #epic #cakefail today. May have to get cake and take lunch today. #
  • I woke up at 7:15. I'm still in bed at 9:50. #gettingupfail #
  • why is there an advert for "colonic irrigation" on my blog?! Is it because my subline includes the words "inner rumblings"?! #
  • To paraphrase Douglas Adams "I love Todo lists, I like the whooshing noise they make as they fly past" #
  • Freebie on boffer and megadeals on bigoffers, http://tinyurl.com/ycueq9t http://tinyurl.com/ydjdxoj #
  • #uksnow RG40 4/10 but not settling – going more sideways than down #
  • Word of the day: Saxomophone #
  • RT @jackschofield: 10 Fake Simpsons Words that Belong in the Dictionary http://bit.ly/a9HJsX #
  • RT @StarCraft: #StarCraft2 beta will be released later this month! #SCUpdate <- squeeeee! #
  • What does Twitter think – buy Unreal Tournament from @gogcom, Steam or Impulse.. @timmorgan @nicktelford @jamesbmarshall #
  • RT @cyberdoguk: We're all in shock after finding out that Alexander McQueen was found dead today. <- tragic :( #
  • Somehow I managed to buy the wrong RAM for my netbook – my history shows 20 sites visited for prices and only one is wrong. Stupid me. #
  • RT @amykate: @PCurd btw the new profile puc looks great :-) cute AND representituve :-) xxx <- taken by the talented @RobAshton #
  • Right, bedtime for me pre worktime. Here's hoping for a shorter day tomorrow! #

Powered by Twitter Tools

Feb

14

Twitter Weekly Updates for 2010-02-14

By pcurd

  • RT @RdgGeek: Another talk lined up for tomorrow nights #rdggeek night. Luke Smith will be demoing Linq2JS http://is.gd/7VGKg <- awesome :) #
  • I have #epic #cakefail today. May have to get cake and take lunch today. #
  • I woke up at 7:15. I'm still in bed at 9:50. #gettingupfail #
  • why is there an advert for "colonic irrigation" on my blog?! Is it because my subline includes the words "inner rumblings"?! #
  • To paraphrase Douglas Adams "I love Todo lists, I like the whooshing noise they make as they fly past" #
  • Freebie on boffer and megadeals on bigoffers, http://tinyurl.com/ycueq9t http://tinyurl.com/ydjdxoj #
  • #uksnow RG40 4/10 but not settling – going more sideways than down #
  • Word of the day: Saxomophone #
  • RT @jackschofield: 10 Fake Simpsons Words that Belong in the Dictionary http://bit.ly/a9HJsX #
  • RT @StarCraft: #StarCraft2 beta will be released later this month! #SCUpdate <- squeeeee! #
  • What does Twitter think – buy Unreal Tournament from @gogcom, Steam or Impulse.. @timmorgan @nicktelford @jamesbmarshall #
  • RT @cyberdoguk: We're all in shock after finding out that Alexander McQueen was found dead today. <- tragic :( #
  • Somehow I managed to buy the wrong RAM for my netbook – my history shows 20 sites visited for prices and only one is wrong. Stupid me. #
  • RT @amykate: @PCurd btw the new profile puc looks great :-) cute AND representituve :-) xxx <- taken by the talented @RobAshton #
  • Right, bedtime for me pre worktime. Here's hoping for a shorter day tomorrow! #

Powered by Twitter Tools

Feb

9

Using IN on concatenated keys in Microsoft SQL Server 2008 is very slow

By pcurd

During the migration of T-SQL code from Microsoft SQL Server 2000 to Microsoft SQL Server 2008 I found a few procedures that were running very slow. They all used the IN keyword to filter records based on the content of a concatenated key (i.e. a key using two or more fields added to each other).

I have written a quick script to test the performance of three different ways to do this (IN, EXISTS and LEFT JOIN) and the difference is staggering.

Using IN on a concatenated key for this test is in the order of 200 times slower.

The basic summary is that the technique:

select * from #performancetesttable tt
where
tt.field1 + tt.field2 not in (select tt2.field1 + tt2.field2 from #performancetesttable2 tt2)

is much much slower on Microsoft SQL Server 2008 than:

select * from #performancetesttable tt
left join #performancetesttable2 tt2 on tt.field1 + tt.field2 = tt2.field1 + tt2.field2
where tt2.field1 is null

even though in Microsoft SQL Server 2000 the performance is about the same.

The hardware difference on the two machines is greatly in the Microsoft SQL Server 2008 favour – being a dual six core machine with 32GB RAM as opposed to dual dual core machine with 4GB of RAM (only 2GB used by Microsoft SQL Server 2000)

Using IN – Microsoft SQL Server 2008 takes 20250 ms.
Using IN – Microsoft SQL Server 2000 takes 106 ms.

Using EXISTS – Microsoft SQL Server 2008 takes 103 ms.
Using EXISTS – Microsoft SQL Server 2000 takes 46 ms.

Using LEFT JOIN – Microsoft SQL Server 2008 takes 23 ms.
Using LEFT JOIN – Microsoft SQL Server 2000 takes 33 ms.

Read more for the SQL script to test this for yourself

Feb

7

Twitter Weekly Updates for 2010-02-07

By pcurd

  • I thank the health gods that they gave me an OK weekend – Thurs/Friday I felt bad and today I have a cold. I can live with that. **cough** #
  • For pre #rdgtweetup food, feel free to join me! (@ Burger King) http://4sq.com/cYHkXn #
  • I haven't been this happy to see Friday since.. At least last week. I wonder if I can crunch through my todo list today. #
  • Listening to an album on Spotify that I bought and have on my laptop… purchase #fail ? #
  • Syncing my iPhone.. wish me luck! #
  • RT @fringley: "I'm a complete moron" #chineseretweet #
  • Somehow the passenger side wing mirror has been ripped off my car :( I can't find it either :( #
  • Now @TheForster is trying to kill me. He made me run for the bus! I think I left my lungs behind. #
  • RT @chris_alexander: @PCurd people are short :P <- true dat #

Powered by Twitter Tools

Jan

31

Twitter Weekly Updates for 2010-01-31

By pcurd

  • 4pm wake up sounds so good until you realise I only have 8 hours until bed time. Poop. #
  • 'Stupid Base 10 math, that's what you get for having extra fingers' brilliant writing in Mass Effect. #
  • RT @carocat: @pcurd RT @carocat: Games testing. So very true! http://bit.ly/60IzII <- This brings back memories :) #
  • Erk. Too busy to read tweets today so lost 4 hours worth. Repeat anything groundbreaking please! :) #
  • RT @NathanFillion: It has always been my understanding that the H in Jesus H Christ was for Huevos Rancheros. < @giraffetweet it's true! #
  • RT @fringley: Full of cold :( Like I have time to be ill. <- I'm fighting one off and have no time for death either. 800% rda Vitamin C FTW #
  • This weekend's server migration has been delayed until Valentines day – this is why IT people are so often single :) #
  • $AAPL stock price going UP :) @dtsn #
  • $499>!?! WTF wow #
  • $AAPL Just took off! http://www.google.co.uk/finance?q=NASDAQ:AAPL @dtsn #
  • What the balls? @game_offers is protected? @Gamedigital what's up with that? #
  • Stomach this is unfair, you are still gurgling and clearly unhappy and bad things will happen if I feed you but now you crave cheeseburger. #
  • Looking forward to #ddd8 pre conference drinks tonight – not sure what to do about food though… #
  • It's cold enough for snow in RG2 but no sign so far. This is good, I've had enough snow days on this project thank you very much. #
  • Managed to loose another glove tonight. Roll on summer! I like going out in a t shirt! #
  • Awake (mostly) for #DDD8. 7am on a Saturday is for sleeping, what was I thinking! :) #
  • Now heading to #DDD8. If I'm not there in 20 minutes… Just wait longer. #
  • I made it safely to #DDD8 and am queuing for coffee. Mmm coffee. #
  • RT @Plip: #ddd8 overslept :-/ <- #epic #fail #
  • The hordes at #DDD8 http://twitpic.com/10gozj #
  • In @RichardHopton's TDD session with @emmaguy and @chris_alexander http://twitpic.com/10gw1q #
  • As you may expect, Jon Skeet's talk is looking to be busy #DDD8 Hardly suprising but still impressive. #
  • In @garyshort's Not Everything is an Object session. Functional 101 for me :) #
  • Now in @blowdart's last DDD presentation. #DDD8 Last MVP talk too. #
  • RT @pcurd DeveloperDeveloperDeveloper 8 – DDD8 http://bit.ly/a27wfc #
  • With the #DDD8 crowd! (@ Pizza Express) http://4sq.com/9HtAmx #
  • RT @NathanFillion: Summer Glau!! <- yes! #
  • Amazing day at #DDD8 and geek dinner. Great to see so many new faces! Epic thanks to @zimakki for being a legend and everyone for greatness. #

Powered by Twitter Tools

Jan

30

DeveloperDeveloperDeveloper 8 – DDD8

By pcurd

The latest event in the DeveloperDeveloperDeveloper family, DeveloperDeveloperDeveloper 8 happened at the Thames Valley Park Microsoft site on Saturday 30th of January and I was amongst the 340 or so lucky ticket holders.

This year one of my friends, Rob Ashton (@RobAshton) was speaking along with some old favourites including Simon Sabin (@Simon_Sabin), Richard Hopton (@RichardHopton), Ben Hall (@Ben_Hall) and Barry Dorrans (@blowdart). I was also pleased to see Jon Skeet (@jonskeet) presenting as I had never before had a chance to see him live.

The turnout seems impressive which is to be expected considering the length of the waiting list – over 200 people within 15 minutes of the event “selling out”. At lunch, as always, seating was at a premium and even the grok talks, organised by Zi Makki (@ZiMakki), were full.

As DDD8 was the last community event Barry Dorrans was likely to present at for a while (due to his recent appointment to Microsoft), I think it is only fitting how popular the event has been. Even Barry’s book (Beginning ASP.NET Security) sold out. I was fortunate to get a signed copy which I will be sure to keep in my collection.

Jon Skeet was also kind enough to sign a copy of his latest book (C# in Depth) which I impulsed purchased.

The sessions I attended were:

Test Driven Development to save time, money and your sanity by Richard Hopton

Richard has a clear and simple approach to explaining TDD and although most of the content wasn’t new to me, his techniques and clarifications certainly made my own approaches seem more sensible. His session showed an introduction to the whys and hows of TDD and his code demo was efficient and explanatory, showing TDD and writing tests in an understandable way.

Multi-Tenant ASP.NET MVC Projects by Rob Ashton

Rob did an excellent job handling the room and although a lot of his content could be considered seriously technical, he explained it with ease and clarity. His to the point code demos conveyed the subject matter and complimented his slides and explanations exceptionally. His dry sense of humour came through and the controversial topic met with many questions that he handled with grace and technical accuracy.

C# 4 by Jon Skeet

I had been told that Jon was an excellent speaker and his reputation is well deserved, I enjoyed the level of detail and appreciated the amount of code – showing the changes rather than explaining the changes not only made them make more sense but also showed how and why you’d use the new features.

Not Everything is an Object by Gary Short (@garyshort)

I have never studied any kind of Functional Programming so was looking forward to hearing about it from Gary who has always been an excellent speaker when I have seen him before and I was not disappointed. As well as a good introduction to the fundamentals of Functional Programming, Gary launched into a humorous and informative history of programming language development. I know I’ll take at least something out of his comparison of inanimate objects and classes.

A Developer’s Guide to Encryption by Barry Dorrans

Knowing this was going to be Barry’s last talk at a DDD for the forseeable future, and last community event before “jumping the fence”, it was bound to be an entertaining talk and it was. Several of the organisers had arranged some.. interuptions themed around Barry’s departure. After several videos from people like Liam Westley (@westleyl) and Phil Winstanley (@plip) (including Barry’s poor book being burned to keep Phil’s hands warm) a video from Barry’s past showed up – The Crystal Maze. I’ll let you guess how that went down! The presentation was excellent (between videos) and as always Barry’s technical content was great. Of course, Barry’s book (Beginning ASP.NET Security) will fill the gaps!