on 06-22-2016 11:46 AM
Dear Team,
Kindly please help here.
We have issue with Hana database system as follows.
We aae using net-backup tool to take our log/full backups. Log backups run regularly (with schedule such a way that next log backup is started 5 minutes after prior log backup is finished) and are getting successful. But it was found that Some log Segments were not truncated/deleted after log backup was successful.
Here are log segment on mount-point where LOG file of index server resides. and they date back july 19th.
Can someone please let know how to tackle this problem ? Following sap note 1679938 is something we did when log was full or this situation but frequent restarts have made client raise eyebrows when this issue comes again and again;
Can someone please suggest any other approach that will help save restarts and truncate the Segments ?
Regards,
Arthur Rodrigues
But it was found that Some log Segments were not truncated/deleted after log backup was successful.
And what exactly makes you think that log Segments should be truncated/deleted after log backup was successful?
That's not the way how it works.
Good news is:You may manually trigger a deletion.
There's a useful command, also mentioned in SAP notes 1679938 and 2083715.
http://help.sap.com/hana_one/html/sql_alter_system_reclaim_log.html
I suppose you haven't tried yet?
hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Josef,
Apologies if my statement appeared baseless. I supposedly assumed that it is what log back does; As 98% of times Netbackup has been doing it so far. The case I mentioned above is "sometimes".
Also the command "Alter system reclaim log" (as per my understanding) clears only log segment with status "Free" (please refer screenshot in reply to Mr. Ning). We have like 349 log segment in truncated status and yet they are physically present which is problem statement here.
I will be checking sap note 2083715 as per Mr. Ning and your suggestion. Let me come back on that.
Regards,
Arthur Rodrigues
You need to plan better ways --
1. How much is your log growth over a period?
2.As per that increase the log file system-fs or 3PAR lun/
3. Have better retention period of moving logs to tapes.
4. Have regular backup's if its not happening daily, by which you can reduce the retention of logs.
Also, related answers will help ??
Size of FS where log resides?
Auto Log backup enabled ??
Backup policy??
As per that, i can advise more...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arthur,
Please check the HANA Studio-->VOLUMES and expand the Servicename/Volume
You will find the data and the log entries, click on log and let us know the status of the log segments
The log segments are normally in FREE; WRITING; BACKEDUP state
If the state is FREE they can be truncated, any other state would not allow for the truncate to work.
You can try command ALTER SYSTEM SAVEPOINT and that should trigger the truncate of the logs
Let us know if it helps
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sunil,
Can you please see the reply I added just now to Mr. Ning ? (screenshot)
The situation is that the "truncated log segment" should be not present on Disk. but they linger there for no good reason. Log backups are running just fine but they do not actually truncate the segment.
Regards,
Arthur Rodrigues
what is the value of log_mode ?
enable_auto_log_backup ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pavan,
Yes log mode is perfectly fine. Log backups are happening at regular interval. Problem is that once in a while these log backups (happening via Net-Backup tool) are not physically deleting the log segments. You can see is screenshots provided. The log segment dates back 19th june when log backups are running successfully everyday till even today.
Regards,
Arthur Rodrigues
Hi Arthur,
Can you use the following SQL command to check the state of log segment?
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;
Compared with state mentioned in note 2083715 - Analyzing log volume full situations and do accordingly.
Regards,
Ning
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rodrigues,
As per note 2083715,
1.b) If most of the log segments are in state TRUNCATED, there appears to be a problem with log backup which needs to be identified using the next steps.
Truncated, but not yet backed up. Backup will remove it.
All possible ways (storage location\throughout\backup catalog size\log_backup_timeout_s\log backup process state\third-party backup software) to check and fix are also mentioned in this note.
Please check carefully. I guess some.of logs were backed up sucessfully, others might hung.
Regards,
Ning
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.