on 10-22-2014 2:38 AM
HI
I need to delete or truncate my logs in my HANA One system, as they are full and the HANA instance will no long start. Can anyone offer any advice on how I would do this please.
thanks
Hi Lewis,
As per my view, Still are you not able to login to the SAP HANA Studio.
If yes, please you try to move the file using scripts - i.e Cron or putty.
Caution: Do not delete log segments on operating system level, as the log area will become unusable and the database may stop working immediately.
You can release free log segments explicitly using the SQL command ALTER SYSTEM RECLAIM LOG. The ALTER SYSTEM RECLAIM LOG command physically deletes all log segments that are no longer needed.
Follow below steps:
1. Stop the database:
HDB stop
2. Change into the folder mnt00001 of the logvolume (Default: /usr/sap/<SID>/global/hdb/log):
cd /usr/sap/<SID>/global/hdb/log/mnt00001
3. You have to move one of the logvolumes temporarily to another volume where enough space is available. You should free at least 2 GB of space to ensure that the database has enough space to start. To find out the space consumption of each volume execute:
du -sh *
4. Move a volume which consumes at least 2 GB of space (e.g. hdb00003) to a volume with enough free space, e.g. to the data volume (Default: /usr/sap/<SID>/global/hdb/data):
mv hdb00003 /usr/sap/<SID>/global/hdb/data
5. Create a symbolic link to the new folder in the old location:
ln -s /usr/sap/<SID>/global/hdb/data/hdb00003 /usr/sap/<SID>/global/hdb/log/mnt00001/hdb00003
6. Start the database (HDB start) and perform a backup.
7. Wait until log backups are performed.
8. Use the following SQL-Statement to clean up the logvolume:
ALTER SYSTEM RECLAIM LOG;
9. Stop the database again and remove the symbolic link:
rm -f /usr/sap/<SID>/global/hdb/log/mnt00001/hdb00003
11. Move the log volume back to its original location:
mv /usr/sap/<SID>/global/hdb/data/hdb00003 /usr/sap/<SID>/global/hdb/log/mnt00001
12. Start the database (HDB start)
Please let me know if is there any concerns.
Thanks
Earesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lewis,
Check out this note. I'm assuming that you are talking about logsegments and not log backups.
1679938 - Log Volume is full
You can use the note for log mode normal as well as legacy. Hope it helps.
Thanks
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you can use studio and connect, please go to Backup section and go to backup (log backups) and delete the backups there.
Or, please follow the sections in HANA Administrative guide for "Backup and Restore section". The steps and the options for the backups are given there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, based on the version etc following link may be very useful. Especially, the section where it says how the logs can grow.
If done correctly, the method might work. In the note link I copied in my last reply, there is a small script IF DONE CAREFULLY, can remove old log backups.
But, the settings on Log backups must be changed or proper cleanup of the logs must be done after your instance recovers. We give Bar Chart On the Cosole status page for easy detection of the disk conditions.
On the volume side, please don't modify the volumes of the existing disks. These are MD arrays.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.