Compartilhar via


How To: Get the TFS AT log

In my previous post, I mentioned how to get the client side logs for Microsoft Test Manager (MTM) for reporting any issues.  In some cases, the client side logs are not enough and to figure out the issues we might need the Team Foundation Server (TFS) logs too.  On server, we have various logging mechanism of which most are OFF by default. The easiest way (and the one which is ON by default) is to check the tbl_Command table in the Project Collection DB.  The tbl_Command lists all the web service calls executed by the application tier including other critical information like start time, execution time.

Steps (for MTM\TFS 2010) -

  1. Using SQL Management Studio, connect to your Project Collection DB. If you have used the default collection, this DB name would be TFS_DefaultCollection.
  2. Execute the query below -
SELECT * FROM tbl_Command WHERE StartTime > ‘2011-02-26 10:17:00:000

This will give you all the commands executed after the specified date-time.  You should replace the date-time value appropriately.  Also note that the date-time value here is in UTC .

The tbl_Command table has existed right from TFS 2005 days.  It has some interesting columns and you can use those in various ways to query data differently as talked in this old post.  There is tbl_Parameter table too in which the parameters corresponding to all the commands go.

Comments

  • Anonymous
    February 28, 2011
    Thanks, that's helpful.