How to Delete Unused Files from CA APM

The files that you use while working with the product are stored on the CA APM application server where the Storage Manager Service is installed. These files include attachment files and Data Importer source data files and legacy map files.
casm173
The files that you use while working with the product are stored on the CA APM application server where the Storage Manager Service is installed. These files include attachment files and Data Importer source data files and legacy map files.
When you delete an attachment, you delete only the reference to the attachment in the object record. If the deleted attachment is a file, the file remains in the file system on the CA APM application server. In similar fashion, when you delete an import that uses a specific data file, you do not delete the data file from the CA APM server.
If a specific attachment file, import data file, or legacy map file is no longer needed, you can delete the file from the CA APM server. Before you delete the file, verify that the file does not have any associations.
To delete unused files, perform these steps:
Review the Prerequisites
To ensure that you can successfully delete the unused files, identify the names of the unused files that you want to delete.
Query the CA MDB
If a specific attachment file, import data file, or legacy map file is no longer needed, you can delete the file from the CA APM application server. Before you delete the file, verify that the file does not have any associations in CA APM (for example, a file attached to a legal document or an import data file associated with a data import).
Follow these steps:
  1. Access the CA MDB that is associated with your CA APM installation.
  2. Query the al_file_storage table to search for the file name and the associated tenant if applicable. The following statement is an example query:
    select COUNT(0) from al_file_storage where attachment_url = 'filename.txt'
    If no records are returned, no records are associated with the specified file name. You can delete the file.
Locate and Delete the Unused Files
After you verify that the files do not have any associations in CA APM, you can locate and delete the files.
Follow these steps:
  1. On the CA APM application server where the Storage Manager Service is installed, navigate to one of the following locations, depending on whether you are using multi-tenancy:
    [ITAM Root Path]/Storage/Common Store/Attachments [ITAM Root Path]/Storage/Tenant_Name/Attachments [ITAM Root Path]/Storage/Common Store/Import [ITAM Root Path]/Storage/Tenant_Name/Import
  2. Locate and delete the unused files.