Issues I've Noticed
bpage
Posts: 10
SQL Data Compare is a great product that makes my job much easier. But I have noticed a couple issues:
- Inserting and updating tables that are referenced by Indexed Views is very slow in SQL Server. Operations that would take a minute can take an hour. SQL Data Compare should drop these indexes before updates and recreated them afterward.
- SQL Data Compare can reseed on an identity column too low. Say for example you have Server1 with a seed of 100 and Server2 with a seed of 200. Maybe this is a development server and there has been a lot of testing. When you synchronize from Server1 to Server2, Server 2's seed will a be set to 100 and the rows from 101 to 200 will be removed. However, if someone were to perform an Inserting during the synchronization there could be a row with a value of 201 in the identity column. This could by adding an option to let SQL Server recalculate the seed column.
DBCC CHECKIDENT('schema.table', RESEED)
Comments
SQL Data Compare has the option to 'Drop primary keys, indexes, and unique constraints'. This option will drop and then recreate the PK's, indexes and unique constraints in the generated SQL script. The option can be found in Options > Synchronization Behaviour. Hopefully it will do what you need.
SQL data compare will set the seed value when it interrogates the schema before the data comparison. If data in the table is modified between running the compare and applying the sync script, then the seed value could be invalid. You can refresh the seed value by selecting Refresh on the Tables & Views tab in project configuration.
Alternatively, you could turn off the option to 'reseed identity columns' and let SQL Server worry about setting the seed value. However, this will mean that the seed values will probably not be in sync with the source.
I hope this helps.
What are you using as the comparison key for the view?
You can select Save as My Defaults which will ensure that future projects use this options set.
Kind regards,
David Atkinson
Red Gate Software
Product Manager
Redgate Software