Clean metadata after BAK restore problem!!

mario17mario17 Posts: 15

I have my db on source control, and I did restore db with REPLACE option from somebody's else BAK. And this broke all my Source Control ddl/data

When I get GET LATEST it says I'm all good, nothing new but I have a lot of balls that indicate that < I have changes to commit>. When I try to commit my changes Action is set = DELETE which I don't want to do. I just want to get latest source controlled DDL,etc.

What would be the solution to clean this data and Really get fresh load from source control?
Is it only because of REPLACE option, maybe I drop/restore db then will work differently??

Is there any FORCE get latest option ????

Tx for help


  • Bump,..
    Can anybody from RG stuff advice please, do I need go with unlink/link, will this clean metadata?

  • James BJames B Posts: 1,124 Silver 4
    I'd initially suggest unlinking, restarting SSMS, then relinking. This may clear up the problem.

    If not, and you are still seeing drops on the Commit tab, then you need to use the "Undo Changes" option (see here) to update to the repo contents.

    Restoring a linked database is generally a bad idea as it alters much of the database without SQL Source Control "knowing", and leads to the sort of problems you're seeing.

    It's preferable to sync either with a get-latest if everything is in the repo, or alternatively using SQL Compare/Data Compare which should help stop everything getting out of sync.
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.