TFS Activity in the past X minutes

If you ever need to see if there’s any activity on your TFS Server in the past few minutes (maybe you are planning to take down the server or you are just troubleshooting a connectivity issue), you can run this query in SQL Server, on your collection database:

SELECT IdentityName, StartTime, [Application], Command
FROM tbl_Command with (nolock)
where StartTime > DATEADD(MINUTE, -10, GETUTCDATE())

The table tbl_Command has a few interesting pieces of data.  This query brings back all the commands that were executed in the past 10 minutes.  Remember that TFS keeps saves data in UTC time.

About esteban

Esteban is the Founder and Chief Technologist at Nebbia Technology, an ALM consulting and Azure-powered technology company. He is a software developer with a passion for ALM, TFS, Azure, and software development best practices. Esteban is a Microsoft Visual Studio ALM MVP and ALM Ranger, Pluralsight author, and the president of ONETUG (Orlando .NET User Group).


Leave a Reply

Your email address will not be published. Required fields are marked *

Are you human? *