Activity overview
Latest activity by cklaw
Hi Peter
It would be easier for me to respond via the support mechanism, if that's alright. Will you send me an e-mail?
Thanks
Charles / comments
Hi Peter
It would be easier for me to respond via the support mechanism, if that's alright. Will you send me an e-mail?
Thanks
Charles
I have just tried the private build, and it is undoubtedly an improvement as it also no longer removes and re-adds FK constraints on tables that are not being synchronised. However, it still only goes half-way, as you indicated. When I select to update but not add or delete, it will still reseed and get the identity wrong. Is there any chance of a private build that includes this extra bit of logic? / comments
I have just tried the private build, and it is undoubtedly an improvement as it also no longer removes and re-adds FK constraints on tables that are not being synchronised. However, it still only g...
Hi Brian
Thanks very much for the quick response. I will give it a try. Can you indicate when the next version might be available? I'm just a bit nervous now because I realise the havoc that has been caused in a couple of our databases, and whilst I will check the script now every time I'd hate for anything to slip through again.
Charles / comments
Hi Brian
Thanks very much for the quick response. I will give it a try. Can you indicate when the next version might be available? I'm just a bit nervous now because I realise the havoc that has be...
Hi D
That was going to be my next task. Thanks, you've save me a job. Can you think of a neat way to determine which tables need reseeding; I want to get a list of affected tables before I reseed them?
Charles / comments
Hi D
That was going to be my next task. Thanks, you've save me a job. Can you think of a neat way to determine which tables need reseeding; I want to get a list of affected tables before I reseed t...
In fact, it's even worse than I thought. Now that I know where the problem lies, I ran a compare on multiple tables. Four tables had different rows. I selected just one table to synchronise and looked at the script. There was a RESEED for a table that I hadn't selected to sync.
I then selected the last two tables with differences instead, and checked the script. There was no reseed on these two tables, but the reseeds on the original two were still there, even though I had not selected them this time.
I'm amazed that no one else has had a problem with this yet. Or perhaps they have and they just don't realise where it is happening. / comments
In fact, it's even worse than I thought. Now that I know where the problem lies, I ran a compare on multiple tables. Four tables had different rows. I selected just one table to synchronise and loo...
Incredible that we should both discover this problem and post the same day.
Over the last couple of months, I have been plagued by users contacting me with exceptions being thrown because of PK constraint violations. When I look at the identity and seed on the table(s) in question they are different. I reseed them and later the problem pops up on another table.
These are tables that I keep in sync with SQL Data Compare 8, and I have eventually created a simple test to demonstrate the fault.
Create an identical table in two databases. It only needs an identity column and one extra column, a varchar(50), say. Make the identity column the PK. Add some rows to one table (call it the left-hand table) and different, greater number of rows to the other (right-hand table).
Now, compare the tables with SQL Data Compare. Select to sync from left to right, but only to update the rows that are different, not to delete any rows on the right. Select Synchronise and then look at the script that's generated. It includes a RESEED, even though no rows are being deleted.
Allow the synchronise to go ahead and then check the identity on the right-hand table. You will find that the current identity value is lower than the current column value, so the next insert from code will fail.
I'm off to put this all in an e-mail to RedGate now. / comments
Incredible that we should both discover this problem and post the same day.
Over the last couple of months, I have been plagued by users contacting me with exceptions being thrown because of PK con...