tags:

views:

493

answers:

2

I am unexpectedly taking over for the previous administrator of our TFS system who left the company rather abruptly. I was made an admin of TFS and on the TFS application server before this happened, but there is still at least one thing I can't figure out. It seems there are some alerts set up under the previous administrator's account that sends email to all of us whenever a file is checked in. I can't say for sure exactly what this subscription looks like, but I'm guessing it's either in the "Project Alerts" dialog for the project, or it's an alert set up with TFS Power Tools' Alert Editor. I can't see alerts set up by other users in these areas. Is there any way short of directly editing the tbl_subscription table directly to try removing or changing these alerts? (I think I see the alert in that SQL table, but I don't want to directly hack the database.)

A: 

I would be very cautious about editing the table directly; see the cautions and suggestions in this thread. (I have not tried the applications they recommend, so take appropriate precautions/backups.)

TrueWill
+3  A: 

Welcome to the world of TFS - sorry that your baptism is going to be one of fire.

You are correct to be wary of editing the database directly - always best avoided with TFS. The TFS Event Subscription tool (originally crafted by this sites creator) should be able to do the job, but I think that it may be a bit out of date and could do with some love. Last time I tried it wasn't working for me - but I think it might have been updated since then.

If that tool doesn't work for you then this is one instance where you can actually get away with using the web services directly (which is what that tool does under the hood).

CAVEAT - This is tested with the "Works on My Machine" guarantee. But if you remove the wrong subscription then you risk messing up your TFS instanllation. Therefore take backups and tread carefully...

To begin:

Log in to the TFS machine as the TFS Admin user (TFSSETUP) over remote desktop, and then browse to the following address in Internet Explorer:

http://localhost:8080/Services/V1.0/EventService.asmx

These are the Event Service web service methods. The first one you want to look at is the EventSubscriptions method:-

http://localhost:8080/Services/V1.0/EventService.asmx?op=EventSubscriptions

In the userid field, enter an asterisk (*) and then press invoke.

This will then return a big list of all the event subscriptions in TFS - including the ones that allow parts of TFS to talk to other parts. If you scroll down, you will find your email subscriptions. Make a note of the ID's of the ones that you want to delete.

Then go to the unsubscribe method:

http://localhost:8080/Services/V1.0/EventService.asmx?op=UnsubscribeEvent

Enter the ID of the notification that you wish to remove and press invoke. Repeat for all the events that you wish to remove.

Once you have removed the ones you don't want you can create different ones using the power tools etc.

Hope that helps - good luck.

Martin.

Note that do don't get any friendly undo prompts or anything as this is fairly low-level hackery. Therefore you want to have backups etc before you do this.

Martin Woodward
I don't know that I will be able to determine the tfssetup password. I am an admin on the machine. Is there a safe way to set the password if I can't determine it?
BlueMonkMN
EventSubscriptionTool seems to be good enough at least for removing subscriptions.
BlueMonkMN