How to clean ApexSQL Log temporary files

Applies to
ApexSQL Log

Summary

This article explains the content of ApexSQL Log temporary files and correct approach to clear them in order to free disk space.

Description
The ApexSQL Log creates two types of temporary files that are used during the auditing process:

  1. ApexSQL Log log-files
  2. Metadata files

ApexSQL Log log-files

These files are used to track ApexSQL Log operations. It collects information about warnings and errors encountered during the application usage. This information is used by ApexSQL support when tracing an issue encountered by the user.

Metadata files
These files contain basic information about audited databases (tables, rows and fields ID to Name mappings, LSN sequences, page order data etc.). Metadata files are used to increase speed of ApexSQL Log auditing and to decrease the number of IO operations on transaction log files and SQL queries. Files are in active use only while the ApexSQL Log auditing session is active. The files are not deleted on session closure because they can be utilized (automatically) by the application during the future audits of the database in question. It is important to close the active session before deleting the metadata files.

Metadata files are stored at the following location:
%AppData%\Local\ApexSQL\ApexSQLLog2014\LogData\<Machine Name>\<SQL server instance>

Both file groups can be deleted manually from the following locations:

  • Log files are stored at the location:
    %AppData%\Local\ApexSQL\ApexSQLLog2014\LOG\

  • Metadata files are stored at the following location:
    %AppData%\Local\ApexSQL\ApexSQLLog2014\LogData\’system’\’SQL server name’\

ApexSQL Log offers cleaning of these files directly from the application. Here are quick steps to perform the cleaning:

  1. Start ApexSQL Log and click on the Options button in the main ribbon

    Clicking the Options button in the main ribbon of ApexSQL Log

  2. In the options dialog, click on the Application log tab

    Clicking the Application log in the options dialog

  3. To clean the application log files, check the appropriate checkbox and enter the value to clear files older than x day(s) and click on the Clean button

    Cleaning the application log files

  4. To clean the application metadata files, check the appropriate checkbox and click on the Clean button

    Cleaning the application metadata files

  5. In addition to manual maintenance, ApexSQL Log offers the possibility to automate file clearing, at application startup. To set this up, select the checkbox next to the files you want to be automatically cleared (as if doing it manually), check Clean automatically at application startup checkbox and click on the OK button to save it. This way, you won’t have to perform regular checks.

    Automating file clearing in ApexSQL Log