AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Administrar bases de datos / HFSQL / Gestión de la replicación / Replicación basada en registros
  • Overview
  • Managing log-based replication for a data file
  • Consequences of implementing log-based replication
  • Required or recommended conditions
  • Directory for creating the files required by the log-based replication
  • Generating the analysis
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Implement journaled replication: Modify analysis
HFSQL ClassicDisponible solo con este tipo de conexión
Overview
Log-based replication can be implemented in the data model editor:
  • directly when creating a data file, or. The data file creation wizard asks whether log replication should be managed for this data file.
  • or on an existing data file (whether or not the application has been released).
Managing log-based replication for a data file
To implement log replication on a data file:
  1. Open your analysis in the data model editor.
  2. For all replicated data files, check the "Replicación basada en registros (para compatibilidad con versiones anteriores)" option ("Miscellaneous" tab in the data file description). If your data files do not comply with the conditions for using replication (see next paragraph), various messages are displayed.
    Caution: when setting up journaled replication, logging is automatically set up.. Logging is a simple way of keeping track of all operations carried out on data files so that they can be transferred to the various databases. For more details on logs, see The log process.
  3. Generate your analysis.
Consequences of implementing log-based replication

Required or recommended conditions

When implementing log-based replication on a data file, WINDEV and WEBDEV:
  • Suggest using an 8-byte automation identifier in data files for log replication.:
    To simplify log-based replication, we recommend that you use an automatic identifier in your data files. This automatic identifier is entirely managed by WINDEV and WEBDEV. To avoid the duplicate errors during the replication, ranges of identifier numbers are allocated to each site involved in the replication.
    The use of an automatic identifier is highly recommended but not mandatory. Indeed, you always have the ability to manage a custom identifier containing, for instance, an automatic identifier and the initials of the site or person creating the record.
  • Implement the log process for the selected data file:
    Logging is a simple way of keeping track of all operations carried out on data files so that they can be transferred to the various databases. The "Log of write operations + history of accesses" log process is automatically implemented when "Log-based replication" is checked.

Directory for creating the files required by the log-based replication

Log-based replication is closely linked to the log process. The log process is automatically enabled when log-based replication is implemented in an application.
For all the files used (data files, log files or replication files), the paths of the corresponding physical files can be defined in the data model editor or programmatically.
By default, the tree structure of the data files is as follows (example for the SalesMgt application):
The following table presents the default value for these different directories and their configuration mode in the data model editor or programmatically.
Default valueWhere to configure it in the data model editor?How to change the default value through programming?
Data file directoryExecutable directory.
  • For all data files in the application: "Detail" tab in the analysis description
  • For each data file: "Info" tab in the data file description.
To modify the default directory for the data files of the application, use HSubstDir.
When creating the files for the log process and for the replication, the created directories will be relative to this new directory.
Note: To modify only the directory of one of the data files, use the HChangeDir function.
Replication file directoryRPL subdirectory of the default directory of the data files."Log\Replica" tab of the analysis description.Specify the desired directory in HCreateMasterReplica and HCreateSubscriberReplica.
Log file directoryJNL subdirectory of the default directory of data files.
  • For all application data files: "Log\Replica" tab in the analysis description.
  • For each data file: "Miscellaneous" tab in the data file description.
To modify the directory of log files, use HChangeLogDir. This function is used to:
  • change the directory of the Log file (JNL file)
  • change the directory of the JNL file and logging files (JournalIdentification and JournalOperation files).

Please note To manage log replication in an application, the log operations table (JournalOperation.fic file) must be identical for all replicated data files in the same analysis.
Generating the analysis
To take into account the implementation of log-based replication in the analysis, you must generate the analysis.
If the application already handles data files, this analysis generation triggers an automatic modification of the data files in order to:
  • take log-based replication into account,
  • take the log process into account (if necessary)
  • implement the automatic identifiers.
This modification of data files will also have to be performed when installing the application (if the application was already deployed).
Please note If logs already exist, they are automatically purged when the automation is modified. Before starting the automatic modification, the existing logs can be saved by WDLog.
Ver también
Versión mínima requerida
  • Versión 12
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local