Welcome to MSDN Blogs Sign in | Join | Help

VSTS 2010 Beta 1 Installation

Is easy.  Very easy in fact, upgrade isn’t much more difficult either!  There is a fantastic video showing how to download and install the bits need to test VSTS 2010 beta 1 at the 10-4 home on msdn.com

http://channel9.msdn.com/shows/10-4/10-4-Episode-20-Downloading-and-Installing-Visual-Studio-2010-Beta-1/

I’d recommend having a look around the site, 10-4 has some very good videos on there that are worth watching.

http://channel9.msdn.com/shows/10-4/

 

One last thing before I sign off this post, Reporting Services and SharePoint are no longer requirements for TFS.  In fact, if you upgrade to TFS 2010 (in the beta at least) you have an option not to configure these on the upgraded server.  I know there are plenty of people using TFS only for source control so the next release should make a lot of people happy.  Of course for the people who use everything and have massive instances running, you will not be disappointed either, trust me on that!

Regards,

Jason

Posted by Jason Neave | 1 Comments

Windows Home Server Power Pack 2 and Recorded TV

Power Pack 2 has been released, huzzah!  There are a lot of new features in the box for remote access but my favourite has to be the Media Centre Connector.  This enables your Media Centre to access your Home Server shares a lot easier, including recorded TV.

Now, your Media Centre will still be recording to a local hard disk so you will need to either manually copy your recorded TV files across to your server or do what I do and use a scheduled task.  I have created a scheduled task which calls robocopy using a few switches to move old files.

 

robocopy.exe “e:\recorded tv” “\\server\recorded tv” /minage:7 /mov /z

 

The above command will move all recorded TV to the given share from the given local source when it reaches the minimum age.  The /z switch makes it restartable in case of network issues.

For me, PP2 has been fantastic for this feature alone.  My Media Centre is built using a laptop hard disk to keep things quieter which means that it can get cramped on the disk.  This solves that problem superbly.

 

My thanks to the WHS team :)

Jason

Posted by Jason Neave | 1 Comments

Custom Build Tasks

Just came across a great project to create a number of customer build tasks for TFS Build.  It is quite in depth and includes the ability to zip files produced by the build and use FTP to transfer files from within the build definition.

http://msbuildtasks.tigris.org/

Enjoy.

Jason

Posted by Jason Neave | 0 Comments

Troubleshooting the TFS Data Warehouse

A nice guide someone just pointed out to me on MSDN:
http://msdn.microsoft.com/en-us/library/ms244674.aspx

Seems to be a great guide to troubleshooting data warehouse issues, I guess the clue was in the name :)

 

Jason

Posted by Jason Neave | 0 Comments

TFS Backup to Live Mesh

I’ve been thinking about the “little guys” of late and solutions not always available to the small dev groups, offsite backup being one of these.  Windows Live Mesh is a solution I’m using for my photo library as the Live Desktop has 5GB of online storage available, all you need to do is set a folder to sync to it. 

So, “how can I sync TFS backup’s to Live Mesh?” you cry! Easy.

Follow this guide to set up a maintenance plan for the TFS databases and specify the folder you want them to be backed up to.  Once complete, add the specified folder to Live Mesh to grab the contents of that folder every time a new file is added or updated.

Job done.

One thing to bare in mind when setting this up is the legal ramifications of backing up your data to 3rd party servers.  For the hobbyist this isn’t really an issue however for professionals or other parties with business concerns you should look into the legal aspects of hosting your IP in such a manner.

Legal shenanigans aside, enjoy!

Jason

TFS Permissions: Allow vs. Deny (and a fix)

Allow and Deny permissions can cause confusion in TFS, for the most part deny overrides allow which means an Admin can lock themselves out of a project if they are not careful.  I’ll reference the other blogs I’ve read with regards to explaining the issue in depth as they have done it better than I could however I will share a solution in case you see yourself in this situation, recently provided to me by one of my customers.

I’ve never been one to let my pride get in the way of good advice so thank you Niels for the fix :)

“TF permission /server:hostname /inherit:Yes”

 

References:

http://teamfoundation.blogspot.com/2008/07/deny-or-allow-who-wins.html
http://teamfoundation.blogspot.com/2008/07/deny-or-allow-who-wins-sequel.html

Team Foundation Server Permissions
http://msdn.microsoft.com/en-us/library/ms252587.aspx

TF.exe Command-Line Utility Commands
http://msdn.microsoft.com/en-us/library/z51z7zy0.aspx

Posted by Jason Neave | 1 Comments

Resetting Reporting Services 2005 for Team Foundation Server

Nine times out of ten most TFS related Reporting Services 2005 issues can be resolved by resetting everything back to the original settings.  Follows is a guide on how to do excatly that.  Please ensure you back everything up before doing this and it is at your own risk.  Saying that it's vary rare it goes wrong but consider yourselves warned :)

  1. Connect to reporting services using the Reporting Services Configuration tool on the application tier entering the name of the server hosting Reporting Services and the database instance name
  2.  In “Report Server Virtual Directory” check “Apply Default Settings” then “Apply”
  3. In “Report Manager  Virtual Directory” check “Apply Default Settings” then “Apply”
  4.  In “Windows Service Identity” ensure that the identity is either “Local Service” for a single tier machine or “Network Service” for a dual tier machine
  5. In “Web Service Identity” ensure that “Report Server” is selected for both “Report Server” and “Report Manager” then click apply
  6. In “Database Setup” ensure the host name of the data tier is entered (server name if single tier), “ReportServer” for the database name and “Service Credentials” for the credentials type
  7. LEAVE SHAREPOINT INTEGRATION BLANK
  8. On the “Encryption Keys” page click the delete button then OK.  The only items encrypted at the data sources and we will rebuild them in a later step
  9. In “Initialization” ensure that the host name of the report server is listed as “Initialized”, if this is not the case select the server and click initialize

Your server is now back to the default settings for Team Foundation Server, all we need to do now is recreate the Reporting Services data sources for Team Foundation Server.  Please follow the steps in this post to set them up.

After this should be good and cooking.

Jason

Posted by Jason Neave | 1 Comments

Recreating SQL Server Reporting Services 2005 Data Sources for Team Foundation Server

Under some situations you may come across an issue that requires you to delete and recreate the data sources for Reporting Services 2005 for your instance of TFS.  An example would be where you need to rebuild your server from a backup but for whatever reasons the SSRS encryption keys were not backed up themselves.  This post will detail how to recreate those data sources.

To confirm or change the details for the connection to the Data Tier from Reporting Services you need to follow these steps, as with most procedures of this nature you need to be logged in as the TFSSETUP user.

  1. Connect to http://apptier/reports and you should see a page with a folder for each team project and two data sources:  TfsReportsDS and TfsOlapReportsDS
  2. Click on TfsReportsDS and use the following settings:
    Connection Type: Microsoft SQL Server
    Connection String: Data source=datatier;initial catalog=TfsWarehouse
    Select "Credentials stored securely in the report server" and enter the credentials for the TFSREPORTS account
    Tick the "Use as Windows credentials when connecting to the data source" box
    Click the apply button then navigate to the home page

  3. Click on the TfsOlapReportsDS data source and enter the same as above though ensuring the Connection Type is set to "Microsoft SQL Server Analysis Services"

If you followed the above you should be back up and running.

Jason

Posted by Jason Neave | 1 Comments

Team Foundation Server 2008 Disaster Recovery

As I mentioned some time ago I have been writing a few documents to compliment the official documentation.  I figured I would start with a flourish and post this document first.  I have pasted the Abstract below as a taster for the rest of the document:

The purpose of this document is to outline a disaster recovery strategy for Team Foundation Server and provide all the information required to implement the same.  The purpose of the plan in this document is to get your TFS back online as soon as possible assuming your servers have been rendered inoperable due to unforeseen circumstances.

The premise is simple, how to setup and configure your instance of TFS for failover if your primary servers go down.  The document includes recovering your instance to standby application and data tiers as well rather than just the application tier.  This is provided as-is without warranty, please test before implenting!

Comments welcome, enjoy.

Jason

Useful Links

This post is more for myself than anyone, it is a collection of links difficult to find that are nevertheless very useful.  If they can help others as well then all the better.

Team Foundation Server

Customizable Team Foundation Build Targets
Team Foundation Build Tasks
Team Build 2008 Build Definitions

Windows Home Server

We Got Served

 

More to be added over time and feel free to add yours to the comments, I'll add them to the list if useful :)

Regards,
Jason

TFS Activity Logging

There is a feature of TFS that allows all commands run through it logged to an internal database.  This is the TfsActivityLogging database and one of its key features is that it can never grow to large.  If enabled, activity logging will log all commands with a minimal overhead and will only log the last seven days.  Here is how you enable it and a brief tutorial on how to use it.

Enabling TFS Activity Logging

WARNING:  Changing the web.config file for a web application in IIS will force an application pool reset!  Consider yourself warned!

  1. open the <TFS Instal Path>\Webservices\web.config file
  2. locate the following element <add key="commandLogging" value="None"/> and change "None" to "All"
  3. The application pool will restart and logging will be enabled until the above value is changed back to "None"

Logging is now enabled, how do you use it I hear you cry?

Viewing the TfsActivityLoggging Data

WARNING:  Do not touch ANY other databases that TfsActivityLogging, to do so may severly damage your instance of TFS and put your data at risk!  Seriously, just don't do it.  Even if you have backups. Ever.

Connect to the Data tier using SQL Server Management Studio, right click on "TfsActivityLogging" and run the following SQL query:

Select * from tbl_command c left join tbl_parameter p on c.commandid = p.commandid

This will return all commands.  For a Version Control commands append the following to the above;
where c.Application = 'Version Control'

other applications are:  Data Warehouse, Integration, WorkItemTracking, Proxy

Have fun,
Jason

PS.  Seriously, don't play with your databases, it ends badly!

Posted by Jason Neave | 0 Comments

Windows Home Server and Live Mesh

Regular readers of my blog will know I've been a fan of Foldershare on Home Server for a while now.  The main reason for this is a simplified version of "Offline Files" that works across the internet.  It also works as a nice backup when remote access fails and I cannot connect normally for some reason, usually on those days when I forget my iPod and have nothing to listen to...

Enter Live Mesh.

I received an invite from a friend and decided to give it a go, as is my want.  To say I was a impressed is an understatement, Mesh does a lot that Foldershare does, namely sharing folders, but it also has online backup of folders to the tune of 5GB and remote desktop capabilities as well!  Apparently a Mac and Windows Mobile client will be coming soon which will be interesting, I assume the Mac client will offer the same functionalities as the PC client though how it will work on Windows Mobile has me truely intrigued.

I think my favourite feature is similar to Foldershare insofar as it works as a backup for those occastions where remote access fails.  Using Mesh on my Home Server I can still get to the server console and my files now rather than just my files.

Mesh will also be exstensible though the SDK is not yet available, apparently it will allow you to add an application to your mesh though which is promising indeed.  I'm thinking that media sharing across clients, remote Home Server notifications and a better remote control guide for MC would be a few likely candidates.  Lets hope someone reads this and gets a few ideas!

Jason

Win32 Error Codes and HRESULT Definitions

Not the snappiest of titles though if you are debugging Win32 applications, COM servers or just see a random error code in your event log these two mapges may be of help...

HRESULT Values
Win32 Error Codes

I'll try and come up with something more interesting for the next post...

Jason

Posted by Jason Neave | 2 Comments
Filed under:

Virtual Server and Differencing Disks

Another trick I use in Virtual Server is the use of differencing disks.  A differencing disk is one that inherits it's contents from a parent disk, a powerful tool when used to the ful.  For example, I have a blank installation of Windows Server 2003 SP2 on a VHD.  I have set that VHD to be read only and use it as a parent disk for a number of virtual machines.  NOTE:  I'm not a licencing expert, make sure if you follow these steps you have licences for all the virtual machines.

How To Create a Differencing Disk

In the Virtual Server website under "Virtual Disks" hover over "Create" then click "Differencing Virtual Hard Disk".  Enter the location of the differencing disk you want to create in the top box and select the parent disk you wish to use from the bottom box.  Job done.

From here create a new machine using the newly created hard disk.  A very easy way to create junk machines for testing, if you mess one up delete it and create another.

Regards,
Jason

Posted by Jason Neave | 1 Comments
Filed under:

How To: Failover a Mirrored Data Tier when the Principle Data-Tier is Not Available

Recently I've been working on SQL mirroring with TFS and concentrating on worst case scenarios, when the principle data tier goes down.  The whole point of mirrors with TFS, as I understand it, is high availability.  With regards to setting up mirroring for your data tier I the documentation is quite clear (http://msdn.microsoft.com/en-us/library/aa980629.aspx) however the articles for fail-over are not.

The official documentation (http://msdn.microsoft.com/en-us/library/aa980528.aspx) for failing over when the principle data tier isn't available, think worst case and server down, is not great.  When I tried to follow this through I had no luck, things did not go well.  To that end I came up with my own solution, it was a lot quicker than following the official documentation and it works.  In server down scenarios time is of the essence.

The following steps are a guide only, please don't see this is a stone set guide and certainly don't rely on this for production.  I would say use this as a base, test it thoroughly in staging and once you're comfortable do as you wish.  I've also only tested this with TFS 2008 and SQL Server 2005 SP2, as most of the work is in SQL I believe this guide will hold true for TFS 2005 but some steps will vary a little.

You will need to set up an alias on the mirror so that connections referencing the principle will not be rejected.  To do this follow these steps;

Connect to the mirror and open “SQL Server Configuration Manager”, expand the “SQL Native Client Configuration” and right click on “Aliases”.  Click on “New Alias” and enter the following information;

 

Alias Name:         <hostname of the principle data tier>

Port Number:    1433 <may be different on your setup however this is default>

Protocol:              TCP/IP

Server:                 <hostname of mirror>

 

Then click on OK. 

 

To failover follow these steps;

1.       Connect to the mirror and run the following script, if your WSS databases are named differently you may need to change those entries;

ALTER DATABASE ReportServer SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE ReportServerTempDB SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE TfsActivityLogging SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE TfsBuild SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE TfsIntegration SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE TfsVersionControl SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE TfsWarehouse SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE TfsWorkItemTracking SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE TfsWorkItemTrackingAttachments SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE WSS_AdminContent SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE WSS_Config SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

ALTER DATABASE WSS_Content SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

Please note, if one of these entries fail then you will need to remove those that succeeded before the failure.

 

2.       Open the hosts file on the application tier

a.       C:\Windows\System32\Drivers\Etc\Hosts (no file extension)

b.      Add a reference forwarding the hostname of the principle to the IP address of the mirror

c.       Save the changes

3.       Open a command prompt and run “ipconfig /flushdns” and “iisreset”

4.       Run the following command on the application tier;
setupwarehouse –o –s MirrorDT –d TfsWarehouse –c warehouseschema.xml –ra TFSReportAccount –a TfsServiceAccount –mturl
http://at:8080

5.       Once complete, connect to Analysis Services on the mirror using SQL Server Management Studio, browse to TfsWarehouse, right click then “Process”.  This may take some time to complete as it is rebuilding the TfsWarehouse from historic data, wait for the processing to complete

6.       Open “Reporting Services Configuration Manager”

a.       Click on “Database Setup”

b.      In server name, enter the name of the mirror then click apply then connect

7.       Open the report manager website (http://apptier/reports) and change both the connection strings such that they point to the mirror rather than the principle data tier


Done, from here you should be back up and running.  The benefit of the above is that once you get your principle DT back up and running it is a little easier to switch back.  I haven't test this fully yet though and will update this once I have.

Comments welcomed!

Regards,
Jason

More Posts Next page »
 
Page view tracker