cancel
Showing results for 
Search instead for 
Did you mean: 

Archiving versus Deleting Application Logs (BC_SBAL)

0 Kudos

Our application log is getting so large that it is causing performance problems.

I noticed that we have never archived or reorganized our application log.

I know that there are 2 options for managing the application log.

  1. Tcode SLG2 - Program SBAL_DELETE can be used to purge old or expired logs
  2. Archive object BC_SBAL can also be used to archive logs

Which option do you use at your company?

I tried testing the archive functionality in our QA test system and it was very slow.

It took over 7 hours to delete the following number of entries.


Type                               No.    Description

BALDAT                           293,908  Application Log: Log data

BALHDR                            61,254  Application log: log header

BAL_INDX                              13  Application Log: INDX tables

Has anyone else encountered such poor performance?

Accepted Solutions (1)

Accepted Solutions (1)

JL23
Active Contributor
0 Kudos

QA systems often do not have the power of a production system, so it could be much faster there.

7 hours for an archiving job would not give me any headache. Especially with an initial archiving I used to run times from several days to several weeks.

For the application log we use a mixed approach, our EHS department wants a certain object be archived, all others will be deleted. 

We had 800 million records in BALDAT, among them countless orphaned (there are OSS notes available). It took weeks to get this down to a reasonable level, since then the deletion and archiving jobs run weekly.

0 Kudos

Our QA system is a copy of PRD and run times between the 2 have not been too far apart.

However, 7 hours to delete the number of records shown in my original message is horrible.

In the most recent years, we has 2-3M records per year in BALHDR.  That would take forever to run.

We have been live since 1999 and never did any archiving until I started the project last year.

I would probably need to implement a hybrid approach too.

I would purge all logs more than x years old and then decide by object type what should be archived versus deleted.

Answers (1)

Answers (1)

0 Kudos

All SAP archiving programs supposed to be developed with one limitation: that they occupy small space in RAM (e.g. 100MB) while in execution so if they do not finish over night or over weekend, they would not bring a SAP server to its knees during business hours. So in this case it is good they are slow, because you can let them run during business hours without problems.