Bringing you news, technical articles, and other useful content about Visual Studio ALM and Team Foundation Server
More videos »
If you are looking for answers to questions like above then read on.
It has been a frequent asks to have an easy way to figure out when a particular test artifact got deleted and by whom.
At present all this information goes in TFS collection database table ‘tbl_AuditLog’. But it’s not straightforward to interpret various columns available in this table. One has to take joins with various other tables present in different databases and still interpretation of some columns lies in code only. Thus it is very hard to get this information in human readable form.
To ease this effort, we have created a command line tool that makes this job a breeze.
Given a Team Project Collection Url, it will create a .csv file in which it will write complete audit log, replacing every entry with its corresponding interpretation.
Downloads:
1. Visual Studio 2012 compatible bits of the tool -- Require Visual Studio 2012 or Team Foundation Server 2012 to be installed on the machine
2. Visual Studio 2010 compatible bits of the tool -- Require Visual Studio 2010 or Team Foundation Server 2010 to be installed on the machine
3. Source code
Usage of the tool:
Run following command in Visual Studio command prompt:
TFSLogs.exe auditlog /c:<Team Project Collection URL> /l:<.csv output file path>
Sample output of the tool:
Permissions required to run the tool:
User should be a TFS admin and should be added on TFS Management Console – ‘Administration Console Users’ group.
Following are some important points to note:
1. This tool will not work against hosted TFS because Audit log is not available in case of TFS on Cloud.
2. With time as more and more operations are performed on the TFS, number of entries in Audit log table will keep on increasing. Thus depending upon the size of the Audit log table, this tool may take some time to get the complete log. Hence it is advisable to run the tool on the machine in which TFS is installed.
3. You need to know the object id of the artifact that got deleted – there is no way to get the name of that particular object since it no longer exists in the database post delete.
Please try out this tool and let us know your views regarding it.
Fab! Nice work Shyam. The community loves you :>
This is excellent..
very interesting!!
This is what we are lookign for.....3K MTM users....Let me review this tool.-:)
Thanks a ton!
OMG. Horrible - "User should be a TFS admin and should be added on TFS Management Console – ‘Administration Console Users’ group" WHAT ENTERPRISE LET'S USERS BE TFS ADMINS. Have you tried to run this against your devdiv TFS servers???? I bet you don't have ADMIN rights in production. Seesh! Also how can I prevent folks from being able to delete test suites? I want a DENY on test suites...the manage test plans permission is useless.
@Sam D:
This tool is expected to be used by TFS admins only. The tool runs 'SELECT' SQL queries directly on Collection and Configuration databases which require these permissions.
Permission model at 'Test Suite' level is in our backlog.
@mayur and @Sam D - could you please reply to me at nivban@microsoft.com. I would like to engage with you more on this topic.
Hey can you help on this , whenever i run this tool it give access denied on the folder for CSV file. why is it doing this and how to fix it???
Thanks!