If 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 ;
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”
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;
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 ;
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
Hi, but how to clear the space and which file should be remove , what is solution for this if log directory is full?
BR, Nilesh
Hello Nilesh,
If your log file is FULL then you can use the below solution as a summery ;
To resolve your issue, follow below:
1. Open HANA Studio.
2. Open SQL editor for your HANA system.
3. Execute:
alter system reclaim log;
4. Take the backup.
oThanks for valuable info..!!
Hi Nilesh,
Can we take manual backup from studio or how its can you please clarify.
Thanks
Narasimha.
How about secondary server, can we implement that ?
because hana system in DR is pasif
You can use this command at secondary server with adm
hdbcons ‘log release’