ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / Managing replications / Log-based replication
  • Overview
  • Implementing log-based replication with WDReplic
  • Steps
  • Important: installation conditions
  • Implementing log-based replication programmatically
  • Important: installation conditions
  • Precaution
  • Moving the data files manually
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Log-based replication
HFSQL ClassicAvailable only with this kind of connection
Overview
The replication is the operation allowing you to keep updated remote databases of identical structures on which several operations are performed. The operations performed on each one of the databases are applied to all the other databases.
For more details, see The replication.
WINDEV and WEBDEV propose two methods for implementing the logged replication:
  • Using WDReplic. In this case, no specific programming is required. All you have to do is configure the different replication options. This tool (and the necessary configuration files) will have to be installed along with the databases to replicate.
  • Using the WLanguage functions. In this case, the management of the replication will be performed in the application via specific options. These options will use the WLanguage functions for implementing the replication.
Note: Log replication is not available in HFSQL Client/Server.. We recommend that you use the universal replication.
Implementing log-based replication with WDReplic

Steps

To implement log-based replication with WDREPLIC, you must:
  1. Modify the analysis (for more details, see Modifying the analysis to support log-based replication).
  2. Create the executable (for a WINDEV application), then the setup procedure.
    Note: When creating the installation procedure, remember to add WDReplic to the installation program.
  3. Install the application (and WDREPLIC) on the master and subscriber sites. The application setup also includes:
    • WDReplic if the replication is performed with this tool
    • an automatic update of the data files. This update is used to log (if necessary) and to replicate the data files. If the data files were already logged, the existing logs are purged.
      Reminder: to implement replication, data files must have an identical structure (analysis) on all workstations (master and subscriber workstations).
  4. Configure WDReplic on the master computer.
  5. Install the files required by WDReplic on the subscriber computers.
For more details, see WDReplic help.

Important: installation conditions

Implementing log-based replication in an application is a major operation.
We recommend that you respect some basic rules.
For each replicated data file, you are advised to use a single unique key in your data files. This unique key must be an "Automatic 8-byte identifier".
Implementing log-based replication programmatically
To implement log-based replication through programming, you must:
  1. Modify the analysis (for more details, see Log replication: Analysis modification).
  2. Modify the application to manage the replication with the WLanguage functions. For more details, see Daily replication: Programming in WLanguage
  3. Create the executable (for a WINDEV application) and the setup program.
  4. Install the application on the master and subscriber sites. The application setup must include an automatic update of the data files. This update is used to log (if necessary) and to configure the data files for the replication. If data files were already logged, existing logs are purged.
Reminder: to implement log replication, data files must have an identical structure (analysis) on all workstations (master and subscriber workstations).

Important: installation conditions

Implementing log-based replication in an application is a major operation.
We recommend that you respect some basic rules.
For each replicated data file, you are advised to use a single unique key in your data files. This unique key must be an "Automatic 8-byte identifier".
Precaution

Moving the data files manually

Please note: To move data files manually, the following rules must be observed:
  1. Update all the replicas on the relevant computers.
  2. Copy the data files to the relevant computers.
  3. Save then delete the following files:
    • all the log files (".JNL" files).
    • all the files of identification tables ("JournalIdentification.*" files).
    • all the files of operation tables ("JournalOperation.*" files).
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help