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
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Implementing log-based replication: Modifying the analysis
HFSQL ClassicDisponible solo con este tipo de conexión
Overview
Log-based replication can be implemented in the data model editor:
  • when creating a file. This file creation wizard asks if this file must manage log-based replication.
  • on an existing file (no matter whether the application was distributed or not).
Managing log-based replication for a data file
To implement log-based replication on a file:
  1. Open your analysis in the data model editor.
  2. For all the files in replication, select "Replicación basada en registros (para compatibilidad con versiones anteriores)" ("Miscellaneous" tab of the file description). Messages are displayed if your files do not comply with the conditions for using the replication (see the next paragraph).
    Caution: the log process is automatically implemented when the log-based replication is implemented. Indeed, the log process allows you to easily find out all the operations performed on the files in order to apply them to the different 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:
  • Propose to use an automatic 8-byte identifier in the files in log-based 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:
    Indeed, the log process allows you to easily find out all the operations performed on the files in order to apply them to the different 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 by programming.
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 by programming.
Default valueWhere to configure it in the data model editor?How to change the default value through programming?
Data file directoryExecutable directory.
  • For all the data files of the application: "Details" tab of the analysis description
  • For each file: "Info" tab of the 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.
Remark: To modify the directory for one of the data files only, use HChangeDir.
Replication file directoryRPL sub-directory 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 the data files of the application: "Log\Replica" tab of the analysis description.
  • For each file: "Various" tab of the file description.
To modify the directory of log files, use HChangeLogDir. This function is used to:
  • change the directory of Log file (JNL file)
  • change the directory of the JNL file and Logging files (JournalIdentification and JournalOperation files).

Caution: To manage journaled replication in an application, the table of journal operations (JournalOperation.fic file) must be identical for all replicated 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 the data files will also have to be performed when installing the application (if the application was already deployed).
Caution: If logs already existed, these logs are automatically cleared during the automatic modification. Before starting the automatic modification, the existing logs can be saved by WDLog.
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: 11/04/2024

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