|
|
|
|
|
- Priority for defining the location of log files
- The log file exists when HChangeLogDir is used
- Miscellaneous
- Replication and log process
HChangeLogDir (Function) In french: HChangeRepJnl
Available only with these kinds of connection
Modifies the location of log files corresponding to an HFSQL data file (*JNL files as well as JournalOperation and JournalIdentification files if they exist). Reminder: The JournalOperation and JournalIdentification files are created: - if the management of replication is requested for the data file.
- if the management of the selected log corresponds to "Write-to-file log and history of accesses".
The *JNL file is not created if only the log of access history is requested. By default, the physical files corresponding to the logs are created: - in the directory specified in the analysis ("Analysis description", "Logging" tab).
- in the specified directory when describing the data file ("Data file description" option in the context menu, "Logging" tab). This option is available only if the analysis directory corresponds to "<Default file directory;>".
HChangeLogDir(Customer, "\\MyServer\Log\JNL", "\\MyServer\Log\Operation")
...
HAdd(Customer)
...
Syntax
<Result> = HChangeLogDir(<Data file> , <JNL file location> [, <LogOperation file location> [, <Backup location>]])
<Result>: Boolean - True if the operation was performed,
- False if a problem occurs. HErrorInfo is used to identify the error.
<Data file>: Character string Name of the data file whose log must be moved. This is the logical name of the file (defined in the data model editor). If this parameter is equal to "*", all the data files found in the current analysis will have their log file moved. <JNL file location>: Character string New access path to JNL file associated with the file with logs (full or relative path). If this parameter corresponds to an empty string (""), the current file location is not modified. <LogOperation file location>: Optional character string New access path to JournalOperation file and JournalIdentification file associated with the file with logs (full or relative path). The JournalOperation file contains all the operations performed on the file with logs. If this parameter is not specified or if it corresponds to an empty string (""), the current file location is not modified. <Backup location>: Optional character string Path of backups of log files. By default, this path corresponds to: <directory of JNL files>\__JNLBackupThis path is used during the automatic data file modification to archive the logs. HHistoryModification will also search for change history in these files. If this parameter corresponds to an empty string (""), the current location is not modified. If this parameter corresponds to a relative path (and starts with a dot), the path will be relative to data files. Remarks Priority for defining the location of log files The location of log files is defined according to the following priority order: - Location specified when creating the logged file (HCreation).
- Location specified by HChangeLogDir.
- Location specified in the analysis.
- Location of logged file.
The log file exists when HChangeLogDir is used If the log file already exists during the call to HChangeLogDir, this log file is not used anymore: a log file is created at the specified location and it is associated with the HFSQL file. Using HDeclareExternal with a file with logs: if an application uses HDeclareExternal on a file with a log, the changes made by this application are saved in the log files specified in the header of the HFSQL file. Miscellaneous - If the files are opened while the directory is modified, the files are automatically closed.
- If the path of the log is redefined several times by HChangeLogDir, only the last path is used. The modification is effective for all the applications that use the file with logs.
Replication and log process Reminder: The replication is based on the logs and on the operation tables of the data files. The replication fails if the location of the logs and operation tables is invalid.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|