Thursday, 28 January 2021

Easy way to do SAP HANA housekeeping trace files.

 

Easy way to do SAP HANA housekeeping trace files.

Now SAP HANA have automatically compresses and archives old trace files via SAP HANA Studio UI. but today we are going to See how to do manually via SQL Command.

Follow the below steps to remove the trace files in SAP HANA.

Step 1: Logon to the SAP HANA server as SID<ADM>.

Be aware that in a scale out scenario, you will have to logon to each and every host.

 Step 2: Navigate to the trace file folder
 

Just use the predefined shell command alias ‘cdtrace

techrelam:/usr/sap/TRM/HDB00> cdtrace

echrelam:/usr/sap/TRM/HDB00/techrelam/trace>

Step 3: Create the “traces_bck” folder
 

For example I simply create the “traces_bck” folder as a sub-folder of the actual trace folder.

You might and probably should create it at a different location, to release the storage space in the trace file folder.


techrelam:/usr/sap/TRM/HDB00/techrelam/trace> mkdir traces_bck

4. Move old trace files into the new folder:

This can take time…


techrelam:/usr/sap/TRM/HDB00/techrelam/trace>find . -type f -mtime +10 -print | xargs -I {} mv {} traces_bck/
 

you don’t actually need the trace files any more, you may delete this folder later on.

In general, it usually doesn’t make sense to keep the trace files generated by older revisions.

Exceptions to this general approach could be, that you faced bugs that you still wait to see fixed or to compare messages from normal/baseline system operations.  



EmoticonEmoticon

Note: only a member of this blog may post a comment.