cancel
Showing results for 
Search instead for 
Did you mean: 

BALDAT deletion

Former Member

Hello.

We have situation here in our ECC systems where BALDAT table is rapidly increasing.

I tried first in sandbox system on how to go about this. I went to SLG2 then delete all logs seen in there in background so SBAL_DELETE job run. After the deletion, still BALDAT (thru DB02) shows size in GB. I'm currently using SAP Note 195157 on this issue but then it seems that BALDAT table did not decreased in size.

Please help. What else can be done to delete the applciation log files in BALDAT.

Note: I checked program SBAL_DELETE and found that it was calling BALHDR. Does this make sense?

Thanks,

Abe

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you can use sap note 706478.

regards,

kaushal

Former Member
0 Kudos

Hello Kaushal,

I already use the note 195157. The deletion run in background thru SBAL_DELETE job. But then it seems that BALDAT table still big in size. I check the program SBAL_DELETE and the tables inside is BALHDR.

I'm thinking that it was not actually deleting BALDAT entries but BALHDR entries. What do you think?

Regards,

Abe

Former Member
0 Kudos

Hi,

BALDAT is application log table and client-dependent. Therefore, you must delete data in each client,

so you need to schedule the report SBAL_DELETE in each client.

SBAL_DELETE delete entry from both table,

BALHDR is Application log header table

and

BALDAT is Application Log data table

regards,

kaushal

Former Member
0 Kudos

Hello Kaushal,

The value i see for BALDAT table if i query in DB02 is for what? accross all client or just for the current client im in?

Thanks,

Abe

Former Member
0 Kudos

Hi,

DB02 shows the value of database table not for single cllient,

regards,

kaushal

Former Member
0 Kudos

Hello Kaushal,

Sorry for bothering you much on this. I have check BALDAT table is a LRAW table so i cannot browse what's inside of the table thru abap. From here, i need to issue statement thru sql.

But what i found out is that, even i deleted the logs in SLG2, there's no effect in the size of BALDAT or BALHDR.

From above, what else can i do to decrease the size of BALDAT table?

Thanks,

Abe

Former Member
0 Kudos

hi,

what is the size of BALDAT table,

check with DB02,

run db02 -> under object type select tables and click on object details and give BALDAT

it's give you the size of BALDAT table,

regards,

kaushal

Former Member
0 Kudos

Hello Kaushal,

Table Name Type Size (Kbyte) Extents Tablespace

Total Chg/day Total Chg/day

BALDAT TABLE 114,688 565 85 0 PSAPAP1

Above was the value before and after deletion of application logs in SLG2. So i think no changes. Please note that this is just our sandbox system. I was trying it before proceeding in our production system.

Another note, our production BALDAT table size is more that 30Gb.

Thanks. Thanks.

Former Member
0 Kudos

Hi,

Read sap note which you used 195157.

-


A log usually has an expiration date, which is set by the application, that calls the 'Application log' tool. If the application log does not set an expiration date, the 'Application log' tool sets the expiration date as 12/31/2098 or 12/31/9999,depending on the release, which allows the logs to stay in the system for as long as possible. The end user cannot set the expiration date. The expiration date does not mean that logs which have reached that date will automatically be deleted. It is used to control the deletion of logs when you call the Deletion report. The DEL_BEFORE flag in the BALHDR table determines whether or not the log can be deleted even before the expiration date is reached.

DEL_BEFORE= SPACE means that the log can be deleted before the expiration date is reached. (Default value)

DEL_BEFORE='X' means that the log can only be deleted after the expiration date.

-


and in production system report must run in background due to vary large data.

regards,

kaushal

Former Member
0 Kudos

Hi Abe

What database do you have? If it is Oracle then the table size will not decrease after deleting records. You can only shrink the table doing a reorg.

If you are on a newer (netweaver) sap release your Baldat already has a BLOB column and you can do the reorg online.

SQL> desc sapsr3.baldat
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 MANDANT                                   NOT NULL VARCHAR2(9)
 RELID                                     NOT NULL VARCHAR2(6)
 LOG_HANDLE                                NOT NULL VARCHAR2(66)
 BLOCK                                     NOT NULL VARCHAR2(18)
 SRTF2                                     NOT NULL NUMBER(10)
 CLUSTR                                    NOT NULL NUMBER(5)
 CLUSTD                                             BLOB

If not, then think about migrating the LONG RAW column to LOB, check these sap notes:

646681 - Reorganizing tables with BRSPACE

835552 - Oracle Database 10g: LONG-LOB migration

Best regards, Michael

Answers (2)

Answers (2)

former_member413010
Discoverer
0 Kudos

Check snote 2388483 for more information.. This solved my problem.

0 Kudos

Hi Abe

I am using DB2 and facing the same issue.

SBAL_DELETE is not of much help in deleting data from BALDAT. Have checked a few notes but not able to find the exact answer.

Let me know if u have any solution to it?