Requirement : You want to access HANA error logs and trace files.How to configure HANA log/trace file rotation?
Prerequisite : You need <SID>adm credentials to check logs at OS level and you need TRACE ADMIN or DATA ADMIN to view or delete log files in HANA Studio.
At OS level these diagnosis files(trace and log files) are generated at following location of each node/hostname.
/usr/sap/<SID>/HDB<nn>/<hostname>/trace Or $DIR_INSTANCE/<hostname>/trace
You can also execute shell command alias cdtrace to access these files.
As you can see the trace files are stored separated per host,so to get access to the trace files of a multi-node system you have to check for each host individually.
One can get all trace file location info by executing following SQL in HANA :
SELECT * FROM M_DISKS WHERE USAGE_TYPE ='TRACE';
The best way to analyze these files is using HANA Studio - Administrative perspective - Diagnosis Files page tab.
This provides us an option to Merge Diagnosis Files - This feature is very helpful during troubleshooting as we can review multiple diagnosis files in one go.
Reference : http://help.sap.com
Trace/log files rotation prevents log files from growing indefinitely by limiting the number and size of files.We can configure the log file rotation specific to one service or for the all services together.