How To Reload the Contents of a Synchronized Table
Introduction
There are two ways to synchronize data between the main and the store servers:
- With the standard, trigger-based mechanism.
- With table reloads.
The most usual approach will be to use the trigger based mechanism. Each time a record is added/modified/deleted from a synchronized table, the change will be captured with a trigger and the change will be promptly synchronized to the store servers that are registered with the main server.
This approach does not cover all the use cases, for instance:
- When a store server is added to the system, its synchronized tables might not be completely up to date.
- When there has been a problem in the store server and it has missed some incoming changes from the main server
- When for whatever reason there have been local changes in the store server local database, and it needs to be resynchronized
These three cases can be addressed by doing a table reload in the store server. Although it is possible to reload a whole table, sometimes it makes more sense to only reload a subset (for instance, only the records that have been modified in the last week). This case is also covered, because it is possible to provide a SQL where cause to restrict the records that will be resynchronized.
The following sections explains under what circumstances can a synchronize table be reloaded.
Reloading a Remote Table Manually from the Central Server
It is possible to reload from the central server a table that is stored in a store server using the Reload Remote Table process.
The process has three parameters:
- Table: The table that will be reloaded (mandatory)
- Remote Server: The server where the table will be updated (mandatory)
- SQL Where Clause: A where clause that will be used to obtain the subset of rows that will be synchronized towards the remote table (optional)
The reload tables process is asynchronous. When this parameter window is executed, It will schedule a reload table event in the synchronization engine. It might take some tame to have the data actually updated in the remote server.
Reloading a Remote Table Automatically When the Store Server is Started
It is possible to configure synchronized table so its contents are reloaded each time the store server is restarted.
Only the records that have been inserted/updated after the Last Initial Load time will be reloaded.
Depending on the amount of records that need to be reloaded, the reload process can take some time. During the reload process only the System Administrator role will be available, and the background processes will be disabled.