I would like to explain the situation, many BASIS team members are facing the situation when HANA Log file system is full, what to do and how to clean up the log files etc…..

Below is the process to reclaim the space.

HANA log file system is full, then your DB will not be response.In this case you need to check below steps and you should not delete any log files on disk manually.

You can check the status of your LOG size and disk usage any time from HANA Studio like below ;

HANA Log File System is Full

The log segment are stored in the location /hana/log/<SID>/mnt00001/hdb00002/logsegment_*.  you should not delete these files otherwise you can not open your database.

Table SYS.M_LOG_SEGMENTS will give you the detail ;

select top 1000 * from “SYS”.”M_LOG_SEGMENTS”

HANA Log File System is Full

Also we can check the status of log files via below sql command ;

select b.host, b.service_name, a.state, count(*) 
from "PUBLIC"."M_LOG_SEGMENTS" a 
join "PUBLIC"."M_SERVICES" b on (a.host = b.host AND a.port = b.port) 
group by b.host, b.service_name, a.state;

HANA Log File System is Full

According to this result, if some log files are in free state then we can use the below command to release some space ;

ALTER SYSTEM RECLAIM LOG;

Don’t forget that ;

* If most log segments are in state TRUNCATED, you might have a problem or in state BACKEDUP you might have a problem with hanging savepoint.

Status informations of Log states are shown in this picture ;

HANA Log File System is Full

Details informations are can be found in this SNOTE ;

1679938 – DiskFullEvent on Log Volume 

If you have secondary side with system replication then you need to use log release command ;

hdbcons ‘log release’

Details informations are can be found in this SNOTE ;

2409471 – SAP HANA Log Volume Full on Secondary or Tertiary Site with System Replication

Leave a Reply

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