Advanced synchronize
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
When you synchronize an advanced database subset, the records are compared, any records that have been updated either the main database or the database subset is updated in the other location.
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 either:
Discard the subset record changes, keeping 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, keeping the information in the record in the database subset and overwriting the changes in the main database.
If the main record is deleted, then it is:
Restored and updated to match the subset record if Soft Delete is in use.
Re-created if the record is deleted or purged.
Restoring or re-creating a link always results in the link ends being restored or re-created if necessary. Restoring or re-creating an entity also restores or re-creates any associated links if the other end of the link is still active.
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 an advanced 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.
At the end of synchronization, you are informed of the changes made to the main database:
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)
When synchronization is complete, an updated database subset, re-created using the latest version of the subset definition, is available for reuse in the field. Alternatively, the database subset is set to read-only if the database subset was set to expire.
Procedure
To synchronize an advanced database subset:
Log on using a user account that has the Database Administrator role and permission to add records, update records, delete records, and update or delete records created by other users.
Open the database from which the database subset was created.
Select File > Data > Database Subsets > Advanced Synchronize (SQL Server).
Browse for the database subset containing the records that you want to load.
Enter the iBase username and password used to access the database subset.
Note: This user account should also have the Database Administrator role and permission to add records, update records, delete records, and update or delete records created by other users.
Optional: Use the Options to determine whether field attachments and records that have been deleted are included in the synchronization.
Click Next.
Decide how you want to handle any conflicts between changes made in the main database and those made in the database subset. By default, synchronization will never overwrite changes in the main database.
Note: At this stage it is not possible to know whether there are actually any conflicts.
Click Next.
View the list of changes and use Ignore Selected to stop selected records from being updated.
Optional: Decide whether to update field attachments where they differ using Include field attachments when repopulating.
Optional: To discard the subset after uploading the records to the main database, turn on The database subset should expire after synchronization.
Click Syncronize.