Wednesday, 4 December 2013

SAP system is full – what to do as Basis consultant


This article answers the following queries:

  • If file systems in SAP server is full, what need to be done?
  • How to avoid file system full in SAP?
  • How to delete un necessary files in file systems of SAP?
  • How to delete core files in SAP?
  • How to delete trace files in SAP?
  • How to delete stat files manually in SAP?
  • What is the transaction code used to delete stat files manually in SAP?
  • What are various reports to be run to cleanup when file system is full?
  • How to prune the file systems in SAP?
  • How to delete old archive files in SAP?
  • What is the location of work and data directories in SAP?
  • What is the location of global directory in SAP?
  • Can we delete old page file and role files when the SAP system is online?
  • What is the sap parameter to set the trace level in SAP?
***************************************************************************

Sometimes, a basis consultant will get alerts or information from customers that the file systems are full. To avoid system issues and to increase uptime of the SAP system, In those cases, we have 2 options.
i)              Delete un-necessary files in the file system
ii)            In case you found file system is defined as too small then increase the size of them.

  
In this article, am covering the option 1 mentioned above.

Let us assume that the system id(SID) of the sap system is DP1. Then the

i)              work directory in (Unix, WindowsNT operating system) is  /usr/sap/DP1/DVEBMGSnn/work     (where nn is the instance number)
ii)            data directory in (Unix, WindowsNT) is
/usr/sap/DP1/DVEBMGSnn/data    (where nn is the instance number)
iii)           Global directory (i.e. for all instances)  is
/sapmnt/DP1/global  (for UNIX )
\\<sapglobalhost>\sapmnt\DP1\sys\global  (for WindowsNT)

Please follow below steps to avoid this issue :

1)   Delete core files from work directory

Work directory in Unix often contains old core files which were generated due to previous program terminations. These core files need to be deleted  

2)   Delete old log files and spool files

Under global directory there will be many log files  which can be deleted regularly.

Those files are
Log file type                      Naming Convention

Spool requests            nnnSPOOL ( where nnn=client)
Job logs                      nnnJOBLG
Batch input logs          BI<hostname><instance-number>

Following reports can be run using SE38 or through background job for selective deletion of the files mentioned above.
 RSPO0041  - This report is used for deletion of old spool files
 RSBTCDEL –  Used for deletion of old job logs
RSBDCREO  - Report can be used for deletion of  batch input log files and reorganization.

3)   Deletion of old ABAP/4 trace files

Some trace files with the name AT<instance number>nnnn will be in the data directory. Old files of this type can be deleted. The maximum available space for all files is defined by the parameter abap/atrasizequota. Also transaction SE30 can be used to delete the files.

4)   Deletion of old archiving files

When old data is archived, some files are written to the global directory. The naming convention of those files is Rxxmmddn (xx= application, mm= month, dd=day, n=number). For example, RMM11056

If these files are already saved on tape and these data is no longer required for productive operation, then these files can be deleted from the disk

5)   Deletion of old output requests

Output requests are normally stored on the data directory. Naming convention will be like SP*. Under normal scenarios, they are deleted automatically when the output is completed. In case you see they are not getting deleted, you can delete the same

6)   Page file and Roll file

Under the data directory, normally page files and roll files are stored. Naming convention will be like PAGFILnn and ROLLFLnn. Please note that page file and roll files can only be deleted when the corresponding SAP instance is offline.

Deleting these files hardly makes any sense because these files will start growing  to the allowed maximum extent  during the R/3 system start up. However in some special scenarios (during or after client copy), the required space can be retrieved by deleting these files. As mentioned earlier, please note that this can be done only when the instance is offline.

The maximum size of the roll file is given by
(rdisp/ROLL_MAXFS – rdisp/ROLL_SHM) * 8 Kbytes

A similar formula applies to the paging file also.

In some scenarios, to avoid the file system full issue, we can even move these page and roll files to a different file system by defining alternate values for R/3 parameters DIR_ROLL and DIR_PAGING

7)   Deletion of Old sort and Extract files

By the ABAP commands SORT and EXTRACT, temporary files are created. The location of these files are set using profile parameter DIR_SORT or DIR_EXTRACT. 

The temporary files for sort are named S+++++++<Extension> (On Windows NT .dat is used as extension  and on Unix there is no extension). Similarly for Extract, E+++++++<Extension> will be the file naming convention.

These files will be automatically deleted after the execution of these SORT and EXTRACT commands. However, in some scenarios, an abrupt termination can happen and these files won’t get deleted automatically. Those old files can be deleted by an administrator.

The exact file names for these are stored in the profile parameters FN_SORT or FN_EXTRACT

8)   Deletion of trace files

Trace files are created during a new system startup and they can be deleted. They are contained in the work directory

9)   Deletion of stat file or moving to different location

Please check whether the stat file which consists the work load statistics, has not been reorganized for some time and has therefore become too large. In emergency cases, this file can be either deleted manually or can be moved to different location.

To delete the stat file manually, please proceed as follows:
Goto ST03 transaction , call the delete function on the relevant instance by choosing :
Workload -> Reorganize -> Delete seq.stat.file

To change the location of stat file, change the value of system parameter ‘stat/file’ to a new location.

10) Deletion of job logs at operating system level

In some emergency cases, where you cannot start the R/3 system at all, the measure is to delete the job logs at operating system level and run RSBTCDEL report in forced mode.

Note: How to delete job logs at operating system level will be covered in a separate article later

11) Changing the trace level
If the trace files (dev_*) in the work directory are very large(normal size 0.1 to 20Kbyte), it is likely that the trace level is set to very high value. In SAP, rdisp/TRACE parameter is used to set the trace level. Normal value for trace is 1.  

Please cross check this SAP parameter and reset to 1 if the value is maintained as 2 or higher. If this value is set to high, much more detailed trace will be collected and trace file sizes are likely to increase. Therefore recommending to decrease or set the trace level to 1.

Please refer below link to know, how to set the trace level in SAP. 

Iam sure, if you duly follow the steps mentioned above,  file system full issues can be addressed. However, if after carrying out all the above steps there is no improvement, then please consider to increase the file system size by requesting space to the relevant team.

11 comments:

  1. nice information thanks for sharing from Sankar

    ReplyDelete
  2. Very good information ... Thanks sir.

    ReplyDelete
  3. Thanks for the great information ,was looking for this information from long.Great blog SAP Basis Training in Chennai

    ReplyDelete
  4. thanks...this is very helpful to me as i am new in this field

    ReplyDelete
  5. Thank you for such guidance about astrology,Best Blog on kerala manthrikam in Chennai

    ReplyDelete
  6. It was very nice blog to learn about SAP BASIS. Thanks for sharing.SAP basis

    ReplyDelete
  7. Thanks for sharing this Informative content. Well explained. Got to learn new things from your Blog on SAP SD.
    SAP SD

    ReplyDelete
  8. Sap MM SD FICO ABAP BASIS Training in Chennai with Placement Assistance.

    Hi All, Reach Mr.Karthick for Best Quality SAP Training in Chennai with real time project assistance. Myself and my friends got training from the sample place. We can get basic level training from the same place. Any way in SAP we have to put more effects to get the job.

    I recommended karthick is the best person for SAP Training in Chennai, his number is 8122241286,9003085882.
    SAP MM

    ReplyDelete
  9. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about SAP BASIS.SAP basis

    ReplyDelete