Options

BUG: Synchronization script generates insert for all rows...

paulo_morgadopaulo_morgado Posts: 97 Silver 2
... when the schema in the source database is different from the schema on the destination database.

If my source table is dbo.MyTable and the destination table is MySchema.MyTable, the comparison works fine, but the sychronization script has inserts for all rows and not only the new ones.
Paulo Morgado
Portugal
Web Site
Weblog
Twitter

Comments

  • Options
    Thanks for your post.

    I've tried to reproduce this, but I don't seem to experience the same symptoms.

    Are you generating the script through the UI or the command line interface? Are you unchecking the 'different' and 'target only' rows from the comparison results before you run through the sync wizard?

    Have you set a WHERE clause filter in the comparison?

    Finally, which exact version of SQL Data Compare (Help > about) are you having this problem with?
    Chris
  • Options
    paulo_morgadopaulo_morgado Posts: 97 Silver 2
    Hi!

    I'm generating the script in the UI of SQL Data Compare.

    I'm comparing a database that has tables in the MySchema schema with a database that has table in the dbo schema.

    I've definded mappings such that MySchema.MyTable is compared with dbo.MyTable.

    I don't have a where clause.

    In the comparsion results window I can see the correct count of left only, different and right only. But, when I generate the synchronization script from left to right, the generated script has inserts on the right table for all rows in the left table.

    It definetly happened before 8.0.2.5 (my bad for not reporting before), but I'm not able to reproduce it today.
    Paulo Morgado
    Portugal
    Web Site
    Weblog
    Twitter
  • Options
    Here's how I ran into this bug:

    Need to merge data in a CSV file into an existing table in SQL Server. I import the CSV into a new table.

    Now I use SQL Data Compare to compare the new and old tables. Note that the CSV was not exported well, so there are lots of rows with null vaues for what I am using as the comparison key.

    When I view the data in SQL Data Compare, it shows 23 rows which I DONT want to merge, so I deselect each of them.

    However, when building and/or running the script those rows are included.

    Hope this helps.
  • Options
    Thanks for your post.

    I think I might have managed to reproduce this now. It seems to happen pretty consistently when you try to include/exclude specific rows from the sync.

    It's now logged under the bug tracking code SDC-1118. Hopefully we will write a fix for it soon.

    I'll let you know as soon as I have some more information.
    Chris
  • Options
    I might have missed the "try to include/exclude specific rows from the sync" because that's the way I use it most of the time.
    Paulo Morgado
    Portugal
    Web Site
    Weblog
    Twitter
  • Options
    I think we may have a patch avaliable that fixes the above issue. At least the patch fixes the problem I was able to reproduce on my server.

    If you would like to try it, you can download it from here

    Let me know how you get on.
    Chris
  • Options
    Seems like that's it.

    A friend of mine, has SQL Data Compare version 6 and the same happens. Although his version has an option in the differences pane to show the SQL Script only for the selected row. Is that option available in SQL Data Compare 8?
    Paulo Morgado
    Portugal
    Web Site
    Weblog
    Twitter
  • Options
    That feature's still there. It's on the right-click context menu.

    'Show object Synchronization script'
    Chris
Sign In or Register to comment.