Tuesday, December 18, 2012

TFS 2010 Branch Deletion

A specific user requested branching permissions for TFS yesterday, but it took me a little while to find exactly where those specific permission settings were (I am doing this through Visual Studio; specifically VS 2012 because I prefer it, but the options should be similar in VS 2010).

As it turns out, you'll have to:
  • Open the Source Control Explorer, find the folder that needs branching
  • Right-click the folder and find the security option
  • Add the user to the list here and ensure they have the Merge & Manage Branch options selected
    • (they should have inherited other permissions if they're part of the contributer group for the project already; if not, select those permissions that contributors are given by default as well).

Afterwards, the user created a branch they did not intend to and needed to delete it, but found that the "delete" option in the right-click menu was greyed out. Contrary to popular belief, this does not mean the user does not have permission to delete it. To delete a branch:
  • Right-click the branch, select "Get Latest Version" and select a local folder to place it
  • Right-click the branch, select "Delete"; notice it is marked for deletion after this
  • Right-click again and select "Check In Pending Changes" and complete the steps for check-in
It should disappear from the source explorer now!

I know, this seems remedial, but it took a while to figure out, so I can't be the only one.

Ryan

Wednesday, December 5, 2012

TFS Permissions Tool

Found a cool tool for TFS administrators to change user permissions across all aspects of TFS (Team Foundation roles, SharePoint roles, & Reporting Services roles). The TFS Administration Tool allows you to add, edit, delete and import users for any TFS project.

There was a hitch I had when using it for the first time which had to do with permissions. Since I didn't create all of the projects that are currently in our TFS collections, I didn't automatically have permissions for the SharePoint roles, and therefore couldn't administrate any settings on most projects. Our SharePoint instance for TFS is on the TFS application server, so I had to access SharePoint 3.0 Central Administration on that server. From there:

  • Click Application Management
  • Under Application Security -> Policy for Web application
  • Add user
    • choose the web application (mine was already set)
    • (All zones)
    • Choose Users -> put your username in
    • Permissions -> Full Control
    • Click Save
Unfortunately it just isn't enough to be in the Farm Administrators group.

This tool is worth checking out if you do a lot of permissions changes! It's really quick and easy to give muliple users the same permissions (like if you've just created a new project and need to add a dozen people to it).

-Ryan

TFS 2010: Click "View Reports" twice?

At first, after fixing the reports on our TFS 2010 report server, I thought reports weren't running properly when changing the parameters of the report. For instance, I would change the "From (date)" field, and then click "View Report" (or hit Enter); the screen would flicker, but no reports would show. I found that if I simply clicked "View Report" (or hit Enter) again after this screen flicker, the report would load.

As it turns out, Microsoft posted some time ago about this being a normal function:

----

Posted by Microsoft
Thank you for your feedback.

We have reviewed your issue. The issue that you have reported is by design because we do need a click outside of the textbox (and that could be the first View Report click) to validate and calculate any parameter dependency. And then after that, you need to click View Report to run the report.

Thank you.

Stella Chan
SQL Server Reproting Services

TFS 2010 Report Errors

I received an email from a user telling me reports weren't working properly for her TFS 2010 project (keep in mind, I've found that a lot of TFS users don't seem to use reports in this division). When certain reports were run (not all of them though), this error would come up in the report area:

An error has occurred during report processing. (rsProcessingAborted)     
   Query execution failed for dataset 'dsTestData'. (rsErrorExecutingCommand)         
      For more information about this error navigate to the report server on the local server machine, or enable remote errors

Now there are multiple solutions to this, many of which available on the MSDN forums:
  • Enable remote errors and find out what's throwing the error (I didn't get to this)
  • Ensure the proper permissions are granted
  • Make sure the data sources are set up properly, and that the data source types are
    • TfsReportsDS -> Microsoft SQL Server
    • TfsOlapReportDS -> Microsoft SQL Server Analysis Services
    • (Sometimes these data source types are erroneously switched)
(A cool tool for checking the status of your TFS 2010 Warehouse and Analysis Services sync statuses: TFS 2010 Warehouse Service Utility from Benday.com)

There may be other issues as well; those above are ones I was in the process of exploring when I noticed something through SQL Server Management Studio...the SQL Server version number of the Analysis Server running the Tfs_Reports database (I believe Tfs_Analysis is the default name of this db); it was SQL Server 2005! SQL Server 2008 is needed in order run all reports properly.

Steps I took to fix:
  • Have the SQL team install Analysis Services on an instance of SQL Server 2008 R2.
  • Connect to the Analysis Services of that server
  • Create a new empty database
  • Through the TFS Administration Console, Reporting tab, "Stop Jobs"
    • "Edit" -> Analysis Services tab
    • Change server/instance settings (& database name if necessary), Test Connection
    • Empty database will be filled with data when OK is clicked
  • Waited a few minutes to ensure the database was updated properly, then "Start Rebuild"
    • Caution: I've been told this can take up to a few hours. It only took a couple minutes for me.
  • Using TFS 2010 Warehouse Service Utility, I told the server to Process Analysis to sync up the database with the TFS data.
  • After the app told me the process was finished and successful, I went to the report site and tested the reports I saw were not working. Viola! All working with proper data.
Side note: the processes to update the analysis database and allow the cube to process may take some time. If the reports don't work right away, wait 10 minutes or so after completing the steps.

I hope you find this useful! Moral of the story: when tossed into an already-functioning production environment, take the time to check all of your systems make sure everything is up to date, or at least at minimum requirements for your system to work properly. :)

-Ryan

Who I am, What I do

My name is Ryan, and I'm a Systems Administrator (Hi Ryan...).

So who am I? Well, I currently work as a consultant-with-full-time-opportunity for a global, corporate real-estate company in an office based out of the Chicagoland area (we'll keep it vague for simplicity's sake). The company hired me on (Fall '12) fresh out of college as an "athlete," meaning I size up and have a good background, so they can train me how they'd like, to manage whatever they need managed. So, they put me on Team Foundation Server (TFS) to start. Since then, I've also worked a bit with Avicode SE-Viewer, and I'll be working more with PingFederate SSO and SiteMinder in the future.

This blog is essentially a way for me to show others in my position (starting out as a SysAdmin or maybe unfamiliar with the systems I mentioned above) the struggles/problems/bugs I've come upon and the steps I took in solving those issues. Feel free to comment about easier ways to do things; I'm all about learning how.