Renamed Project Causes Local Files Corrupted Error

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, andy.campbell.smith

Renamed Project Causes Local Files Corrupted Error

Postby Akaoni » Thu Oct 04, 2012 1:41 am

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:

---------------------------
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:

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?
Akaoni
 
Posts: 2
Joined: Thu Oct 04, 2012 12:16 am

Postby Brian Donahue » Mon Oct 08, 2012 3:32 pm

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Re:

Postby Akaoni » Tue Oct 09, 2012 1:44 am

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!!
Akaoni
 
Posts: 2
Joined: Thu Oct 04, 2012 12:16 am


Return to SQL Source Control 3

Who is online

Users browsing this forum: No registered users and 1 guest