Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a file called stderr1 in the work directory of several of the SAP servers in my production cluster. It has grown to around 19GB's to fill the hard disk on each server.

I have deleted all trace files and WP files from within transaction SM50 but that hasn't deleted it (or re-named it to .old).

If I try to rename or delete it manually, it says I can't because the file is in use.

Please can you tell me how I can delete or shrink the stderr1 file?

share|improve this question
SAP version? abap or java? user process explorer or handle from sysinternals to identify the process that holds nadle to the file. – Igal Serban Jun 4 '10 at 5:56
up vote 1 down vote accepted

To resolve this: I stopped SAP and the SAP Windows services, but was still unable to delete the file. So I rebooted the servers and then was able to delete it.

Since rebooting last night, the file is about 1MB on each server, so we will monitor it.

Also just to note, we do have the cleanup reports running as per OSS notes 48400 and 16083.

I also ran a consistency check and that didn't show any issues

More information here:

share|improve this answer

Go to the directory where the file is and :

echo "" > stderr1

THat will shrink the file.

share|improve this answer
I forgot to say, it is a Windows Server 2003 system :-) – Techboy Jun 2 '10 at 22:21
should still work ;-) – Geraint Jones Jun 3 '10 at 5:13
Thanks, I have just tried it and got the message 'The process cannot access the file because it is being used by another process.' – Techboy Jun 3 '10 at 9:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.