How can we help you today? How can we help you today?
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
0 votes
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...
0 votes
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...
0 votes