cancel
Showing results for 
Search instead for 
Did you mean: 

Parameters to restrict HANA logs

Former Member
0 Kudos

Dear Experts,

Our HANA Database log getting full for every 2 days. We have to manually delete the old backup logs, once for every 2 days. We can't increase the space in HANA share filesystem because we lack in resources.

Is there a option in HANA, where we can restrict the logs (like setting any parameters?) so that we don't have to manually delete them for every 2 days?

Any ideas, please?

Thanks & best regards,

Sreenu

Accepted Solutions (1)

Accepted Solutions (1)

Pradeepgali
Explorer
0 Kudos

Hi Pavan,

One way to prevent is to set it to overwrite...

Go to HANA Studio - Administration - Configuration - global.ini -  Persistence - log_mode

Change it from normal to Overwrite..

Note: This will overwrite the logs once it reaches it's max size. This setting is advisable to do epically during migrations /upgrades to prevent from filling the log drive.

Thanks

Pradeep

Former Member
0 Kudos

Hi Pradeep,

Thank you for the Hint.

Is there any other option other than "Overwrite" because it is not applicable for normal system operation periods. In case of system crash, we won't be having the logs to recovery the system.

Are there any other options like restricting Expensive Statements instead of manually deleting the old logs after every 2 days?

Thanks & best regards,

Sreenu

Former Member
0 Kudos

Hi Sreenivasa,

I am still unclear if you are deleting old logs then point in time recovery is generally not feasible.

Log filling is a continous process and it logs all changes in transaction data at  Log segment.

In short, you need to increase space in File system and setup an proper archiving process in some other disk so that you can get rid of these issue.

Otherwise you have to go for overwrite mode on.

if you have activated the trace on Expensive SQL statement , please switch it off . Expensive SQL statement is only required for getting the trace of the file for shorted time period..

I hope that I have cleared your quiery.

Regards,

Dipak

Former Member
0 Kudos

Hi Dipak,

Thank you for the information.

In DB offline mode, if I delete the old backup files that are no longer required then point in time recovery should be possible, right? I mean old backup logs and not current transactional logs.

We're lack in resources when it comes in increasing the File system space and setting archiving process in another disk.

Activating the trace for Expensive SQL statements would result in log filling? Activating trace would also be helpful in troubleshooting the current issue, right?

Thank you,

Sreenu

Former Member
0 Kudos

Hi Sreeniasa,

If you are making DB offline , then Full complete backup is only required for restoration.

Point in time recovery comes when you are taking a complete online backup and regularly backing your transactional logs.

if I have 100 table , I have activated the trace for 100 table . This would certainly make log filling situation . Trace is used for analyzing the behavior for a shorter duration .

I would say switch off the trace when it is actually not required.

Regards,

Dipak Kumar.

Former Member
0 Kudos

Hi Dipak,

Thank you for the information.

Restoration not possible with complete online backup?

You mean, there is no option other than "Overwrite" in order to manage the auto filling of logs?

Best regards,

Sreenu

Former Member
0 Kudos

Hi Sreenivasa,

Restoration is possible with online backup and backing off your transactional logs for PIT scenario.

I would say that there won't be no other option than "overwrite" in order to manage your auto filling your log file.

Regards ,

Dipak

Former Member
0 Kudos

Hi Dipak,

Thank you for the informaiton.

To control the autofilling of logs, are there any tools, with which we can delete the logs automatically? Instead of, deleting them manually for every 2 days?

Thank you in advance!

Regards,

Sreenu

Former Member
0 Kudos

Hi Sreenivasa,

There must be some tools but I am not aware of.

If I would be at your position , I would write a cron job which can delete old file from that directory scheduling at your day and time respectively.

I would also try to get an answer from Backup team of my dedicated HANA folks.

Regards,

Dipak Kumar

Former Member
0 Kudos

Hi Dipak,

Thank you for the Idea.

Just a small correction, we deleted all the logs from share filesystem like:

"/hana/shared/HPD/HDB00/backup/log> rm log_backup_*

only in DB offline mode and not in online mode.

Then we performed once again the Backup and then deleted the old backup file. Actually this procedure is not recommended but we have no other option to free up the filesystem space by deleting the backup logs.

So, I assume, it is dangerous to use cron jobs if it deletes the logs required to perform latest backup.

Any other ideas, please?

Best regards,

Sreenu

Mofizur
Contributor
0 Kudos

Hi Sreeni,


Please check below note.This is not automated but helpful though


2096851 - Management of Old Backups in HANA


Thanks,

Mofizur

Former Member
0 Kudos

Hi Mofizur,

More or less, we're also following the same procedure as mentioned in OSS note: 2096851.

We're looking for something that is automated and not manual for deleting the daily logs.

Any other ideas, please?

Thanks,

Sreenu

Former Member
0 Kudos

Hi Sreenivasa,

if you are deleting old log files , that means you don't require those files.

I would say go for "OVERWRITE" mode in configuration file and get rid of these issue.

There must be some transactional going on this HANA system which is filling up the log filesystem.

We had followed point 6 of the note(2096851) and had not received any log filling in our case.

Regards,

Dipak


Former Member
0 Kudos

Hi Dipak,

Yeah, I would say, "OVERWRITE" mode and point 6 of note: 2096851 are not the optimized methods to follow.

Please let me know for any other ideas!

Thank you,

Sreenu

Answers (1)

Answers (1)

Former Member
0 Kudos

I tried searching the same and dint found any . I belive there is no such kind of option availabe. The only way is to maintain a script file that will clean up the old backup logs.

However, lets see what other experts will say.

Regards,

Pavan Gunda

Former Member
0 Kudos

Hi Pavan,

Could you please let me know that script file?

If the script file deletes the old backup logs, do you think, it is possible to perform HANA DB Backup and Recovery?

Thanks,

Sreenu

Former Member
0 Kudos

Please check with your linux team for writing the script. If the script dletels the old log backup files..it is not possible of PIT recoveries.

What is backup strategy ?

if you have Complete data backup happening daily. Mostly we dont need the old log backups . However, it depends up on your business and backup strategy.

Regards,

Pavan Gunda

Former Member
0 Kudos

Hi Pavan,

Thank you for your response.

Can you provide me some information on writing the script?

Are there any options to restrict Expensive Statements?

Thank you,

Sreenu