Search this blog for other interesting articles

Wednesday 20 June 2012

How to change the developer trace level in SAP?

This article answers the following queries :



  • How to change the developer trace level in SAP?
  • What are trace files and what is their significance in SAP?
  • How to increase or decrease trace level in SAP?
  • What are the different trace levels and their significance in SAP?
  • What is the parameter to set developer trace level in SAP?
  • What is the default developer trace level in SAP?
  • How to activate or deactivate developer traces from the system profile in SAP?
  • What are the advantages or disadvantages in setting high trace levels in SAP?
  • How to limit the trace logging to increase to any arbitrary size?
  • What are the sap parameters used to limit trace logging to any arbitrary size in SAP?

-----------------------------------------------------------------------------------------

Trace files and their significance:

Trace files contain important technical information which will be required by basis consultant to troubleshoot  in event of problems / issues with the SAP system.

Different levels of traces:

There are 4 trace levels in SAP.
Level 0  - No trace
Level 1 – Write error messages in the trace file
Level 2 – Full trace ; The trace entries are being written will vary with the SAP program that is being traced
Level 3 – It is similar to Level 2 but in addition to that it also traces data blocks
SAP profile parameter rdisp/TRACE is used to set the developer trace level in SAP.

Trace level 1 is the “default” trace level set in an SAP system.

Sometimes there may be a requirement to developers or even basis guys to increase trace level from the default value 1 so that much detailed trace can be captured which helps in resolution of an issue.
To change this parameter, goto RZ11 transaction and provide rdisp/TRACE as shown below:













Please click on “Display” button to view the below screen.





























As seen from the above screen, this is a “dynamically switchable” parameter which means that trace level can be changed immediately and it doesn’t need restart of an SAP system for the parameter value to take effect.

If your SAP system contains more application servers, please tick “Same on all servers” checkbox in the above screen so that trace level can be changed dynamically across all the application servers. If you would like to change in a particular application server, it is not required to tick this check box.

In the above screen, default value , profile value and current value are set to 1. In case, it is required to set trace level for temporary period(till restart of the application server), it can be set by modifying current value accordingly. Please note that after restart of the server, the current value will be lost and system will start using the profile parameter that is set for that instance.

To set this parameter value permanently, you need to set this value in RZ10 profile parameter in all the application servers that is required. Once SAP system is restarted, it will read the profile values and come up with the value that is set to this parameter.

Advantages /Disadvantages in setting high trace levels in SAP

While higher trace levels provide much more detailed trace which helps in troubleshooting the issue there are some disadvantages as well.

Trace level 2 or higher influences the system performance and should only be set for error analysis. In addition, trace files grow very rapidly  when trace is activated. We should ensure that enough space is left on the disk on which the SAP directory is located. Using parameter %rdisp/TRACE_LOGGING%, we can ensure the trace files do not grow to an arbitrary size when trace is active.

Trace logging can be activated by setting the parameter rdisp/TRACE_LOGGING to ON. Also specify the size at which once reached, the trace file is logged and the trace level is reset to 1.

Please find below values that can be set to this parameter and their significance
rdisp/TRACE_LOGGING = off :  no tracing
rdisp/TRACE_LOGGING = on, 1000 : trace is logged if the trace file contains more than 1000 bytes
rdisp/TRACE_LOGGING = on, 20k : trace is logged if the trace file contains more than 20KB
rdisp/TRACE_LOGGING = on, 30m , global =on activates trace logging, if the trace file is larger than 30mega bytes. If the pattern searched for has been found in a trace file, trace logging is deactivated on all the servers.

Parameter rdisp/TRACE_PATTERN_0 is used to specify a trace pattern for automatically switching off the SAP trace. This parameter has effect only if trace logging is activated using rdisp/TRACE_LOGGING. In this scenario, trace files are searched for the search pattern. If pattern is found, trace logging is deactivated and trace level is reset to 1.

In this way, setting these parameters avoid trace files to grow to arbitrary size and  limits the trace logging based on the size of file specified.




7 comments:

rajesh said...

Hi,
can you tell me how to change a trace level for individual trace file?

Unknown said...

Hi sir, excellent informationthank you

yektek said...

awesome post thanks a lot swathi

yektek training said...

very useful information thanks sir

yektek.com said...

Nice article thank you Latha Pallavi

Anonymous said...

can you let me know how to change the tracelevel to on, currently my system every option is graded out

Unknown said...

How can I increase the trace level of dev_server0 in JAVA only system?

Search this blog for other interesting articles

Please subscribe & activate link received to your email id to receive latest articles

Enter your email address:

Delivered by FeedBurner