RedGateDatabaseInfo.xml Keeps Re-Adding Unlinked Data Files

JackAceJackAce Posts: 75
edited February 3, 2015 10:40PM in SQL Source Control Previous Versions
(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?

Comments

  • csmithcsmith Posts: 140 Bronze 1
    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
    Divisional Development Lead
    Redgate Software
  • We are using SQLCompare.exe version 9.0.0.79. I verified this locally and on our build machine.
  • csmithcsmith Posts: 140 Bronze 1
    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
    Divisional Development Lead
    Redgate Software
  • 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.
  • csmithcsmith Posts: 140 Bronze 1
    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
    Divisional Development Lead
    Redgate Software
  • I am having the same issue. I am using sql data compare 11 and sql source 3. I added the link a while ago, but recently discovered that the data needs to be added outside of source control. When I unlink the tables, it continues to want to update my local machine with the previously linked data.
Sign In or Register to comment.