SQL Packager
Latest version: 6.4
Knowledge Base
Reseed applying "incorrect" identity values
Category: Troubleshooting & error messages
Date: 22 Mar 2009
Product: SQL Packager
After synchronizing data using SQL Data Compare or Packager, the next time data is inserted into one of the synchronized tables, an error may result claiming that the automatically-generated value violates a primary key or unique constraint.
SQL Data Compare will "reseed" identity values automatically after synchronization if the "Reseed Identity columns" option in the "options" panel of the project is selected. It does this by gathering the current identity value from the "source" table and applying it to the "target" table. In this way, any identity columns with a primary key constraint will continue generating valid identity values.
There are a few circumstances, however, where the current identity value in the target database will become or remain invalid:
· A data update was taking place before the synchronization or at the same time as the data comparison
· The direction of synchronization was changed--in that case the databases need to be recompared because the identity value is gathered at registration-time
· There are no differences in the table, at that point SDC does not reseed and the identity values remain different
· All records were deleted from the source table using a DELETE query. In this case the identity is not rolled backwards and SQL Data Compare will synchronize the current identity, which may be higher than expected. Using TRUNCATE TABLE will roll the identity back to the base seed value.
Document ID: KB200903000371 Keywords: SQL, Data, Compare,reseed,identity,violation
Was this article helpful?
SQL Packager
- Logging and log files
- Package executable cannot load zlib1.dll
- Creating executables that use the .NET 2.0 runtime (version 5)
- Creating a database for an earlier version of SQL Server
- SQL comparison and synchronization automation capabilities
- Reseed applying "incorrect" identity values
- "Value cannot be null" error creating data script
- DEFAULT_SCHEMA clause cannot be used with a Windows group
- Package created from script always creates database
- SQL Packager not keeping the READ_COMMITTED_SNAPSHOT SQL option ON
- Setting the Database Options for a New Database
- Package execution failing because the login already has an account under a different user name
- Invalid SQL when synchronizing an index to a scripts folder when data compression is specified
- Logging and log files
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
SQL Packager
- Activating your products
- Activating your products
- Getting help offline
- SQL Packager release notes - version 6.xx
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Using SQL Packager