SQL Source Control Workspaces out of sync

philcartphilcart Posts: 45
This is the Manage Workspaces dialog in Visual Studio 2008

This shows that the user has 13 workspaces and they are all related to SQL Source Control.

This is the workspaces listed by the SQL Source Control Cleaner tool.

In this tool there are only nine workspaces. Where are the other 4 workspaces? What are they and how do we know if they can be removed?

This has caused a few problems over the last few days as the same user will be editing a non-database item in Visual Studio. Then close and reopen Visual Studio and be told that they can't continue to work on that item as its checked out to another user or workspace. then they realise they're working in yet another SQL Source Control workspace.


  • The cleaner tool only checks SQL Source Control workspaces - it compares the working base folder to the config file that details what DB's are linked to where, and offers to remove ones that relate to a database that is no longer linked.
    It has no knowledge of other TFS workspaces used outside of SQL Source Control.
    Systems Software Engineer

    Redgate Software

  • But all 13 workspaces listed in the initial screenshot are shown as SQL Source Control workspaces.
  • The tool won't check the TFS status of the workspaces. It's simply comparing the LinkedDatabases.xml to the folders within WorkingBases.
    If there are extra ones listed in the TFS Workspaces view then you'd need to manually compare the folder name to see if they are still in use or not as far as SQL Source Control is concerned before removing them manually - I'm not sure why they would be still listed in there, but it would appear they would relate to folders that perhaps don't exist any longer? (I'm not sure if removing a folder also removes the workspace mapping, or whether that's a separate process)
    Systems Software Engineer

    Redgate Software

  • Where can I find this cleaner tool ?

    I have exactly the same problem with workspaces created by SQL Source Control and are not cleaned.
  • You can get it here: ftp://support.red-gate.com/utilities/SQ ... leaner.zip

    Note that this tool isn't supported at all - we wouldn't normally recommend you mess with the working bases folder but if you do have a lot of old folders in there, this can help get rid of them for you.
    Systems Software Engineer

    Redgate Software

  • why does ssc create so many workspaces in the first place? i noticed that ssc has created a large number of workspaces behind the scenes. at one point my default workspace for my source code accidentally got mapped to one of these workspaces and i inadvertently mapped it to my local folder. then i made some changes to code files in my solution and it turned out i had some code files checked out to my actual workspace and some code files checked out to this workspace. it took me quite a while to figure out was going on and later i had to reconcile quite a number of changes manually, which was quite a pain. is there a way i can prevent this from happening in future?
Sign In or Register to comment.