How to fix the problem that the team Foundation server workgroup edition accidentally deletes all users in the team Foundation licensed users group?

Source: Internet
Author: User
Tags sql management studio

As mentioned in the previous blog, Team Foundation server workgroup edition is a 5-user restricted edition. All users must join the team Foundation licensed Users Group to connect to TFs, accidentally deleted all users in the team Foundation licensed users group. Maybe no one can connect to TFs. Is this the case that only re-installation is required? (I have worked hard to install TFs for a long time)
Of course not.
However, the following SQL script can re-add some users to the team Foundation licensed users group.

Declare   @ Container   Varchar ( 100 ), @ Member   Varchar ( 100 )

Select   @ Container = [ Sid ]
From   [ Tfsintegration ] . [ DBO ] . [ Tbl_security_identity_cache ]
Where   [ Display_name ] = N ' Team Foundation licensed users 'And deleted = 0

Select   @ Member = [ Sid ]
From   [ Tfsintegration ] . [ DBO ] . [ Tbl_security_identity_cache ]
Where   [ Display_name ] = N ' Domain Admins 'And deleted = 0

Insert   [ Tfsintegration ] . [ DBO ] . [ Tbl_security_membership_cache ]
( [ Container ] , [ Member ] )
Values ( @ Container , @ Member )

Use SQL management studio to connect to your database server and execute scripts. After testing, this script is valid in the English version of TFS. After the script is executed, users in the domain administrator group can connect to TFs. log in and adjust your permission settings.
If you can access TFs in other groups, you only need to modify'Domain Admins',Change to another group name (for example, 'domain users') and run it again..

() Supplement: If you are prompted that you cannot insert null values into the table, the group cannot be found. You can add the group to the contributors group of a project in authorization management, then execute the statement. It should be successful.

Warning:
1. This script is not guaranteed to be valid in TFs of other languages. Because it is not tested.
2. This script is only for my personal testing and research, without any permission and official verification, and is not guaranteed or committed to any legal issues or data losses that may arise.

However, I do not recommend this because it may cause legal problems,
But you can try to test a bug for Microsoft?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.