Log In    |    Knowledge Base    |    4D Home
Tech Tip: 'Mandatory Log File' Check Box
Published On: July 22, 2003

Version 6.7.x and 6.8.x

The check box can be found on the second tab of the Database properties. Checking this check box for a given structure file will force 4D to look for a log file every time this structure file is used to open a data file. If the log file does not exist, 4D will ask you to create the log file. The problem is that you cannot create a log file with a data file that was modified since the last full backup. You will need to perform a full backup of the data file before you can create a new log file. Since you cannot back up the data file because you need a log file, you may wonder what to do next! This happened because you selected the 'Mandatory Log File' check box without performing a full backup and creating a log file before quitting the database.

To work around this, you will need to follow the steps below:

  1. Launch 4D and open your database while holding the Alt key (Alt key on Windows, Option key on the Mac) .
  2. 4D will ask you to select a data file: Create a new data file. The name does not matter, you will delete this file later.
  3. 4D will ask you to create a log file: You will be able to create the file since it is a new data file.
  4. Go back in the Database properties and deselect the 'Mandatory Log File' check box.
  5. Quit 4D and delete the newly created data and log files.
  6. Launch 4D and select your database.
  7. 4D Asks you to select a data file, select your current data file.
  8. Perform a full backup of your database (Structure file and data file).
  9. Create a log file.

If you need to, you may select the 'Mandatory Log File' checkbox again.

Note: You can also use the stand-alone version of 4D backup to perform Step 6 and later create the log file using 4D (Step 8). This is true as long as there is no method that may modify your data file when starting up your database.