Manual Optimization

If your organization uses Microsoft SQL Server as the database engine and you store the file data in a file system folder (instead of the vault database), manually run the Optimize Database (Thorough) operation from one to four times a year. This is the only way to remove any destroyed files from the file data server in this type of setup. Run the operation also after an exceptionally large number of files have been destroyed at once, for example after files are archived to another vault.

Note: Make sure that the optimization is not done between file data and metadata backups.
Note: It is possible that Firebird and Microsoft SQL Server vaults are taken offline for the duration of the operation. Before you run the operation for Firebird vaults, make sure that the server has at least three times the amount of hard disk space required by the metadata file of the vault. For instructions on how to check the size of the vault metadata file, see Checking the Size of a Firebird Metadata File.
  1. Open M-Files Admin.
  2. In the left-side tree view, expand a connection to M-Files server.
  3. Expand Document Vaults.
  4. Right-click a vault.
  5. Click Maintenance > Optimize Database (Thorough).
  6. Enable Delete the files of destroyed objects.
    This option is available only when the files are in the file system and the vault uses Microsoft SQL Server.
    Note: If this option is enabled and the vault uses dtSearch, the vault will be taken offline.
  7. Click Yes at the prompt.
The database of the selected vault is optimized.
Note: Depending on the size of the vault, the operation can take an extensive amount of time to complete.