How to: Archive Team Foundation Server Team Projects

Every so often, I get asked for help with the archiving of Team Projects. The team asking usually no longer wants to see their old Team Projects for whatever reason, but they still want to get it back should the need arise.

Although there currently is no archiving function on TFS, you can still archive these Team Projects. The process described below will work for TFS2010, TFS2012 (all updates) and TFS2013 (all updates). It will not work for Visual Studio Online (TFS Services). If you follow the steps below carefully, you will have a working archiving solution. Do not skip a single step and follow the steps in the correct order!

Since migrating Team Projects between Team Project Collections is a mammoth task, you will probably create a new archive the next time you want to archive some Team Projects in a Team Project Collection that you already have an archive for. Therefor it is important to document what is in each archive.

So here is how you do it:

  1. Stop TFS app in IIS – this is not strictly speaking required, but for safety’s sake…
  2. Stop the Team Project Collection database which hosts the Team Project you want to archive using Team Foundation Server Administration Console.
  3. Back up the Team Project Collection database which hosts the Team Project you want to archive using SQL Server Management Studio.
  4. Detach the Team Project Collection using Team Foundation Server Administration Console.
  5. Create a copy of the Team Project Collection using SQL Server Management Studio – add the word archive to the name of the copied Database.
  6. Attach both Team Project Collection using Team Foundation Server Administration Console, but keep them off-line.
  7. Start TFS app in IIS.
  8. Delete the Team Projects you want to archive from your current Team Project Collection.
  9. Delete the Team Projects you do not want to archive from the archive Team Project Collection.
  10. Bring your current Team Project Collections line.
  11. You can now detach the archive Team Project Collection again and back it up to external media using SQL Server Management Studio or you can bring it online, in which case you need to configure the security for the archive Team Project Collection – you do not want people to have any other than Read access to this Team Project Collection.

There shouldn’t be any problem with skipping step 1 and 7 – stopping and starting of the TFS app in IIS, by taking the Team Project Collection offline, you will also prevent transactions from being handled against the specific Team Project Collection. I just prefer to wear a belt AND suspenders…

When I have a back-up, I will not need it, but when I don’t have one I will need it!


Improving the performance of your TFS

After working with Microsoft Team Foundation Server since 2004 (remember trying to install that first beta?) I have learnt a lot about TFS. I am also fortunate enough to be part of two virtual teams who are the absolute experts on TFS. The first virtual team is the Microsoft Premier Field Engineers specialising in Application Lifecycle Management – all things TFS included. This group consists of the deep experts in the field, assisting customers to get it right. I have some truly brilliant colleagues in the group who astound me with their knowledge and insight. They understand the hardware, how memory works, how SQL operates, the detail of web service performance and the kernel of the operating systems. I often rather keep quiet, standing in awe of their genius!

From this group I have learnt a lot of small changes that can make a huge difference to the performance of Team Foundation Server. When we talk about TFS, it is important to remember that TFS is not a single application or even a set of applications. TFS is a complex solution using several technologies that are stacked together to provide a solution that is truly great!

So when we talk about improving the performance of TFS we need to look at SQL Server, IIS, SharePoint, Analysis Services, Reporting Services and network.

I will write another time about capacity planning for TFS. It is not as straightforward as calculating your number of users and plotting it onto the correct number and sizes of servers. More on that another day…

You already have a TFS environment up and running (or currently it is crawling). How can you gain some performance gains with relatively little expense and effort?

Reasons for performance degradation:

  1. High pages/sec reading – this means you are using virtual memory instead of RAM. Virtual memory is memory on your hard disc assigned to the Operating System to use as working memory. Ideally your pages/sec reading should be less than 20 – less than 10 is best. Your maximum shouldn’t peak over a 100 too often. This is the ideal scenario. Numbers higher than this and you will experience poorer performance simply because accessing virtual memory means the heads of your hard drive have to move. Solution – add more memory.
  2. High pages/sec reading while Available memory is also high – Before you add more memory, ensure that your machine’s virtual memory setting is set to System Managed Size. If the virtual memory is not system managed, you might not be using all your RAM and still have high usage of virtual memory. I don’t know or understand why. I also don’t know whether this just applies to older versions of Windows Server, but in practice I have seen this more than once!
  3. Hard drive contention – If any or all of the following occurs you have hard drive contention: less than 15% idle time for the physical disc interface, read and write responsiveness is slow – say higher than 25 milliseconds and the physical disc queue length becomes greater than 4. Solution – Provide separate hard drives for the SQL TempDb and the TFS databases.  Also provide separate hard drives for the IIS content and the IIS logs. Both of these actions will improve the performance of your TFS environment if performance was affected by hard drive contention.
  4. Build server, Application Tier and Data Tier on single server – this has never been a recommended deployment. If this is what your environment looks like, expect poor performance when you are running a build. Your poor server is suffering – even if you are only 10 users. Deploy your Build servers on separate machines. Ensure that these machines comply with the appropriate hardware specifications for your team’s build habits and the size of your builds.
There are several ways of tweaking the performance of TFS. Once you know your hardware is adequate, you can tweak the performance of the separate servers and services.
TFS can be a joy to use – if you take good care of it. Once the performance deteriorates due to environmental factors, it can become very frustrating. Do not blame TFS for the environmental factors. Fix them and enjoy this stunning tool while developing working software – after all, that is what we are getting paid for!

Making technology work for people and not the other way around! (1)

There is a “new” buzzword in IT, Usability. “Hooray!!” I thought, until I started playing with these new “usable” sites. Dumbfounded I realised it means I just have to wade through more stuff I DON’T want.

First example: booking a seat on a flight. I know the specific airline used a company specialising in User Experience (UX for short). One would think that I would have less trouble to get my booking done. Not so! I now need more clicks and scrolling, because: “No I do not want to book accommodation”, “No I do not want to rent a car” and “If I want to donate to charity, I will give money, clothes and dry food to my local soup kitchen”.

Blogging sites are another usability nightmare. Who designs these engines? At least for WordPress I can use Microsoft Word 2010 – a familiar tool – to publish my posts. I have difficulty though in finding comments left on my posts. I know they exist; I even know what they are, but where? A mystery! At least WordPress is considerably friendlier than the previous blog engine I tried to use. For every post I tried to make, I received an ambiguous error message. I didn’t know whether to press Cancel or OK after clicking on Save. One of these choices summarily destroyed my carefully worded blog post, the other would post it. Believe it or not OK is the destruction button! I also couldn’t just post from Word 2010. No, if I used Word 2010, I had to copy and paste by using the right click option menu – not my habitual hot keys: ctrl C and ctrl V – to get my carefully composed gems posted. Any numbered or bulleted lists will lose the first 6 characters of the line. With no way to edit the post!

Facebook – my children sometimes use my laptop to quickly log into their FB profiles. Trusting mother that I am, I do not want to spy on them, so if they forgot to logout, I want to do it for them. Logging out is a bit of a hit and miss effort. Just closing FB does not work if the poor darling marked Keep me logged in. There is no button somewhere at the top of the page that asks: Not Xxxx? Click here to change/log out. The solution is to click on the Account label. A drop down menu appears with Log out as the very last option. By the time I have figured this out, my eyes have inadvertently roamed through my unsuspecting adolescent’s profile and I have learnt some things I would have been better off not knowing.

My plea? Please use REAL people off the street to test your usability scenarios! Do not use potential income from advertising as your guiding principal for what usability entails. Usability should mean Easier to use, not More likely to inadvertently buy something I do not need.

Software development through the ages compared to sewing on buttons

First grey haired geek: “When I started programming, we used to write our code out on coding sheets, sent it down to the typing pool. The next day we received our punch cards, did dry runs through those and then fed them to the mainframe. The app better had to work on the third try! My first “Hello World!” programme took me only 5 days to write!”

Second (slightly less) grey haired geek:
“At least we could use Roscoe to program and TSO to test. And we were no longer limited to three tries. I took one and a half days to write my first “Hello World” app.”

Young pimple faced code cowboy:
“It took me 10 minutes to find the sample code, three to download and run. After 13 minutes I had a “Hello World” app up and running.”


First grey haired geek: “To sew on a button I first had to create my hunting weapons. Then I had to kill a deer, skin it, tan the skin, cut slivers of bone for buttons, chew the dried out sinews into threads and then with a stone awl make holes in both the leather and the sliver of bone I used a s a button. The labour altogether for one button sewed was five days.”

Second grey haired geek: I had to go to the store, buy the right colour thread and button. Then I had to figure out how to thread the needle. All in all, travel included, it took me about a day and a half to have the button sewed on.”

Youg pimple faced code cowboy:
“My mom used one of these stick on buttons. It took us ten muntes to find it the right drawer where she keeps the stuff and I had to stand still for her to stick it on. With her yelling at me to stand still, it took 13 minutes to “sew” on the button in the right place.”

I love my career

Today on the smokers’ patio a few of us were discussing our careers: me with 22 years in IT behind me and the young guys with their jewellery and attitude and self-confidence and maybe eight years of IT experience. The one youngster (probably 30) said he cannot see himself doing the same thing for more than 15 years. I had to laugh and then began to think.

IT has changed more in the last 23 years than modes of transport have over the last 200 years. Not a day went past that I didn’t learn something new (some days I learnt that I can be even lazier than I thought possible).

Why do I enjoy my career?

  1. I am often the prettiest woman on a team of 30+ people (OK, so I’m probably the only woman on the team).
  2. I can always talk to strange men without seeming to try to pick them up, because I do GeekSpeak (the capital S is proof that I can J ).
  3. I have really weird, crazy and unique friends, all of them super bright.
  4. I travel to the USA and Europe for TechReady and GeekReady!!
  5. I can fix my own pc, laptop, X-Box, toilet, leaking roof, car…
  6. My kids’ friends think I am cool because I work for …
  7. I earn a decent salary.
  8. My number one reason for loving my career and my current job though is that I can make technology work FOR people, not make
    people work for technology. I will get on my soapbox about this another time.

I love my job. I wake up in the morning eager to do something new or do something old in a new way. [Soapbox warning] For ever so long I thought it was pure luck, but I realised today that it is more than luck. There have been times when I was lucky: the right person at the right time in the right place kind of thing, but I also created my own luck. I made sure that I know something few other people know or that I have one skill which makes me stand out. I would yearn for the next dream job and then set out to get it. Sometimes the dream job disappointed, but more often than not it surprised me. There was a time when I hated every moment of work, but it was my first step (and my first job), my apprenticeship. Am I glad I stuck it out!