RedGateDatabaseInfo.xml Keeps Re-Adding Unlinked Data Files
JackAce
Posts: 75 New member
(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?
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?
Comments
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
Redgate Software
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
Redgate Software
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.
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
Redgate Software