SQL Source Control Workspaces out of sync

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace

SQL Source Control Workspaces out of sync

Postby philcart » Fri Sep 16, 2011 10:49 am

This is the Manage Workspaces dialog in Visual Studio 2008
Image

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.
Image

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.
philcart
 
Posts: 32
Joined: Mon Aug 14, 2006 6:14 am

Postby james.billings » Fri Sep 16, 2011 11:04 am

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.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby philcart » Fri Sep 16, 2011 12:36 pm

But all 13 workspaces listed in the initial screenshot are shown as SQL Source Control workspaces.
philcart
 
Posts: 32
Joined: Mon Aug 14, 2006 6:14 am

Postby james.billings » Fri Sep 16, 2011 12:49 pm

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)
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby PatriceVB » Thu Sep 22, 2011 5:05 pm

Where can I find this cleaner tool ?

I have exactly the same problem with workspaces created by SQL Source Control and are not cleaned.
PatriceVB
 
Posts: 1
Joined: Thu Sep 22, 2011 5:01 pm

Postby james.billings » Thu Sep 22, 2011 5:07 pm

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.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

i am also having a problem with this

Postby mryhmln » Tue Nov 08, 2011 5:18 pm

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?
mryhmln
 
Posts: 12
Joined: Mon Aug 29, 2011 4:05 pm


Return to SQL Source Control 2

Who is online

Users browsing this forum: No registered users and 1 guest