How to Archive / Delete SAP Landscape Management (LaMa) Logs

There are 2 main logs in SAP Landscape Management (LaMa) which are:

  • Operation Log (Log for executed operations)
  • Change Log (Log for executed changes)

The load and table size will grow if you do not performing any logs archiving or deletion activity within the SAP LaMa. Worst case, your database might be inaccessible due to fully consumed disk space.

In this article, the exercise was executed in Windows Server operating system and Microsoft SQL Server database. But, that will make no differences as the task will mainly be on web page. Now, open the LaMa page URL,

https://[hostname].[domain]:[port]/lama/

Enabling the Log Archiving and Deletion

Ensure you have the proper authorization assigned.

Step 1: Once you have logged in to the LaMa page, go to Setup > Settings > Engine. Choose Expert Mode.

Step 2: Scroll down a bit and you will see the following settings of archiving and deletion.

Note: You can find the following settings and the description for setting up the archiving or deletion activities.

Field / Checkbox Description
Enable Log Archiving To enable log archiving select this checkbox.
Enable Automatic Log Archiving To trigger an asynchronous background task to perform log archiving – select this checkbox. The task is triggered either monthly or yearly based on your selection for Periodic Archiving.
Archive Logs Older Than [days]To archive all log headers and dependent log details of both operation and change logs older than a specified number of days. Enter a number of days from 1 to 500.
Archive Log PathTo store the archived files. Enter a path for the folder.
Enable Deletion of Logs Without ArchivingTo delete logs manually without archiving. Select this checkbox.

Logs Archiving

In almost of the cases, you should always archive your old data before you do the deletion. Same goes for LaMa logs, this is the recommended way of managing the logs.

Step 1: You have maintain and activate the settings.

  • Enable Log Archiving
  • Enable Automatic Log Archiving
  • Archive Logs Older Than [days]
  • Archive Log Path

Step 2: Next action to take, monitor the archiving job and ensure it is successfully completed. Check the archive log destination and there should be some files generated in yearly folder.

Alternatively, you can execute the same action via Monitoring > Logs.

Select any of the Log ID and click on Archive. You will be prompt with below dialog pop-up. Define the requirements below accordingly and once confirmed, click on OK.

Archiving execution is progressing now. The duration will depends on the amount of logs to be archive.

Deleting Logs

Be default, the Delete button is disabled and you need to enable it from the setting of Enable Deletion of Logs Without Archiving. If you choose this option, the log will directly deleted with no archive files.

The execution will be the same as archiving steps, select any of the log and click on Delete button. Enter the requirements and click OK. That’s all!

You May Also Like

Leave a Reply?