Query TFS 2010 Database for all of yesterday's checkins, ordered by project
I'm trying to write a query for the TFS 2010 database that will return all of yesterday's checkins ordered by Team Project. So far I have:
USE [Tfs_DefaultCollection]
SELECT ChangeSetId, CreationDate, Comment, CommitterId
FROM tbl_ChangeSet
WHERE CreationDate > DATEADD([day], -2, GETDATE()) /*not perfect*/
AND CreationDate < GETDATE();
I'm not sure how to map CommitterId to an actual us开发者_JAVA百科er name, and I'm not really even sure where to begin in getting the name of the Team Project in which the checkin occurred. Any thoughts?
You are querying the operational datastore of TFS. This is not supported and a bad practice. Instead please use the TfsWarehouse which has a much better aggregated model of querying your data.
精彩评论