New log file

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004.3


New log file Text

ParameterTypeDescription
This command does not require any parameters
Function resultTextFull pathname of closed log file

Preliminary note: This command only works with 4D Server. It can only be executed via the Execute on server command or in a stored procedure.

Description

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"). This file is stored in the same location as the current log file (specified on the Configuration page in the Backup theme of the Preferences). The command does not carry out any processing (compression, segmentation) on the saved file. No dialog box appears.

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].4DL. For instance:

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-0000].4DL.

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-0005].4DL.

Before performing this operation, 4D Server checks that no other critical operation (transaction or indexing) is underway. If a critical operation is underway, 4D Server respects the waiting times set on the Backup page in the Backup theme of the Preferences.

See Also

INTEGRATE LOG FILE.

Error Handling

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


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next