Thursday, May 17, 2012

Rename or Clone TFS 2010 Server

Ever been in the situation where you wanted to make a clone of a production TFS environment, or just needed to rename the server?
Well, I needed to do exactly that for a client recently and spent a couple of hours banging my head on SharePoint in particular.
SharePoint is a very problematic renamer, and I will need to cover that in a separate post, but the rest is fairly straight forward.

Note: I’m assuming that the the login used to perform these tasks is a administrator on the server..

MSSQL Server:

Open up SQL Server Management Studio (or your favourite SQL tool) and connect to the database server. You will notice that if you execute “select @@servername” it will return the “old” or previous server name.

To update this you need to execute the following (replacing the <<oldserver\instance>> and <<newserver\instance>> with your appropriate server names (and instances if applicable):

exec sp_dropserver ‘<<oldserver\instance>>’
GO
exec sp_addserver ‘<<newserver\instance>>’, local
GO

Reporting Services:

Open up “Reporting Services Configuration Manager” and connect to the server, then select “Database”.
Select “Change Database” to display the change wizard.

Select “Choose an existing report server database”, enter the new server name in the next page. Next select the “ReportServer” database and then “Next” until you can “Finish” after verifying settings and applying security scripts.

That should take care of SQL and Reporting Services

TFS 2010:

If you were to open up TFS Administration Console you would find something like this:
image

I must admit that I was surprised (after a bit of digging) that the only change needed to point it to a new server was in the web config file. So go to the TFS web services directory ( By default : %system drive%\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services) and open up the web.config file. In the config file, find the <appSettings> and change the connection string for the “applicationDatabase” to point to your new server name.

Open up TFS Administration Console and you should see some values pulling through now.

The next step is to change the url’s for TFS. In the TFS Administration Console under “Application Tier” select “Change URL’s” and update accordingly.

Now we need to “fix” reporting services. Select “Reporting” in the tree view and click “Edit”. Go to the “Reports” tab of the edit dialog and change the server name. Select “Populate URLs” to reload the correct config.

image

If you do have “schema problems” with either the warehouse or analysis services database, you can change the name and TFS will re-create the databases for you.

Now all that is left to do is to make sure that the project collection’s SharePoint site bindings are correct and you should be A for away..

If this is too dodgy, the next option would be to create a new server from scratch and “port” your existing environment over. I can tell you from experience that is is also not as straight forward as you may think, after all “it is just SQL databases…” backup and restore – right?! …. wrong - but I’ll leave that for another post.…

Tuesday, April 17, 2012

VS 11 : Team Explorer

One of the many things that has received a redesign in VS 11 is Team Explorer.

image

(Notice the “Search Work Items”)

Yes – if you are sharp, you may have noticed that this is from the “dull” Visual Studio 11 Beta.

Now this is a tricky one to get to grips with. I’ve been using it almost daily for the last 2 or so months and I’m yet to get used to the navigation between the “pages” or views.

Where we were used to having everything in a tree view, things have changed a bit and everything is grouped into its own page.

Take the work item view for example:

image

One thing that I’m sure the TFS guys will still work on is the association between work items and the check in.
To associate a work item (if you do not know it’s id) to the check in you follow the following steps:

  1. Go to the work item view, select the query to run and display all the work items
  2. Navigate to the home page and select the “Pending Changes” option
  3. Drag the selected work item from the result view into the “Related Work Items” section

A bit laborious if you are new to TFS.
Now in all fairness, and after you figure out how to use it, there is (yet) another view that manages your “work” a bit better. It does work like a charm if you are using TFS and follow the conventions that the work item flow imposes on you.

image
One thing that I think is absolutely amazing is the code review functionality. Like I said before, I’ve been using VS 11 for a couple of months and primarily work in a distributed team environment. The code review works like a charm for us – especially when you are not available to do the review at the point in time that it is requested.

You go to the “Pending Changes” or your “My Work” view and select “Request Review” to open up the request view.

image

Select one or many reviewers from the team members assigned to the project and then submit the request.

This sends a request to the reviewer, and when he/she opens up the “My Work” view, the request is waiting. The reviewer can then accept the request and use the brand spanking new diff tool to perform the review, adding notes on a line or file level and finally send the resulting comments back to the requestor.

image

Behind the scene this process is achieved by using a mix of work items and shelve sets, and this was one of the big drivers that I had to adopt TFS 11.

I’m sure that there is still going to be some work involved and this is not the absolutely final version, but it sure does make me excited for when the RTM lands…

Monday, March 26, 2012

Words of wisdom…

Some words of wisdom that have become apparent to me in my ventures…

  1. Until you’ve been an employer, you cannot consider yourself to be a good employee
  2. Unless you’ve been awake at 2am worrying about how to run a business, in my opinion you can’t presume to know how a business runs

Friday, March 9, 2012

TFS For everyone…

Some really cool news from Brian Harry this week. The licensing model for Team Explorer Everywhere (TEE) has been changed to reflect Team Explorer’s model. This means that TEE is now freely downloadable (previously you had to purchase the software). All you need is a CAL for TFS (same restriction as on Team Explorer).

This really opens up the TFS environment to non Microsoft developers out there..

This licensing model combined with TFS Express means that you can setup an environment using VS Express and/or Eclipse with TEE connecting to TFS Express, free for up to 5 people.

Microsoft Analyst / Tester event in Cape Town

Anyone that is interested in an overview of managing and tracking requirements, bugs and test cases with Team Foundation Server, Visual Studio and/or Microsoft test Manager, I’ll be presenting an event at the Cape Town Microsoft offices next week.Check it out

Calling all Analysts and Testers: Improve the delivery and quality of your projects (CPT, 13 Mar,free)

This event is in CPT. The equivalent JHB event, which has been blogged about before, can be found here

Are you a tester or analyst on your team? Do you still track your requirements, test cases and bugs manually using Word, Excel and Outlook? Are the bugs you find difficult to reproduce and you have challenges on getting visibility on the quality and project status?

As software grows increasingly complex, quality assurance can no longer be an afterthought. An inefficient or isolated testing process can hinder software quality, reduce time to market and drive up costs. Microsoft is hosting an event to help your organization avoid these potential pitfalls by making testing and quality assurance an active part of the application lifecycle.

DATE/TIME: 13 March - 08:30: -10:30

VENUE: Microsoft South Africa, Golf Park 3 ,Engen HouseRaapenberg Road, Mowbray

COST: FREE

REGISTER : https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032505806&Culture=en-ZA

see you there…

Tuesday, March 6, 2012

VS 11: And Microsoft decreed: You shall search..

It seems that Microsoft took some time to “search enable” a lot of the previously “un-searchable” areas. Some of the notable areas include the toolbox, error list, solution navigator (before VS power tools), etc.

For example, on the “Error List” – not that I would ever like to be faced with more than a few lines of errors/warnings, you have the search box present.

image

You may also notice a “filter” option on the left hand side that comes in handy, allowing you to show errors in the currently open document, all open documents, and the current project.

image

A nice little feature that some of these searches have is a shortcut key. For example the solution navigator shortcut key is “Ctrl” + “;”. This puts the cursor in the search criteria box and you are A-for-away to start typing your search.

image

So there has been a distinctive focus on making things searchable. The pièce de résistance in my mind is what I can only consider an attempt to reduce the large number command bars and have commands accessible to the developer when we need them. The Visual Studio team brought in – wait for it - yet another search. This one is a bit different though – it is called a “Quick Launch”.

What this little gem allows you to do is a search across all the commands available in Visual Studio and in your current context (e.g. saving the current open document). No more searching one menu after the other to find a command that is hidden away 2 or 3 levels deep… I think of all the searches this must be the one that will save me the most time.

Until next time…