Synchronizing databases
Synchronizing databases, uploads the data from the database subset to the main database and downloads new and updated records in the subset definition to the database subset. You can update the database subset using the original subset definition or you can select a different subset definition.
About this task
A conflict occurs when an entity or link is changed in both the main database and the database
subset. To resolve the conflict, you need to decide which record you want to keep. You can select:
- Discard the subset record changes - this means you keep the changes to the record in the main database and lose the information in the record from the database subset.
- Keep the subset record changes - this means you keep the information in the record in the database subset and overwrite the changes that are made to the record in the main database.
- Restored and updated to match the subset record if Soft Delete is in use.
- Re-created if the record is deleted or purged.
During synchronization, the following error messages might be displayed:
- The database subset has expired. - You cannot reuse an expired database subset. Re-create it from its database subset definition.
- The database subset has an incompatible schema. - The database subset is invalid because the schema of the main database was changed after the database subset was created. To fix this problem, use the Database Schema Update option in iBase Designer.
- The database subset is read-only. - Use iBase Designer to change the database properties of the database subset so that it is no longer read-only. Although you can change the Read-only property in an expired database, you cannot reuse it.
- This is not a valid database subset. - The selected database subset is either not a database subset or it might be a subset of a different database. You can set the database subset to expire if you do not need it any longer. This deletes the contents of the database subset and mark it as read-only. The database subset can never be reused.
When you synchronize a database subset with the main database:
- Newly created entities and links in the database subset are added to the main database, with the same record identifier, create date or time, and create user.
- All (soft) deleted records in the database subset are ignored - they have no effect on the main database.
- Records in the main database are updated to match the changes in the database subset if there are no conflicts.
- If a record has changed in both the main database and database subset, since the last synchronization, then conflict resolution is applied. See below for details.
- The number of new records added to the main database.
- The number of records updated in the main database with changes made in the database subset
- If Soft Delete is used: the number of records restored as a result of conflict resolution
- If Soft Delete is not used: the number of records that are re-created as a result of conflict resolution
- The total number of conflicts resolved (at record level)
Procedure
To upload the records in a database subset: