Month: October 2007

Podcast List

I thought I would make a list of the Podcasts I like:

Technical:

BBC

Music

“I just woke up and want something not too demanding for commute”

Maintenance of Team Foundation Server 2005

A talk by Kevin Kline at Code Camp last weekend got me thinking about how I take care of my Team Foundation Server 2005.

He was not talking about TFS in any way, but he is an enterprise guy and he highlighted the value of backups. Apparently he runs a stored procedure before every backup to ensure that the database is not corrupted.

His script is for SQL Server 2000, and I thought about how it might compare to my maintenance plan that I run every night with my backup:

TFS Plan

As you see, for each task I have collected all the TFS relevant databases together. (As good practice, there shouldn’t be any others on your server)

 The main point of this task collection is to check the database integrity before I backup. If you backup a corrupt database, you will then have to go back an indefinite amount of time to fix it.

I then clean up TFS backups older than 2 weeks… this is because I don’t want the backup drive to fill up, and potentially lose the latest backups when I am not around.

I make a full backup each time. I know that backing up the difference between backups would be far more efficient, but I prefer to be safe. I will probably switch to daily incremental backups, and weekly full backups in future.

I don’t really expect any great performance boost from rebuilding the indices and updating the statistics, but there is no cost at doing this anyway at 01:00 everyday. 

How does everyone else do this? If you can suggest any enhancements then that would be great 🙂

Deleting the workspace of a departed user

A developer just left, and inadvertently left some files checked out. I took a deep breath, since I feared I would have to track each one down and remove the lock by hand.

However, this post showed me that you can just delete the user’s complete workspace with one simple command:

http://blogs.msdn.com/mrod/archive/2007/01/08/undoing-a-checkout-that-belongs-to-another-user.aspx

Note: This is only if you are really sure you want to delete that workspace!

Restore Team Foundation Server 2005

Backing up Team Foundation Server is easy.. just schedule a full database backup every night and keep the Reporting Services key safe.

Restoring Team Foundation Server is very hard. Well, I would want to restore because hypothetically my main server machine has died. Hence a move to another Hardware Configuration.

http://msdn2.microsoft.com/en-gb/library/ms404869(VS.80).aspx

The short story is lots and lots of settings and command line executions.

At the end of this ordeal, I was asked to run this web service (http://servername:8080/WorkItemTracking/v1.0/clientservice.asmx) in my browser to test, and I got this error message:

TF10216: Team Foundation services are currently unavailable. Try again later. If the problem persists, contact your Team Foundation Server administrator.”

Luckily,  Grant Holliday had found and solved this problem before with an undocumented command:

http://www.holliday.com.au/blog/tfs-instanceid-servermapxml-and-how-to-cause-havoc.html

Thanks Grant!

What would be great would be an automated method to backup and restore to a different machine every night. I know I can mirror the databases to achieve this, but I’d prefer no performance hit during the work day.