Migration script not detected

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

Migration script not detected

Postby AdamY » Wed Feb 06, 2013 6:37 pm

I set up my first migration script in SQL Source Control, but need some help determining why SQL Compare won't detect the script. Thank you in advance for any advice you can provide.

SQL Compare version: 10.3.1.140
SQL Source Control version: 3.1.3.26
SQL Server 2008 R2
TFS 2010
Example I'm following: Worked Example

+ I have checked in the migration script to source control (TFS).
+ The only difference between what I did and the example is that I created the migration script against "Specific Changes", not "Uncommitted Changes", which means I could not select a specific table like they did in the example. Is that the problem?
+ The script is set to transition the DB from revision 10392 to 10459.
+ I have verified that the Target DB in SQL Compare is on revision 10392 using the "SQLSourceControl Database Revision" extended property on the target DB.
+ In the example above, SQL Compare shows a "Revision: 64" under the "Database" drop-down when setting up the source and target. Mine does not show any "Revision" label at all. What does that mean?
AdamY
 
Posts: 41
Joined: Fri Oct 15, 2010 8:24 pm

Update

Postby AdamY » Thu Feb 07, 2013 1:08 am

I started over so I could tie the migration script to "Specific Changes" (the tables, functions, data, and sprocs). But now SQL Source Control won't let me check in the items - I get this error: TF10141: No files checked in: resolve the conflicts and try again.
So until I can figure out that problem, I can't continue with my work-around attempt.
AdamY
 
Posts: 41
Joined: Fri Oct 15, 2010 8:24 pm

Work-around, possible bug.

Postby AdamY » Thu Feb 07, 2013 6:57 pm

Well, it took me quite a bit of work to get everything back to a clean state (fix the TF10141 error) but I did. I was then able to link my migration script to "Uncommitted Changes" so I could tie it to 3 specific objects. After I did that, then SQL Compare detected the migration script as desired. So the root issue appears to be:
In order for SQL Compare to detect the migration script, it seems that the script must be linked to specific object(s) via "Uncomitted Changes", not a pre-committed change (i.e. "Specific Changes").

I don't remember seeing that in any of the examples or tutorials and it makes me wonder what the purpose is for creating a migration script against "Specific Changes" if the compare process won't see it. Maybe this is a bug? Or more likely I just don't fully understand the process yet.
AdamY
 
Posts: 41
Joined: Fri Oct 15, 2010 8:24 pm

Postby Brian Donahue » Mon Feb 11, 2013 4:47 pm

Correct me if I'm wrong, but it seems that what happened is this:
  • You linked a database to source control
  • You tried to compare the database (with some other database) using SQL Compare and you did not get the migration scripts in as part of the migration
  • After resolving the conflict and committing changes, you got the desired behavior

This sounds like what it should do, based on that description. SQL Source Control is going to need to get the revision numbers back from the source control system (TFS) in order to set up the migration scripts properly, and it can't do that until some changes were committed first.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Clarification

Postby AdamY » Mon Feb 11, 2013 5:11 pm

Brian,
That is incorrect. The problem was not related to a conflict or uncomitted changes. There were no conflicts and everything was checked in.

The problem was that when I created the migration script, I had to link it to "Uncommitted Changes" and tie it to specific objects and then commit them all at once. It would not work if I linked the migration script to "Specific Changes" (changes I had already checked in). So it seems SQL Compare will not recognize migration scripts that were linked to "Specific Changes" when they were created/committed.
AdamY
 
Posts: 41
Joined: Fri Oct 15, 2010 8:24 pm


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests