Red Gate tools are the best for the database management routines (update schema, update data etc).
However they are not flawless (version 6) as I thought before. For some reason after a number of syncs identity seed got messed up in a couple of tables. Fortunately this has been one of the development databases. To fix the issue I had to resort to writing queries by hand:
declare @P1 int
set @P1 = (select max (Oid) from FormValue_Date)
DBCC CHECKIDENT(FormValue_Date, RESEED, @p1)
So, if you using DevExpress XPO and suddenly start getting “Violation of PRIMARY KEY constraint ‘PK_Name’. Cannot insert duplicate key in object ‘Name’”, do not rush to the Support Center. Check identity information first with:
DBCC CHECKIDENT(TableName)
Latest Comments