Thursday, April 19, 2007

Recreating your WIT database (part 2/3)

Ok, so we want to recreate the team project so we can apply a different process template on it (you really only have to do this in case you need to delete/rename work item types) but we don't want to loose all our history in source control.

Here are the steps you need to do:

1, Back up all your databases acording to the documentation mentioned in part 1 of this post.

2, Copy all your drops of your team builds to a backup location.

3, Delete the Team Project using TfsDeleteProject.exe.

4, Recreate the TeamProject using the correct template and the same name as before.

5, Restore the TfsVersionControl database to it's original state.

6, Restore the team build drops to theri original location.


There reason this works is due to the fact that the only thing that links source control to the rest of the Team System functions is the logical path name based on the team project name. Thus if you have a project called "DEMO" the link to version control will always be "$/DEMO". This will most likely change when the Orcas release of TFS hits the streets since then we will get all kinds of goodies to deal with problems like this.

I've tried this on many projects and most have been a success, I have not lost any project doing this but our main project (the reason for even thinking about this) failed misserably when doing this since it was to big and generated a timeout exception during the delete process leaving it in an inconsistent state (we had to restore it and resort to a different method, which I'll probably post a blog about as well).

In the last part of this post I'll point you to a couple of different approaches that you can take if you like.

No comments:

Post a Comment