Sunday, May 23, 2010

Rollback Changeset in Team Foundation Server (TFS)

I needed to rollback a changeset in TFS. The changeset had 35 files in it so I really did not want to do each one by hand. I found that with TFS Power Tools it is possible to roll them all back at once, however when I issued the command "tfpt rollback /changeset:14699" I recieved the error "Unable to determine the workspace."

I was thinking that this makes sense as I did not specify the TFS server to connect to so naturally I woundered how to do so. Well after looking through a few search results, I finally found that I simply need to be in a mapped directory in order for this to work.

My project is mapped to D:\MyProject_Root so that is the location which I need to run the command. Below are the steps I took to rollback the changeset.
  1. If you don't have TFS Power Tools installed you may obtain the software from http://msdn.microsoft.com/en-us/vstudio/bb980963.aspx
  2. Start the PowerShell Console (Regular CMD Window may work as well.)
    Start > All Programs > Microsoft Team Foundation Server 2008 Power Tools > PowerShell Console
  3. Change to your mapped directory
    PS C:\Documents and Settings\Developer> d:
    PS D:\> cd myproject_root
  4. Execute the command to rollback the changeset
    PS D:\MyProject_Root> tfpt rollback /changeset:15699
    NOTE: You may get an error if you have any pending changes which have not been checked in. Simply do as the message states.
    "Cannot proceed because you have pending changes in your workspace. You must move to a shelveset, undo, or check in all pending changes before reverting a change set."
  5. You will then be prompted to update your workspace. Click "Yes" to continue.
  6. Prepare to wait for awhile. It seems that it needs to update all mappings from the server. I have three projects on the same server. The two other projects are mapped to folders outside of D:\MyProject_Root but were still updated. So your wait time will depend on the number of projects you have on the TFS server and your connectivity to the server.
  7. Once your wait is over, you will be prompted to select the files in the changeset you wish to rollback. Since I want all of the files rolled back, I left them all checked and clicked the "Roll Back" button.
  8. Your changes will be rolled back. When you open the project you will see these files have been checked out and modified so you will need to modify them or simply check them back in.
I hope you find this useful.

Wednesday, March 03, 2010

Server Name Considerations - DNS and More (Mar. 2, 2010) (273750)

This editorial was posted on the SSWUG.org website in the editorial section on 2 March 2010. This is a great read on server naming conventions. I have copied the text below as this will become lost on the site.

Server Name Considerations - DNS and More

I hadn't planned on more naming items - but this is great feedback from a more "holistic" sense and I wanted to pass along this note from Johan.

"I know this is a pure Database Admins forum but when you start discussing server names, you are also referencing one of my other networking tasks. As I am working for a globally operating company with limited ICT staff, I am responsible for Databases, Active Directory, Server installations and Business Continuity Management. The server name standard I introduced uses ISO country code (Char 2), City Code (Char 3), Virtualization (‘V’ or not present), primary function (Char 3) and a number (Char 2). This results in NLEHVSQL03 for the third physical SQL server based in The Netherlands and the city of Eindhoven. This way the location of a server and its primary function is always known by its name.

The thing you are missing in your fine newsletter is the fact that your example server "GGSH389FKSJJS" can have a DNS Alias (technically called CNAME) that also describes another function. So your file server can have the Windows Active Directory and DNS name "GGSH389FKSJJS" and another DNS alias (CNAME) "FSBookKeeping" for the users.

This has multiple advantages:
  • When the server fails, you can bring a new one online called "JXZ596JVSUT", point the DNS alias "FSBookKeeping" to this server and no scripts, unc paths and documents have to be changed as the users use file://fsbookkeeping/fileshare
  • When your location has a Business Continuity crisis. Only DNS aliases have to be pointed to the servers in the backup server room. This also limits the scripting and configuration tasks during a crisis
  • Your server can have multiple functions to the user under different Aliases.
  • DNS entries can be updated with a script so they can be prepared for the case of an emergency. (see http://www.vansoest.it/v1/uk/default.asp?file=Hotlist.whc and click “Domain Name Server (DNS) Tips” for more information about the DNSCMD command line command)
There is a fileserver security option “DisableStrictNameChecking” that must be set before a fileserver (SMB) can be accessed by a DNS alias (CNAME). You can also find more information here: http://www.vansoest.it/v1/uk/default.asp?file=Hotlist.whc and click “Domain Name Server (DNS) Tips” I hope this gives your readers a lot more possibilities for efficiently naming their servers."