Red Gate forums :: View topic - Renamed Project Causes Local Files Corrupted Error
Return to www.red-gate.com RSS Feed Available

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

Renamed Project Causes Local Files Corrupted Error

Search in SQL Source Control 3 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Akaoni



Joined: 04 Oct 2012
Posts: 2

PostPosted: Thu Oct 04, 2012 1:41 am    Post subject: Renamed Project Causes Local Files Corrupted Error Reply with quote

We have just renamed an SQL Connect Project which works fine in Visual Studio.

When we go to link/relink the project in SQL Source Control (TFS) however, we get the following error message:

Quote:
---------------------------
Local files corrupt
---------------------------
The local files relating to the database "<<database>>" have been corrupted. Do you want to re-link it to source control?
---------------------------
Yes No
---------------------------


Clicking Yes causes the above error to appear infinitely, clicking No will prompt the following reportable error:

Quote:
Access to the path 'C:\Users\<<user>>\AppData\Local\Red Gate\SQL Source Control 3\WorkingBases\zimmxz2a.qz2\<<old project>>.rgproj' is denied.


Looking in the above working base directory shows that the files there are outdated and don't match the renamed project files in TFS. If we manually get the latest version from TFS on that directory than the error stops occuring, but all our static data tables are unlinked.

How can we fix this so that SQL Source Control relinks to the renamed project correctly and keeps our static data?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6589

PostPosted: Mon Oct 08, 2012 3:32 pm    Post subject: Reply with quote

This does not sound like expected behavior, so I really can't say what happend or the best way to go about fixing it. In fact, there is no clear guidance for using SQL Connect and SQL Source Control together. I tried it on a test computer and hasn't caused any problems at all on a fairly minimal project.

Off the top of my head I'd say TFS marked your .rgproj file read-only and all you need to do is un-tick the read-only box on the file properties.

And you may have got an older version of RedGateDatabaseInfo.xml from the repository. This file lists the tables whose data is under source control. I think the best thing to do would be to use SQL Source Control to source control the data again and then check in redgatedatabaseinfo.xml.
Back to top
View user's profile Send private message
Akaoni



Joined: 04 Oct 2012
Posts: 2

PostPosted: Tue Oct 09, 2012 1:44 am    Post subject: Re: Reply with quote

Brian Donahue wrote:
Off the top of my head I'd say TFS marked your .rgproj file read-only and all you need to do is un-tick the read-only box on the file properties.


This was the issue.

If we link the database to source control and then uncheck read-only for both <<old project>>.rgproj and <<old project>>.rgproj.vspscc, it allows the working base to be updated properly.

Is this something you would be able to cater for in a future release of SQL Source Control (eg. When user clicks yes to "Do you want to re-link it to source control?", ensure read-only settings won't cause issues)?

Thanks for your help, Brian!!
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