0

Slick and Easy Integration of TFS with Slack

by Angela 26. August 2015 20:42

Maybe you’ve been lamenting the lack of robust chat functionality in TFS, or maybe you’re just already in love with the chat tools you have, and would love to have a way to make it a more integral part of your TFS experience. With the latest release of TFS, this is easier than you think! If you’ve been using VSO, or if you upgraded to 2015, you can do just that! Now while you can get super fancy and do some integration acrobatics programmatically, you can also do some quick integrations right through the TFS web UI. And I’m all about quick and easy integrations when I can get them.

In my case, I wanted to setup TFS and Slack so that I could receive important notifications from TFS right in my active chat window. It’s not hard, but there was quite a bit of bouncing around so I wanted to share the basic steps and hopefully lead you quickly down the right path to get it set up.  So fire up your TFS instance and follow along, or just grab a cup of tea and take a peek at just how simple it is to get these two great tools talkin’.

Start right here in the TFS admin tools, in the Service Hooks tab:

image

When you add a new hook, there are actually quite a few options including Campfire, Jenkins, Slack, and a host of others.Once you select the service, just choose the event that you want to subscribe to, and specify any other filters or options based on the service event you are subscribing to.

Currently you can setup subscriptions for a number of events including:

build completed

code pushed (for Git team projects)

pull request create or updated (for Git team projects)

code checked in (TFVC team projects)

work item created, updated, or commented on

message posted to a team room

In this example, I am just keeping it simple and asking to be notified any time a new work item is created in the team project, at any level. I *could* have narrowed it by work item type, or even area path.

image

Next you’ll need to set up an Incoming WebHook for whatever tool you are looking to send messages to from TFS. In Slack, you would go to the Configure Integrations menu to start this process:

image

Assuming this is your first integration into Slack, you’d need to setup a channel to post to next. If you do have existing channels, you may select one of them assuming you don’t mind merging multiple streams of information.

image

Channels give you a way to tap into a feed of messages within Slack, rather than have information from many sources all jumbled up into a single flow of data. Since it’s super simple to switch between channels in Slack, I just created a separate one for this new stream. 

image

Once you have your channel setup, add the incoming WebHooks integration by grabbing the URL that will be used to send the JSON payload to Slack, and paste it into the Service Hooks dialog back in TFS.

image

Make sure to hit the TEST button to ensure that everything is working as expected.

image

You should see a notification from Slack about the test message (if you’ve enabled notifications), as well as in the Slack channel feed. Rinse and repeat until you’ve setup all the types of integrations you want. It’s that easy!

image

Now whenever any of those configured events are triggered, you’ll get notified in Slack!

image

Hopefully that quick walkthrough gave you a good idea of the kinds of integrations you can setup between TFS and some other great automation and collaboration tools using just the TFS ServiceHooks available right in the TFS web console.

Have fun and happy integrating!

0

Join Polaris for a TFS Release Management Webinar in February

by Angela 22. January 2015 16:29

So in case you have not heard, the licensing for Release management just got CRAZY inexpensive, if you have MSDN anyway. More about licensing can be found on MSDN.

Wondering what Release Management is? Well I don’t want to steal Zaneta’s thunder, so I’ll sum it up. Imagine a TFS extension that allowed you to easily deploy an application across a host of environments, including approval workflows for release to each environment, with the click of a button. If you’re an agile shop looking to achieve continuous deployment across a number of environments, this is a must have! 

Join us in February to learn more from one of our RM experts! Register Now

Continuous Delivery with Release Management

DevOps is an increasingly important part of application lifecycle management and is a growing area of interest as businesses need to develop and deploy quality applications at a faster pace. Release Management for Visual Studio is a continuous delivery solution that automates the release process through various environments all the way to production.

With Release Management in Visual Studio you can configure, approve and deploy your applications for any environment. Create automated deployment orchestrations for each environment no matter how complex the configuration. Delivering your software more frequently and easily to an environment allows your testers to get to work validating your system and keeps your stakeholders involved in giving feedback.

Please join us for this free online webinar to learn more about this powerful ALM toolset.

Key Experiences:

· Overview of Release Management

· Installation and Setup

· TFS integration

· Approval workflows overview

· Release Template creation

· Authoring and maintaining releases

 

Event Info: Thursday, February 12,2015 1:00 PM – 2:00 PM CDT

Presenter: Żaneta Surdel has been developing software for the last 10 years. She has worked on a variety of projects utilizing various Microsoft technologies and filled a number of roles – programmer, (human) release manager, ALM consultant. She holds a MCSD ALM certification and is a certified Scrum Master. For the last 4 years, she’s been a Senior Consultant with Polaris Solutions.

Register Now

0

Free Half Day Events in Oct/Nov: Efficient Testing with Microsoft Test Manager

by Angela 18. September 2013 18:08

Been curious about Microsoft’s latest release of their testing tools? Want to know more about managing your test environments, both on premise and in the cloud? How about when to use test automation and what tools Microsoft has to meet your automation needs?

There is a great half-day testing event coming to a city near you if you live in the Midwest area, wanted to be sure to share it with everyone before it filled up. Since I am delivering the content I can tell you there are going to be some great topics being covered! Best part, it is free. Check out the details and agenda:

How do I integrate better with the team?

QA is near the end of the process chain, so one of the best things they can do to be successful is improve their efficiency and collaborate better with the development team.

In this session, we want to answer all of these questions:

  • What if you could draft and select test cases early in the project and ensure you have test coverage by assigning them to requirements?
  • What if the bugs you discover could automatically include data about the underlying behavior of the application and the machine it’s running on?
  • Are you getting enough information about a release to know what to test?
  • Which new features have been implemented? Which haven’t?
  • Which bugs are supposedly resolved?

We’ll discuss how to take advantage of the opportunities for improving collaboration between testers and developers.

What should I automate?

While manual testing is always going to have its place, there are several types of tests that can be automated for efficiency.

In this session, we’ll discuss everything from automating functional and load tests to the automation of writing test case steps and designing for reuse.

How do I set up a dev/test environment?

Today’s applications are more complex than ever and it can be very challenging to set up and maintain these environments. Many organizations resort to a small number of shared environments, but you are trying to keep up with frequent developer builds, concurrent projects, and ever-changing data.

This session introduces Microsoft’s Lab Management solution which allows developers and QA to self-provision their own environments. We’ll look at you can take advantage of virtualization (on-premises or cloud) to create environments, roll them back to known states, and attach them to bugs while minimizing the labor in your data center.

During this event, your local MTM Specialist will provide you an inside look and show you the capabilities of Microsoft Test Manager. Furthermore, we’ll cover how quality is an accountability and addressable by the entire development organization.

REGISTER NOW at a city near you using one of the links provided:

10/10 Southfield, MI

10/22 Milwaukee, WI

10/23 Chicago, IL

10/24 Indianapolis, IN

10/28 Nashville, TN

10/29 St. Louis, MO

10/30 Kansas City, KS

11/4 Columbus, OH

11/6 Cleveland, OH

11/6 Edina, MN

Event starts promptly at 9am. Complimentary Food & Beverages provided in the morning

0

Join the Chicago Visual Studio ALM User Group on Wednesday, May 15 to talk ALM and DevOps

by Angela 6. May 2013 16:39

clip_image001

Did you know that there was integration between System Center 2012 Operations Manager and Team Foundation Server 2012? This integration is designed to facilitate communication between operations teams and development teams, which is part of an industry movement known as DevOps. The goal is to accelerate Mean Time To Resolution (MTTR) by quickly providing development teams with as much relevant and useful information as possible about a production incident. Since System Center 2012 Operations Manager already has a deep understanding about your production systems and the applications which are running in those environments, this integration puts that information at the fingertips of the development team without requiring back-and-forth human interaction to solicit these details.  Brian will spend some time talking through how this works, the benefits of DevOps and some real world examples of this awesome partnership at work. Now there is even a great image available so you can kick the tires with minimal setup, thanks to Brian Keller: http://blogs.msdn.com/b/visualstudioalm/archive/2013/02/07/devops-virtual-machine-with-team-foundation-server-2012-and-system-center-2012-now-available.aspx. Please note the higher base system requirements to run this image, it's a bigun'.

 

Brian A. Randell is a partner with MCW Technologies, LLC. Brian spends his time between teaching Microsoft technologies to developers, working with new and emerging technologies like Visual Studio 2010 & Team Foundation Server, and consulting worldwide for clients that that range from large Fortune 100 business to state governments to small businesses. In 2010 and 2012, Brian and his team built samples and demonstration content for Microsoft to be used for their worldwide launch activities for Visual Studio and Team Foundation Server. Brian enjoys helping people get the most out of their software. He does this through training and speaking at events such as VSLive!, Tech•Ed, and Microsoft’s PDC. In addition, Brian shares through the written word. He is a co-author of Effective Visual Basic, has written articles for MSDN magazine, MSDN Online and other publications. Brian is a member of Pluralsight’s technical staff. In addition, Brian is currently an Microsoft ALM MVP. You can reach Brian via his blog at http://www.mcwtech.com//blogs/brianr/ or on twitter as @brianrandell.

Date:               Wednesday May 15th 2013

Location:         Microsoft-Chicago 200 E Randolph, 2nd Floor, Chicago

Agenda:          6:30PM Dinner followed by a presentation and demo at 7pm

Registration:      http://chicagoalmug.org/

As always, please be sure to register as Aon Center security will NOT allow individuals to access the building without being pre-registered.

Tags:

MSDN | Application Lifecycle Management | ALM | Visual Studio 2012 | Visual Studio | development | Team Foundation Server | TFS 2012 | TFS Administration | SDLC | SCOM | DevOps | System Center

1

Making TFS 2012 Work Item Types Read-Only Based on User Roles

by Angela 14. January 2013 09:35

Warning: this is most certainly NOT the most elegant solution to the problem. It’s a known shortcoming, or maybe it’s a feature, that you cannot limit access to an entire work item based on a user’s role in TFS.  I can limit transitions, and access to individual fields, but for very large and complex work item types, this is cumbersome and fragile. In a nutshell, I am trying to limit access to specific work item types, so that they are only editable by specific groups of people, and I had posted it to the forums to no avail.  So here is my ugly solution which for now, is sufficient. 

I started with Gregg’s post from 2009 that provided a workaround to my issue, but the error message thrown has changed in such a way as to make it even less intuitive as to what is going on. Below is the implementation of his suggestion and the resulting user experience:

image

image

The other issue with the above solution, is that it only prevents a user from CREATING that work item type, I need the user to also not be able to edit the item.

 

So I decided to try something a little different. I created a custom field, that is never displayed on any form, specifically for the use of locking down work items since we have several scenarios where we have to enforce read-only access to a work item type for certain users. I called it “UserAccessDenied”, since that is at least indicative of the issue when displayed to a user.

clip_image001

Like I said, the field is never displayed to a user, so it should never be populated.  We make that field required for any user that should NOT be editing the work item as below, which prevents them from saving it since it will always be empty:

clip_image002

 

Still not an awesome solution but at least now the provided error is a BIT more helpful, and the client was happy which is all that matters right? Smile 

image

image

 

You can provide a better experience to the user if you have the ability to create custom controls or write listeners that capture work item events to handle this. Where I am, they want something easy to maintain that does not require any kind of code to be written or maintained. So it is what it is.  If you, like me, would find the ability to set access permissions at the work item level, vote on my suggestion here.

 

And as always, if YOU have come up with a better way to do this, I’d love to hear about it!

Tags:

ALM | Application Lifecycle Management | MSDN | Power Tools | SDLC | TFS | TFS 2012 | TFS Administration | TFS Power Tools | Team Foundation Server | Visual Studio 2012 | Visual Studio | Work Item Tracking

0

Untangling TFS Connectivity to SSRS Snafus

by Angela 5. December 2012 08:55

So, as you may know, SSRS cannot host up reports for multiple instances of TFS, or for other applications period.  IOW, TFS SSRS instances MUST be dedicated. The reason is pretty obvious once you dig around in the properties of the reporting databases on your report server, but trust me on this unless you really WANT to know how it all works under the covers.

Long story short, we accidentally configured two different TFS application tiers (TFS1 running TFS2012 and TFS2 running TFS2010) to use the same instance of SSRS, doh!  We only need reporting on TFS1, for the record. After some troubleshooting we found that the connection strings for the TFS2010OlapReportDS and TFS2010ReportDS databases on the report server pointed to TFS2 and not the original one any more (TFS1). But oddly, the reports on the new TFS instance don't work either, I would have assumed that ONE of the instances would have had reporting that worked. I went to the Reports folder, and could see all of the reports for all of the team projects across the both TFS1 and TFS2 but always received this error, on every single report:

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

 

Anyway, I digress. 

I figured a good first step was turning off Reporting on TFS2, and then reconfiguring SSRS for TFS1 in an effort to "reset" the connection.  But I could turn off reporting on TFS2.  I assumed that normally I *should* be able to do this, just un-check the "Use Reporting" feature and it's gone right? Maybe there is something amiss with the TFS 2010 instance? It is brand new, so not sure how it could already be corrupted.  Here is the error I receive when I try to "turn off" reporting on TFS1:

 

I did a lot of searching of MSDN and forums and couldn’t find anything that seemed to help.  I got desperate and tried a different order of operations, a "Hail Mary" if you will, and it worked!

I could not turn off reporting on TFS2 for some reason, but it occurred to me that the error message I was getting ("the database is not properly configured") was rather generic and could mean a LOT of things. And alas I do not have remote login access to the SSRS instance (don't get me started on the why or what of that!), so I couldn't even do research on it.  So instead I focused on getting TFS2 WORKING with SSRS even through the end goal was turning off reporting.  I went to the TFS1 app tier that had been connected to SSRS successfully originally, went into the Admin Console and unchecked "Use Reporting" to break the connection. That worked great, of course.

Next I went back to TFS2, and via the Admin Console verified the SSRS configuration information to hit the report server was all correct (it was), re-started all the jobs, and rebuilt the warehouse. Once reporting was working again on TFS2, I tried to turn it off again, and this time when I unchecked "Use Reporting" it was successful.  So apparently if reporting is broken, you cannot turn it off. Great.

Anyway, next I went back to TFS1, reconfigured reporting through the admin console and now all is well with the world again. Oy, I need a drink.

Tags:

ALM | Application Lifecycle Management | MSDN | SDLC | TFS 2010 | TFS 2012 | TFS Administration | TFS Power Tools | Team Foundation Server | Visual Studio 2012 | Visual Studio

0

Hmm, So Apparently TFS 2012 Power Tools Require VS Pro or Better

by Angela 19. November 2012 15:37

So I had gotten used to installing a VS 2010 Shell on my TFS app tier for doing basic administration type activities that required a Team Explorer. One of my most common tasks was editing the TFS process template using the TFS Power Tools. So when I upgraded TFS to 2012, I immediately downloaded the TFS 2012 Team Explorer and Power Tools and installed them so I could get to work.

Today I discovered that is no longer a supported scenario once you have upgraded to TFS 2012, not that the error message is AT ALL helpful for figuring this out, shocking. I loaded up the VS Shell, opened Tools | Process Editor | Work Item Types | Open WIT from Server like I always do

image

and got a strange error I hadn’t seen before. I tried a few other options, projects, work item types, kept getting errors. I was able to export work items, just not open them. ::sad trombone::  So this is an error you might end up encountering after upgrading if you haven’t seen the update I am talking about.

image

Cannot load ‘C:Users37653\AppData\Roaming\Microsoft Corporation\Microsoft® Visual Studio® 2012\11.0.50727.1\usnbka366p_Str_Enterprise_User Story,wit’: Could not load file or assembly Microsoft.VisualStudio.XmlEditor,Version=1 1.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a or one of its dependencies. The system cannot find the file specified.

 

When I dug around, I discovered a few MSDN posts referring to a licensing change for VS 2012.  I suppose if I still worked at Microsoft I wouldn’t have missed that valuable little nugget. So no longer can you get away with a free VS Shell and the Power Tools for simple administrative tasks on your server, you must install at LEAST VS Professional.  Lame.

If you are lucky, like me, your boss bought you a copy of VS Ultimate and it’s not an issue since with MSDN benefits, you can install it on pretty much any server YOU are going to use. Just be sure if it is a shared server, that everyone is properly licensed for whatever you install there. And alas, this is at my client, so now I need to work with their server folks to get that installed and make sure they are licensed properly for it ::sad face::

Tags:

ALM | Application Lifecycle Management | MSDN | Power Tools | SDLC | TFS 2010 | TFS 2012 | TFS Administration | TFS Power Tools | Team Foundation Server

0

Multi-Tenant TFS Data Tiers? Yes You Can!

by Angela 6. November 2012 08:27

Multi-what TFS? In other words, hosting multiple instances of Team Foundation Server data tiers and all of their associated databases on the same data tier.

So we ran into quite the conundrum here, wherein we had just one physical server available to act as a TFS Data Tier, but needed to host at least 2 TFS 2010 instances on it to try some stuff out in relation to a coming upgrade. I needed to upgrade a number of our project collections to TFS 2012, while leaving some number still on TFS 2010 until we could do further validation on some customizations. It seemed risky, maybe even impossible, but mostly because I had never tried.  I certainly never saw that as an option in the installation docs or on MSDN.  It wasn’t until I sat down with a DBA who looked at it purely from a database perspective that I thought to just give it a try and see what happened. Obviously this is a development environment and NOT their production TFS Smile  You certainly COULD do this in production but it would make me nervous when it came to things like DR, so I’m not going to even entertain that notion.  But, in my situation, I already had a dual tier TFS 2010 environment setup in DEV, and I had a second AT server to use as a test bed for the upgrade to TFS 2012, but my main issue was how I could take collections from a single TFS instance, and upgrade only half of them to 2012 while the others were still available on 2010. I wondered, “can I upgrade the new app tier to 2012 while leaving the other app tier, hitting the same data tier, on TFS 2010?” The answer is, “sure you can!” 

we_can_do_it

Now if you look at TFS merely from the front end perspective this might seem odd, or risky, but like I said, I had a DBA who knew nothing about TFS but knew databases really well helping me to noodle through it.  I knew just enough about SQL Server to be dangerous, so together we made quite the team when it came to “let’s just try it and see what happens, it’s only DEV after all!”.  What I came to understand, and maybe I should have realized this sooner, is that when you upgrade TFS, or do any operations on it from the App Tier, it only affects the databases that are referenced by its configuration database.  So, 3 separate App Tiers have 3 separate Configuration databases, and 3 separate sets of databases (Collections, warehouse, etc.) that can coexist on a single data tier. So upgrading an AT from TFS 2010 to TFS 2012 only updates the schemas of the databases specified in the Configuration database associated to that AT.  Main requirement here is that it is a version of SQL that can support both products, so SQL 2008 R2 + current Service Packs.

So here is what I am running today:

image

Looking back, knowing what I now know, it makes sense too. Now, once again, I spent many many hours researching this on-line and could not find any documentation to confirm or deny that this was even possible. It took a few emails to some folks in North Carolina, you know – the dudes who WROTE the software – to confirm that yes indeed, you can host multiple instances of TFS on a single Data Tier. Turns out, they do it too! So I was pretty stoked to discover that I could in fact host 2 different TFS instances on a single Data Tier machine AND that it was a supported (although completely undocumented) scenario.

Rad huh? When you dig into the SQL Server instance it can become a confusing mess of config databases, and collection databases to manage, but it can also be a useful thing to know for upgrade and testing scenarios where you simply cannot get additional hardware for the DT.  Now yes, this absolutely can make things tricky for the DBA too if you are not using the TFS Backup and Restore Tools for backing up data. I certainly recommend using the built in TFS Backup tools if it is an option. But that is a discussion for another day… and another blog post.

I will happily accept dark chocolate in tribute Smile

Tags:

ALM | Agile | SDLC | Power Tools | TFS 2010 | TFS 2012 | TFS Administration | TFS Power Tools | Team Foundation Server

0

Why Isn’t TFSService In My Service Account Dropdown List?

by Angela 5. November 2012 09:45

Ever been migrating a TFS 2010 server and when you got to the place in the Application-Tier Only Wizard where you had to specify a Service account and POOF, your TFSService account did NOT appear as a possible option? Ruh-roh!  This is a known issue in TFS 2010, and you won’t encounter this in 2012 thankfully, but nonetheless. If it happens to you, hopefully this also works for your implementation!

Untitled

Now you certainly don’t want to be specifying a user account for this, but what on earth is a TFS admin to do? I got into this situation and fear not, there is NOTHING documented on-line to help you ::maniacal laughter:: Maniacal mostly because I beat my head on my desk for at least half a day trying to figure this out.  Nothing I could find on MSDN, the MSDN forums or any other searchable resource shed any light on the issue. I found the solution by calling in a favor with a couple of folks I know on the TFS product team.  I might seriously send them a cookie basket for being so awesome.  Seemed silly not to share my good fortune because this is a DOOZY if you ever run into it yourself.

Turns out, the values that go into this dropdown get collected by taking a poll of all of the TFS related SQL databases (configuration, warehouse, collections) referred to by the configuration file selected in the previous step. Obviously you need to select an account that can access all of the databases.  The account should a) not be dbo, b) not be db_owner, and c) needs to be a valid user with TFSADMINROLE and TFSEXECROLE. In my case, some folks had been having issues creating new Team Project Collections (because their TFS Admin accounts did not have proper permissions on the Data Tier) and so they logged into the AT as TFSService to create the collections ::head explodes::  Doing that makes TFSService dbo and dbo_owner and therefor pulls its name out of the proverbial hat to be used as the service account going forward.

So how do you fix it? a) make sure your TFS Admins have the appropriate rights on all of the servers they need to get their jobs done going forward and DO NOT take no for an answer.  Trust me, it’s brutal otherwise; b) Take TFSService OUT of the administrators group on the local server so no one can login as that user in the first place; c) go fix the TFSService account in the TFS related databases in SQL Server. This may seem scary, but I don’t know of another way.  Ask your DBA if you need to, it’s possibly their fault you got in this situation anyway Winking smile 

So what you need to do in SSMS to fix it?

  1. 1) Iterate through all of the TFS databases and change the Owner to something OTHER than TFSService; this will also reset the login associated to the dbo user. Keep in mind if this user is already in the Users group for that database, then they will need to be deleted from there first.
  2. Untitled

2) Add TFSService as a database user (Database | Security | Users –> New user…)

3) Assign them the following roles: TFSADMINROLE and TFSEXECROLE.

Untitled

 

And after you’ve given yourself carpal tunnel with the billion mouse clicks necessary to do this, you can restart the Application Tier Only wizard and you will find that now TFSService appears in your list. HUZZAH! ::throws confetti::

Untitled

Now ideally you will never get into this situation in the first place, but if you do, it’s not really documented other than this blog post – at least not that I know of. BIG THANKS to Brian MacFarlane and Ed Holloway on the TFS Product Team for helping me noodle through this issue.

Tags:

ALM | Application Lifecycle Management | MSDN | TFS | TFS 2010 | TFS 2012 | TFS Administration | Visual Studio

0

So I ran into this issue today while creating a TFS 2010 Backup Plan

by Angela 31. October 2012 13:30

So as you would expect, I as a consultant do not have god-like access to things in production like I do in the dev and test environments.  So occasionally I get tripped up on access rights, and when it comes to TFS, well, they could do a much better job of listing out all the places where you do and do not need Admin rights, sysadmin rights, farm admin rights… Well, it’s all out there between the Ranger Guidance, best practices documents, install docs and MSDN documentation but you have to do a LOT of cross referencing to get it all.  And sure, ideally anyone who is a TFS admin would be able to just ask nice and smile and get all those rights, but this is the real world and many large companies are PARANOID about handing out access like that to production.  I had to fight to get the minimal rights documented in the TFS guidance, let alone anything extra.

While upgrading TFS 2010 to 2012 at this current client, I am stopped dead in my tracks at least a few times a week, sometimes a few times a day, by “Access Denied”. My most recent one was extra tricky because it involved a Power Tool and as you know, those are often not documented very well. So, on to my story…  I was setting up a Backup Plan on TFS 2010 using the nifty Power Tools feature (see screen below) from the Admin console.  I login to the TFS application tier with my account, a TFS Admin user.  I know that my account has sysadmin rights on SQL because I am a TFS Admin, and when it comes time to providing the account to run the backup plan under I provided the TFSService account which I know has Administrator and sysadmin rights on the data tier server:

image

So between those two accounts I would think everything was OK. I don’t know for sure, but if the Backup Plan is running as the TFSService account the way it is setup here, well that account is king of the world so everything should “just work”. And yet:

clip_image002

So to hopefully make this something that comes up when someone else does a search on this message, here is what I saw - “Error    [ Backup Plan Verifications ] The current username failed to retrieve MSSQL Server service account. Please make sure you have permissions to retrieve this information.” 

WTH?! And when I opened up the error log the first error I encountered was:

TFS upgrade xp_regread() returned error 5, 'Access is denied.' xp_regread() returned error 5, 'Access is denied.' 

Again, WTH?!

So the DBA goes off and starts researching what xp_regread() does, and tried to figure out why this isn’t an issue in our dev and test environments given that everything was setup the same, and I start digging through forums.  Finally I find one sad and lonely little post on the MSDN forums related to the issue that recommends 1) logging in as a TFS Admin user (OK, I’m with you) and 2) “ensure that the user who perform this Backup Plan have required permission in SQL Server”.  Wait, what?  Be more specific please. What *ARE* the required permissions??  This happens all the time. Don’t tell me to “make sure you have appropriate permissions” without clarifying what those are. Otherwise, well, duh! I *think* I have the right permissions but clearly I am mistaken.

I dig through the Ranger Guidance which as far as I can tell is the only place this tool is documented.  It doesn’t say the person CREATING the backup plan has to be an admin on SQL, and it IMPLIES the account specified to run the job has to be an ADMINISTRATOR but only because the example specified a  Administrator account. Here, right from the guidance:

image

But even that doesn’t necessarily imply a SQL admin, and nowhere in the doc does it say what rights either account (logged in user or “Account”) should have. I just went back and read it AGAIN, does not say anything IRT rights of either of those users in the Guidance. I suppose if you knew what it was doing behind the scenes you could infer the rights needed from the MSDN docs (I found this later). I made an educated guess that because in dev and test I am a server Administrator on the DT, and the Backup worked just fine there, that me being a SQL Server Admin must be a requirement.  So I logged back into my production TFS AT with another account that I knew was admin on every server in the TFS implementation (I know, I know), and the backup plan was created just fine. .

Our DBA does NOT like making TFS admin accounts SQL Administrators, but if I can show him explicit rules that say YOU CANNOT DO YOUR JOB AS A TFS ADMIN WITHOUT IT, he will do it.  So please Microsoft, don’t make it so darn difficult to divine what rights all of the accounts need for the various tasks the user will do. Particularly the Power Tools which make people nervous anyway.

Tags:

ALM | Application Lifecycle Management | MSDN | Team Foundation Server | TFS | TFS 2010 | TFS 2012 | TFS Administration | TFS Power Tools | TFS Rangers

Powered by BlogEngine.NET 2.7.0.0
Original Design by Laptop Geek, Adapted by onesoft