Remove orphan identities in TFS 2010

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 06:34:10

问题


I am in the process of moving a TFS 2010 installation from one machine to another.

I found that is possible remap identities using TFSConfig Identities /change command but I didn't find a way to remove orphan user identities that I don't need anymore.

I know that probably I can leave them there, but I am fussy and I like keeping things in order. Do you have any idea how to safely remove unused identities?


回答1:


Don't clean them up. They are inactive so think of them as tombstones. If you get rid of them, you may experience dangling users (in Access Control Entries or File History for example).




回答2:


Unfortunately, as is typical with many Microsoft products, the application is lacking many useful features (like a function to delete identities). You can do what I did and manually remove entries from the TFS_Configuration database in the table tbl_security_identity_cache and it will clean them up.

You will have to temporarily disable the foreign key constraints on the table or else you can't delete from it.

I used a statement like:

DELETE FROM tbl_security_identity_cache
WHERE 'display_name' IN
(
    'useless crummy identity 1',
    'useless messy identity 2'
)

and so on

When I searched for how to do this nobody had posted it so here you go.




回答3:


After doing an upgrade to TFS2012 from TFS2010 that was converted from TFS2008 we have a lot of unneeded identities. The problem is when I do a

tf workspaces /owner:* /collection:%TFB_COLL_12%

I don't get anything but

TF14045: The identity <GUID> is not a recognized identity.

Doing a specific current user, it lists the workspaces.

So while I understand the need to keep old users since they may have changes, the tf workspaces command shouldn't give such an ugly message.



来源:https://stackoverflow.com/questions/6042666/remove-orphan-identities-in-tfs-2010

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!