RedGateDatabaseInfo.xml Keeps Re-Adding Unlinked Data Files

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

RedGateDatabaseInfo.xml Keeps Re-Adding Unlinked Data Files

Postby JackAce » Tue Mar 20, 2012 1:17 am

(this is regarding SQL Source Control 2.x)

We were versioning the contents of a static lookup table, and then we removed the link, but a reference still shows up in the RedGateDatabaseInfo.xml file. This makes Red Gate Compare try to delete all the records in the table which causes a foreign key constraint error when synchronizing.

If I manually edit the RedGateDatabaseInfo.xml file and check it in, we can use Red Gate Compare to deploy the scripts, but the next time I make a change and check it in via SSMS/Red Gate Source Control, it increments the DataFileSet/Count value and re-adds the DataFile containing the *_Data.sql file.

All developers are working in "dedicated" mode with their own copies of the database in question (as far as I know).

How do we prevent Red Gate Source Control from readding this data file?
JackAce
 
Posts: 45
Joined: Fri Jul 08, 2011 11:00 pm

Postby csmith » Tue Mar 20, 2012 5:36 pm

Hi

I think the issue you describe is the same as this one. The conclusion was that we did not think the failure to update RedGateDatabaseInfo.xml would cause a problem. However, you have found this is not ther case.

What version of SQL Data Compare you are using? As we believe the latest version should not exhibit that behaviour (although the RedGateDatabaseInfo.xml will still not be updated by SQL Source Control).

Best regards,
Chris
Chris Smith
Project Manager
Deployment Manager
csmith
 
Posts: 118
Joined: Thu Jun 30, 2011 2:15 pm
Location: Cambridge

SQL Compare Version

Postby JackAce » Tue Mar 20, 2012 6:09 pm

We are using SQLCompare.exe version 9.0.0.79. I verified this locally and on our build machine.
JackAce
 
Posts: 45
Joined: Fri Jul 08, 2011 11:00 pm

Postby csmith » Thu Mar 22, 2012 7:12 pm

Hi

Thanks for that. I've got a few more questions to clarify what's happening:

1. Can I confirm that you are using SQL Compare to deploy your schema changes rather than SQL Data Compare to deloy static data changes?
They are two distinct products and SQL Compare will not try to compare data changes.
2. When you unlinked the static data tables, did you commit that change to SQL Source Control? As the unlink operation should appear in the commit tab.
3. Are you making a change to the schema for the static lookup table that has showed up when doing your initial comparison? If so, is it possible this change could cause data loss?

Thanks,
Chris
Chris Smith
Project Manager
Deployment Manager
csmith
 
Posts: 118
Joined: Thu Jun 30, 2011 2:15 pm
Location: Cambridge

Postby JackAce » Fri Mar 23, 2012 5:30 pm

You're right, we are using SQL Data Compare to deploy. We are using SQL Data Compare version 9.0.0.117.

We definitely unlinked the tables via Red Gate SQL Source Control. There is no longer a MyTable_Data.sql file in the Data folder, but the information still exists (and keeps getting repopulated) in the RedGateDatabaseInfo.xml file.

The schema of this table hasn't been touched for a while.
JackAce
 
Posts: 45
Joined: Fri Jul 08, 2011 11:00 pm

Postby csmith » Fri Mar 23, 2012 6:04 pm

Hi

Looking at the records for a similar problem, I think this may have been solved in a later version of Data Compare.

Can you upgrade to the latest version of Data Compare v9? I believe its full version number 9.1.0.365 and you should be able to get it from here:
ftp://support.red-gate.com/patches/SQL_ ... .0.464.zip

Best regards,
Chris
Chris Smith
Project Manager
Deployment Manager
csmith
 
Posts: 118
Joined: Thu Jun 30, 2011 2:15 pm
Location: Cambridge


Return to SQL Source Control 3

Who is online

Users browsing this forum: David Priddle, Yahoo [Bot] and 0 guests