Prev | Next |
Reset Table Auto Increment or Identity Columns
This topic explains possible impacts of XML Export/Import on table auto increment columns, and how to re-sequence the columns whose value approaches the maximum value allowed.
Impacts
Impact Due To |
Impact |
See also |
---|---|---|
XML Export/Import |
XML Export/Import can cause gaps in the numbering sequence of auto increment columns. Each XML Import deletes rows from several tables; the import then adds rows starting from the largest previous value of the auto increment column. Repeated XML imports can result in the value of the auto increment approaching the maximum value of the database datatype; for example, SQL Server's int datatype has a maximum value of 2,147,483,647. |
|
Replication |
Large auto increment values can also arise where the project originated as an EAP replica or design master. The Jet engine assigns random values for auto increment columns with each XML Import into the project. These random values can approach the maximum range of the repository data type, which could present a problem when the EAP project is transferred to a repository. |
Replication |
Access
Ribbon |
Configure > Model > Integrity > Reset IDs |
Re-sequence auto increment columns
Step |
Action |
---|---|
1 |
Open the project. |
2 |
Select the 'Reset IDs' menu option. A dialog displays listing all non-empty tables that contain an auto increment or identity column.
Tables requiring a reset are automatically selected in the list. |
3 |
Click on the to reset the auto increment column values. |
Notes
- Connection to the project must be via a direct connection; IDs cannot be reset while the connection to the repository is via Pro Cloud Server
- Project Auditing must be disabled before IDs can be reset
- MySQL repositories will require re-starting of the MySQL server so that the reset auto increment columns start from the reset value
- While strict not necessary, Sparx System would recommend that this task is performed when all users are not actively using the Project
- Sparx System recommend that a backup of the Project should be done both before and after performing a Reset of Table Auto Increment columns
- In the Corporate, Unified and Ultimate editions of Enterprise Architect, if security is enabled you must have 'Check Data Integrity' permission to reset IDs