What are the challenges you face when working across database platforms? Take the survey
Options

Seeds are different if table is empty

redeyeredeye Posts: 13
edited December 10, 2007 3:19AM in SQL Data Compare Previous Versions
I have a table which I use to generate unique customer reference numbers. The customer reference number is based on the seeded value generated when a row is inserted. (FYI, I apply a check digit and other "stuff").

For a variety of reasons, this table is periodically emptied.

When comparing the tables, if they are both empty, Data Compare 6 says they are identical ... which I suppose they are. Except, the seed for the table might be different. If this is the case, no update takes place when I synchronise. The resullt is that I can then generate different results from two databases which Compare 6 says are identical.

Is it possible to force a re-synch of the seeded values, even if the tables are empty ?

Thanks

Paul

Comments

  • Options
    Yup I can see why you're seeing that behaviour as the code for re-synch of the seed only occurs when there are differences in the table I believe.

    There is no concept in SQL Data Compare of synchronizing tables with no difference in the data so no script would be generated. If there was such a concept there would need to be a way in the UI to turn off the non-data synchronization that would be generated.

    I'll put this into our bug tracking system but I can't see any easy or quick solution at the moment.

    I suppose one nasty-ish workaround is to make sure there is data on one side that isn't in the other. e.g. Insert a row into your target database. This will prompt a synch that will remove the row and also perform the reseed for you as there was a data difference. Not that nice I know but it may work for you.

    Well spotted though :)
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
  • Options
    Hi Richard,

    Thanks for your reply. Yes ... that is exactly waht I have done to get the seeds synched up with each other.

    I understand exactly what you are saying, but surely an option to "make sure seeds are synched" would be helpful. Often, I create new tables, load them up with test data, and then deploy an empty table to a live server. This may be a bit obscure, but I can't be the only one who deas that!

    Anyway... to have at least one row in the table does the job.

    Thanks again

    Paul
  • Options
    I've entered enhancement requests into our system for both SQL Compare and SQL Data Compare so we'll certainly consider this feature for future releases.

    At least you've got a work around for the moment.

    Richard
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
Sign In or Register to comment.