code: @Nonnull
    public ESuccess compactDatabase (final boolean bDeleteTemporarySQLFile)
    {
      return getLock ().locked ( () -> {
        // Close DB
        close ();
  
        // Set temporary file name
        final String sScriptFileName = "h2dump$$.sql";
        final File aScriptFileName = new File (sScriptFileName);
        try
        {
          if (dumpDatabase (aScriptFileName).isSuccess ())
          {
            // Delete all DB files
            DeleteDbFiles.execute (m_sDirectory, m_sDBName, true);
  
            // And re-execute the stuff from the file
            RunScript.execute (getConnectionUrl (), m_sUser, m_sPassword, sScriptFileName, null, false);
  
            // And delete temporary file
            if (bDeleteTemporarySQLFile && FileOperations.deleteFile (aScriptFileName).isFailure ())
              LOGGER.error ("Failed to delete temporary export file '" + sScriptFileName + "'");
            return ESuccess.SUCCESS;
          }
        }
        catch (final SQLException ex)
        {
          // Oops, we lost our data -> save file to avoid overwriting with another
          // compact call
          String sUniqueFileName = "h2dump-" + Clock.systemUTC ().millis () + ".sql";
          if (FileOperations.renameFile (aScriptFileName, new File (sUniqueFileName)).isFailure ())
            sUniqueFileName = sScriptFileName;
          LOGGER.error ("Failed to delete and refill database. Data is contained in file '" +
                           sUniqueFileName +
                           "'!",
                           ex);
        }
        return ESuccess.FAILURE;
      });
    }
docs: Compact the database by exporting everything, resetting the DB and
  importing it again. Before compacting process is started, <b>the data
  source is closed</b>!!!
  
  @param bDeleteTemporarySQLFile
  if <code>true</code> the temporary file (h2temp.sql) is deleted
  after successful compacting.
  @return {@link ESuccess#SUCCESS} if everything went well,
  <code>false</code> if an error occurred. In case of an error, see
  the log file.