SAP | Cleaning Up the Transport Directory: Best Practices

SAP

transport

Introduction of SAP Transport

Over time, the global transport directory in SAP systems can accumulate a large number of files. These files reside in subdirectories such as ‘cofiles’, ‘data’, and ‘log’. While these files contain important information, they can also consume valuable disk space and become obsolete. In this article, we’ll explore how to efficiently clean up the transport directory to maintain system performance and manage storage effectively.

Prerequisites

Before proceeding with any cleanup, consider the following points:

1. Policy and Compliance: Clarify whether you are allowed to delete old transports. Some organizations may have retention policies that require keeping transports for a specific duration (e.g., 10 years for audits).

2. Transport Profile: Familiarize yourself with the transport profile. The transport profile is defined in the file ‘TPPARAM’ located in the ‘bin’ subdirectory of the transport directory. It contains parameters that control the minimum lifetime of files in different subdirectories.

SAP STMS – Buffer Cleanup automatically while adding transport

Cleanup Steps

Follow these steps to clean up the transport directory:

1. Log On to the Operating System:
– Access the operating system where your SAP system is installed.
– Log in using the `sidadm` user (replace `sid` with your system ID).

2. Navigate to the Transport Directory:
– Change the directory to `/usr/sap/trans/bin`.

3. Check Deletable Files:
– Run the command: ‘tp check all pf=TP_DOMAIN_.PFL’.
– This command generates a list of deletable files based on requests that are not marked for import into an SAP system. The list is stored in the ‘check.log’ file in the ‘tmp’ subdirectory.

4. Test the Cleanup Command (Optional):
– To simulate the cleanup process, use: `tp testold all`.
– This command behaves like ‘tp clearold all’ but writes the results to the ‘testold.log’ file in the ‘tmp’ subdirectory.

5. Perform Cleanup:
– Execute the actual cleanup: ‘tp clearold all’.
– This command deletes files from the `cofiles`, ‘log’, and ‘olddata’ subdirectories. It also moves files older than 6 months from ‘data’ to ‘olddata’.
– The results are logged in ‘clearold.log’.

Transport Profile Parameters

The following parameters in the transport profile control file lifetimes (all durations are in days):

– ‘datalifetime’: Minimum lifetime of files in the ‘data’ subdirectory.
– ‘loglifetime’: Minimum lifetime of files in the ‘log’ subdirectory.
– ‘olddatalifetime’: Minimum lifetime of files in the ‘olddata’ subdirectory.
– ‘cofilelifetime’: Minimum lifetime of files in the ‘cofiles’ subdirectory.

Remember:
– Avoid listing these parameters system-specifically, as subsequent ‘tp’ calls won’t work with a specific SAP system. Always use the parameter ‘ALL’.

Additional Resources

For more details, refer to the official SAP documentation:
Cleaning Up the Transport Directory

SAP Notes –
41732 – Deletion of data in transport directory
3471409 – How to cleaning up the transport directory

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.