Saltar al contenido principal
Versión: Siguiente

New log file

New log file : Text

ParámetrosTipoDescripción
ResultadoTextFull pathname of closed log file

Descripción

Preliminary note: This command only works with 4D Server. Sólo puede ejecutarse mediante el comando Execute on server o en un procedimiento almacenado.

The New log file command closes the current log file, renames it and creates a new one with the same name in the same location as the previous one. This command is meant to be used for setting up a backup system using a logical mirror (see the section Setting up a logical mirror in the 4D Server Reference Manual).

The command returns the full pathname (access path + name) of the log file being closed (called the “segment”). Este archivo se almacena en la misma ubicación que el archivo de registro actual (especificado en la página de configuración en el tema de copia de seguridad de la configuración). The command does not carry out any processing (compression, segmentation) on the saved file. No aparece ninguna caja de diálogo.

The file is renamed with the current backup numbers of the database and of the log file, as shown in the following example: DatabaseName[BackupNum-LogBackupNum].journal. Por ejemplo:

  • If the MyDatabase.4DD database has been saved 4 times, the last backup file will be named MyDatabase[0004].4BK. The name of the first “segment” of the log file will therefore be MyDatabase[0004-0001].journal.
  • If the MyDatabase.4DD database has been saved 3 times and the log file has been saved 5 times since, the name of the 6th backup of the log file will be MyDatabase[0003-0006].journal.
atención

A log file must always be related to a data file. Si llama a este comando justo después de una activación del archivo de registro (sin copia de seguridad) usando SELECT LOG FILE o la caja de diálogo de parámetros, asegúrese de tener una copia coincidente de su archivo de datos, de lo contrario el archivo de registro no podría ser integrado.

Gestión de errores

In the event of an error, the command generates a code that can be intercepted using the ON ERR CALL command.

Ver también

SELECT LOG FILE