Tuesday, June 24, 2014

How to change syslog (SM21) SAP R/3

Hi Folks,
i'm fiddling around these day with the SAP R/3 system. I had to change some table data with se16 ( se my previous post for that ).

Doing so i realized that this changes in debugging leave ugly traces in the syslog ( SM21 )
They look like this
And inside ( clicking on the lines shown ) you find the name of the table changed.

Once upon a time there were sys-ops who had put up scripts under cron that searched debugging changes in the syslog, and locked the authors of the debugging change. 

So, just for fun i tried to figure out how to remove these traces of debugging changes.

The log at least in my system ( one application server ) is stored in a file called
SLOG* ( you can check rz11 parameter rslg/local/file )
I ran a quick find /usr/sap -name SLOG*
and i got this answer
/usr/sap/xxx/DVEBMGSnn/log/SLOGnn
/usr/sap/xxx/DVEBMGSnn/log/SLOGnn.SAV
/usr/sap/xjx/SCSnn/log/SLOGmm

where xxx is my sysid. xjx i a java sysid. nn is my sap system number. mm is the java system number ( i suppose)
So i decided that
/usr/sap/xxx/DVEBMGSnn/log/SLOGnn was my file.
I made a quick cg3y and downloaded it.
It is a binary ( ? looks more like a text file with some hex info...) file with plenty of text in it.
Ultraedit shows it like this

 

The user is cleartext: USERXXU.
I do a find and replace with another user.

Then, in the hope that the file is not locked by the application server processes ( shouldn'd be as it is shared and a quick lsof confirms it).  i do cg3z and overwrite the log with the changed log file.

It works. After that, running again sm21 shows that for user USERXXU there is no syslog entry anymore.


But now, at last, i have a question: anybody knows further places where changes done in debug are logged ( apart from the DB change logs )? Pls comment!

Enjoy and have fun!