Tuesday, January 29, 2013

TFS Adminsitration - How to Delete Workitems

This is based on VS2010. 2012 wiull have a different installation path.

For 64 bit OS machines use below. For 32 bit machines use c:\program files\

Escape the path when doing the cd.

cd "c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE"

You need admin rights to do this operation. Make really sure you know what item you want to destroy, especially in a multi-collection  multi-project environment.

c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>witadmin destroywi /collection:http://sql1:8080/tfs/IH  /id:6576

Are you sure you want to destroy work item(s) 6576? This action is not recoverable. (Yes/No) y
The work item(s) were destroyed.

Wednesday, January 9, 2013

Test DB Connection w/o SQL Server Installed

There are times you do not have Management Studio installed on a server and need to validate a connection can be made to the database tier. The easiest way to do this is by creating an empty file and saving it with a .udl extension (e.g. TestDBConnection.udl). This opens a native connection tool. Be sure to know the type of security, account to be used, and the connection provider you will use (look in your config file). If you are missing the SQL Server Native Client in the provider tab, it is not installed on your server. This needs to be installed if you are targeting this provider in your code (which is the most effecient way to connect to a SQL Server db). You can then open the file and see the connections string that was generated.