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?