BM-Bloggers

The blogs of Black Marble staff

TF246062: Two or more database are in conflict when upgrading to TFS 2010

Whist upgrading a TFS2010 Beta2 server to RTM I saw the following error when I ran the verify step of the upgrade.

TF246062: Two or more databases are in conflict because they are each designated as the owners of the following schema: Framework. The schema is for the host with the following name and ID: CollectionName, 8aace481-2471-49c8-da74-77ee3da4ce29. The databases with this conflict are: Data Source=SQLInstance1;Initial Catalog=Tfs_CollectionName;Integrated Security=True, Data Source=SQLInstance1;Initial Catalog=Tfs_Production_CollectionName;Integrated Security=True. You must specify one and only one database owner for the schema in the searchable SQL Server instances for this deployment of Team Foundation Server.

This error is caused because you have two Team Project Collection (TPC) DBs with the same unique GUID. So how can this happen and where do these GUIDs come from?.

When you create a TPC it gets a GUID. It keeps this GUID if you disconnect it from a TFS server and move it to another server. The only time this GUID can change is if you clone the TPC. When the cloned TPC DB is attached, the TFS spots it is a clone of a TPC is already hosts and issues a new GUID.

So how did I get two DBs with the same GUID? The answer is that prior to the upgrade some tests had been done using another TFS server to see if the client wished to do an in-place upgrade or disaster recovery style one onto new hardware. When doing a DR style upgrade the server does not issue a new GUID, as the TPC is unique to the new server, this server knows nothing of the original TFS server. This meant, as the two server shared a SQL cluster, that we had two copies of the same DB (but with different names) on the same SQL instance, so when the TFS upgrade program asked for the DBs by GUID it got back two DBs, hence the error.

The fix was to delete the Db created during the previous tests.

Note: You can see a similar effect if for any reason you replicate any of the TFS Dbs on a single SQL instance, such as to make a second copy of the warehouse DB for some special reporting purpose.

Teaching Programming with Kodu

The awesome team at Microsoft responsible for Kodu have now now released a new technical preview which has a load of enhancements including save and publish for games

get it here

They have also released a Classroom kit which is VERY VERY good, it would be great if there was an update for UK Teaching but I am sure they will do that at some point.

get it here

also recently a new version of Small Basic (0.9) is out

get it here

b.

IDD Building a breakfast comment to a become process – now there is a leap

Gil at Typemock has been posting about some ideas we discussed over breakfast at the Typemock Partner conference a while ago, I have been a bit slow at commenting, so I though I better add to the conversation. Though Typemock is an excellent mocking framework, for me basic mocking is not its biggest win. All the ‘classic auto mocking’ of interfaces to speed TDD style working is great, but I can do that with any of the .NET mocking frameworks. All they do is mean I don’t have to write my own test stubs and mocks, so saving me time, which is good but not the keep win I was looking for.

For me there is another way to save much more time and that is to reduce my ‘build, deploy, use’ cycle. In the land of SharePoint this is a significant time saving, or at least has been for us. It has meant that I can replace the build, create WSP, deploy WSP, let SharePoint/IIS restart and then view a web part, with a build and view in ASP.NET page that uses Typemock to fake out all to SharePoint calls. This is what Gil has termed Isolation Driven Development (IDD) Now isn’t a three letter _DD name going a bit far, I am even not sure there enough in it for me to write a book!

That said this is a solid technique which can be applied to any complex environment where developers or testers need a means to mock out significant, costly, or just slow components to ease there daily work process, often enabling some manual testing process, thus making them more productive. If you read the TPS books it mentions a lot how workers should optimise their work space to reduce wasted time the spend moving between machines or roles, this is just such a move.

So if you want to use the technique for Sharepoint have a look at my post, I hope it will save you time whether on SP2007 or 2010, or maybe apply same technique to other technologies.

Post NDC2010 thoughts – a great event

What a great event the Norwegian Developers conference is. It is a nice size so there is a good selection of tracks, but no so big you feel lost, also the speakers and attendees were all mixing freely which I think always makes for a good atmosphere. This was all enhanced by the excellent organisation of the event, what can I say the wifi worked faultlessly, the food was good and the overflow screens (so from one place you could view the video and audio of any current sessions) was a brilliant idea, so much I know some people took to using this in preference to going to the actual session. You can see the overflow screens at the top of the photo below.

IMAG0258

On the subject of food it was good to have a breakfast, a ‘lunch bite’ and then another small meal around 4pm just when you are flagging. It was noticeable that the sponsors on the expo had basically got rid of all the swag and replaced it with a selection of snacks and coffee machines. For me far more acceptable to get a nice ice cream or a hot dog rather than yet another USB pen drive or fluffy toy with a corporate logo on it. I even enjoyed the band at the ‘legendary NDC party’, the organisers seemed to get all points right.

Also what was nice was that this was not a single vendor conference e.g. a TechEd or PDC. Now these can (but not always) be great for new product knowledge, but they can constrain the subject matter. At NDC there has been a good wide range of subjects with a particular strong Agile process and Ruby tracks. I for one would want to go to conferences to be exposed to things I have not used before, both technologies and concepts. This I feel you can for better at a conference with a wider scope of subject matter than a vendor conference. Now the danger is that the range becomes too wide and dilutes the content, but at NDC again I think they got it about right

Remember all the sessions at NDC were videoed in HD, and they are being rapidly being uploaded to http://streaming.ndc2010.no/tcs/, so if you are interested in seeing my or any other sessions from this ‘amazing line-up!’ take a look.

IMAG0253

I hope any sessions I submit for NDC2011 in May next year get accepted, I would love to go back.

WCF Data Services at NEBytes

Many thanks to everyone who came to Newcastle to see my talk on WCF Data Services, managed to get through all my demos by overrunning a little bit! I’d also like to thank Ben, Jonathon and Damien for their hospitality and help. NEBytes is great user group and I’d recommend anyone who can attend to do so.

During the talk I was asked if WCF Data Services could be self hosted, which I didn’t think was possible. Turns out that it is possible and I would like to thank Steve Hobbs (who asked the question!) for emailing me (the same night!) and letting me know. Steve has posted sample code here and the MSDN reference to hosting Data Services is here.

When roving what I hate most about windows mobile 6 is not knowing what connection it will try to use.

When travelling aboard what I hate most about Windows Mobile 6 is that I have no idea if the phone is going to trying to use a local WiFi or 3G. Mobile Outlook seems the worst culprit, it loves 3G over everything else!.

On mobile 6.5 there are just too many places where you might need set which data connection to use. This means, for fear if a nightmare phone bill, I tend not use us my phone for data. And just just don’t realise how much you use it at home until you are away.

I hope the connection management is more straightforward on version 7