Red Gate forums :: View topic - SQL Source Control Workspaces out of sync
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 2
SQL Source Control 2 forum

SQL Source Control Workspaces out of sync

Search in SQL Source Control 2 forum
Post new topic   Reply to topic
Jump to:  
Author Message
philcart



Joined: 14 Aug 2006
Posts: 32

PostPosted: Fri Sep 16, 2011 10:49 am    Post subject: SQL Source Control Workspaces out of sync Reply with quote

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.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Fri Sep 16, 2011 11:04 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
philcart



Joined: 14 Aug 2006
Posts: 32

PostPosted: Fri Sep 16, 2011 12:36 pm    Post subject: Reply with quote

But all 13 workspaces listed in the initial screenshot are shown as SQL Source Control workspaces.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Fri Sep 16, 2011 12:49 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
PatriceVB



Joined: 22 Sep 2011
Posts: 1

PostPosted: Thu Sep 22, 2011 5:05 pm    Post subject: Reply with quote

Where can I find this cleaner tool ?

I have exactly the same problem with workspaces created by SQL Source Control and are not cleaned.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Thu Sep 22, 2011 5:07 pm    Post subject: Reply with quote

You can get it here: ftp://support.red-gate.com/utilities/SQL%20Source%20Control%20Cleaner.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.
Back to top
View user's profile Send private message
mryhmln



Joined: 29 Aug 2011
Posts: 12

PostPosted: Tue Nov 08, 2011 5:18 pm    Post subject: i am also having a problem with this Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group