Clean metadata after BAK restore problem!!

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

Clean metadata after BAK restore problem!!

Postby mario17 » Thu Apr 03, 2014 12:34 am

Hi,

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
Mario
mario17
 
Posts: 9
Joined: Wed Jan 15, 2014 6:08 pm
Location: United States

Postby mario17 » Thu Apr 03, 2014 5:06 pm

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


Tx
Mario
mario17
 
Posts: 9
Joined: Wed Jan 15, 2014 6:08 pm
Location: United States

Postby james.billings » Mon Apr 07, 2014 12:22 pm

Hi,
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.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Source Control 3

Who is online

Users browsing this forum: No registered users and 0 guests