Showing posts with label BASIS BASIC. Show all posts
Showing posts with label BASIS BASIC. Show all posts

SAP Kernel Upgrade in Linux unix system


The kernel upgrade activity on UNIX, Linux environment.
Preparation:

First check current Kernel patch release.

Step 1:  Download the necessary kernel patch from sap.

Step 2:  First create  a new directory  and transfer the  kernel files
SAPEXE.SAR,SAPEXEDB.SAR with SAPCAR,use winscp software.

Step 3:  Take backup old kernel file to other location.
Copy the old kernel.
cp  -pR /sapmnt/SID/exe/* /old kernel
            Default kernel location : /sapmnt/SID/exe

Step 4:  Login to the system as <SID>adm and goto  /new< kernel > directoryto uncar the two
package.
SAPEXE.SAR,SAPEXEDB.SAR

Step 5:  stop the SAP system.(stopsap R3)

Step 6:   Login to the system as root user  copy all extracted file into
/sapmnt/SID/exe
cp  -pR * /sapmnt/SID/exe/

step 7:  After all files copied  run the following command.(root user)
cd /sapmnt/SID/exe
             ./saproot.sh SID

Step 8:  switch to user <SID>adm and start SAP system (startsap R3)


Start & Stop SAP System in UNIX, Linux OS Environment

Starting the SAP System

1. Log on in your OS level as a user with SAP administrator authorization (<SID>adm).
2. Enter the command startsap [DB|R3|ALL]. The following applies to this command:
• DB starts the database system:
  1. startsap DB
• R3 starts the instances & associated processes of the SAP System:
  1. startsap R3
• ALL starts both the database system & the SAP System:
  1. startsap ALL

Stopping the SAP System

1. Log on in your OS level as a user with SAP administrator authorization (<SID>adm).
2. Enter the command stopsap [DB|R3|ALL]. The following applies to this command:
• DB stops the database system:
  1. stopsap DB
• R3 stops the instances & associated processes of the SAP System:
  1. stopsap R3
• ALL stops both the database system & the SAP System.
  1. stopsap ALL


Operating System and Database Migration

Pre Export Process In Application level :- 


  • Check the Java JRE version (Min 1.4.1).
  • Check the QCM table entries of SAP.
  • Check for cancelled and update task
  • Delete table entries from TATGPC, TATGPCA
  • Check the incremental table conversion
  • Cancel all released jobs
  • Check for the operation modes
  • Delete unnecessary spool data
  • De-schedule all SAP jobs
  • Delete all the batch jobs
  • Release all repairs and correction and transports
  • delete background input logs
  • Delete job logs
  • Delete the tRFC
  • Check for the code pages installed
  • Check the DDIC password for 000 client


Pre Export Process In OS level :-

  • Deschedule all OS DB backups
  • Shutdown all external interface
  • The source should have minimum SP3


Pre Export Process In DB level :-


  • Update DB statistics
  • Change the DB to no archive log mode


Steps to Start the DB export


  • Enter the system as adm
  • Create to directory in the source system eg, Export, Install
  • Check for the PSAPTEMP, the size should be 2 times the largest index 
  • Start the R3setup.bat program from the kernel CD (use the 45B_EXT kernel cd for the migration as the target system is AIX 5.3, always check the PAM before using the kernel cd.)
  • Edit the DBEXPORT.R3S file and skip the update of statistics as it is already done and update statistics of R3SETUP is high time consuming. It can even run for days for a DB size more than 1 TB
  • Edit the DBEXPORT.R3S to stop for splitter
  • Start the export
  • The export stops at the given breakpoint for the splitter
  • Split the STR files generated
  • Repeat the export process



Import process


  • Check the Java version ( Minimum JRE version 1.4.1 )
  • Check all necessary drives and filesystems. ( #mkdir /oracle/client/92x_64, # cd /oracle/stage, #mkdir 920_64 )
  • Create to directory eg, Install, Import
  • From install directory run instool.sh of Ext. kernel cd for AIX.
  • set environment.
  • #csh
  • #setenv LIBPATH /sapmnt//exe:/oracle//920_64/lib.
  • Install the central instances. R3SETUP –f CENTRAL.R3S
  • In the next installation process choose “Exit”
  • Install Oracle software as per WAS640 guide with ora user.
  • After the oracle installation is done repeat the installation of the R3SETUP
  • The R3SETUP stops for Migration key check phase
  • Create the tablespaces of the required sizes
  • Restart the database in no archive log mode
  • Start the import process
  •  Complete the post installation steps from the migration guide of 45 B



Some of the problems faced with the above mentioned source and target system


  • During the export phase after the STR files are created the export stops with an error saying 

“Cannot connect to DB”

Solution: Delete the following R3load, R3szchk, R3ldctl from the Instal directory.


  •  Use update of DB statistics by sapdba or brtools. Avoid using the update of statistics by the export

Process

Solution: Edit the DBEXPORT.R3S file and delete the lines DBCOMPUTESTAT4MIG_XT*,
DBCOMPUTESTAT4MIG*, BRCONNECTEXPSTAT*


  •  Export takes a huge time


Solution: Use the java based package splitter to split the STR files for the export.


  •  Export fails complaining the PSAPTEMP size is small.


Solution: Check the size of the PSAPTEMP before export. It should be atleast 2 times the size of the largest index for R/3.


  • During the import process check the aio settings in the OS level.


Solution: We have used the mix server of 512 and max server of 1024 during the import process


  • 6. The import process fails due to lack of space to extend the extent at PSAPROLL


Solution: Try using the PSAPUNDO in place of PSAPROLL


  • 7. The total system downtime could be reduced if MIGMON was used. The firewall rule prevented 

from the use of migmon between the source and the target.


Post Installation jobs for BASIS area


  •  Replace the disp+work of the kernel.
  •  Delete the table entries as mentioned in the Heterogeneous system copy guide of 45B
  • Edit the RFC destination address of other connected system.    
  •  Change the printer definition of the target. Test all the printers are working or we need to make changes in the settings.
  •  Set up the TMS
  • Check for the ALE and IDOCS flow after the new system is up
  •  Schedule all the basic BASIS background jobs.
  •  Take a full offline backup



Reason for moving to Oracle 9.2.0.7

9.2.0.4 being the first stable release of R/3 had many bugs which are listed in the SAP and Oracle sites were later removed in later subsequent releases.

This oracle will be upgraded to Oracle 10.2.0.2 and for the upgrade the source should be at oracle 9.2.0.7 before it can be upgraded to 10g. 

As we go higher up in the in the Optimizer gets improved hence the execution plans are improved and this results is transactions executing faster

Using of the Package splitter

The java based package splitter can be used to split the STR files

  •  Open new terminal preparation for splitter tool.
  •  Edit packet_splitter_end.properties file 
  •  Use splitter guide for clarification.
  •  setenv JAVA_HOME /usr/opt/java141.
  •  using adm user, start split process.

How to generate SAP Solman Key without having Solution manager

You might want to install SAP ECC 5 or SAP ECC 6 and been asking SolmanKey. What if you don't have Solman Server ? Then how would you generate solman key ? There are 2 ways (if you don't have Solman Server to generate solman key) :

1. Ask your friend which have Solman Server to generate it. OR


2. Use this simple script (VB Script) to generate it.




'   Solution Manager Key Generator   '
Open Notepad and copy this Script and save it .vbs
'Save to SolManKeyGen.vbs and execute'


Dim SIDs, SNs, SERVs, msg, ENDs, KEYs
msg="System ID (3 chr.)"
SIDs=InputBox(msg,"Solution Manager Key Generator")
msg="System Number (2 dig.)"
SNs=InputBox(msg,"Solution Manager Key Generator")
msg="Server Name (max. 15 chr.)"
SERVs=InputBox(msg,"Solution Manager Key Generator")
KEYs=SolManKeyGen(SIDs, SNs, SERVs)
msg="Solution Manager Key"
ENDs=InputBox(msg,"Solution Manager Key Generator",KEYs)
'-------------------------------------------------------
Function SolManKeyGen(SIDst, SNst, SERVst)
 Dim SIDSNhex(5)
 Dim SERVhex(15)
 Dim reshex(5)
 SIDSNstr = UCase(SIDst) + UCase(SNst)
 SERVstr  = UCase(SERVst)
 For arrcnt = 1 To 5
  SIDSNhex(arrcnt) = Asc(Mid(SIDSNstr, arrcnt, 1))
 Next
 For arrcnt = 1 To Len(SERVstr)
  SERVhex(arrcnt) = Asc(Mid(SERVstr, arrcnt, 1))
 Next
 For arrcnt = Len(SERVstr) + 1 To 15
  SERVhex(arrcnt) = 0
 Next
 If (Len(SERVstr) > 0) Then
  If (Len(SERVstr) < 5) Then
   For arrcnt = Len(SERVstr) + 1 To 5
    SERVhex(arrcnt) = Asc(" ")
   Next
  End If
 End If
 If (Len(SERVstr) > 5) Then
  If (Len(SERVstr) < 10) Then
   For arrcnt = Len(SERVstr) + 1 To 10
    SERVhex(arrcnt) = Asc(" ")
   Next
  End If
 End If
 If (Len(SERVstr) > 10) Then
  If (Len(SERVstr) < 15) Then
   For arrcnt = Len(SERVstr) + 1 To 15
    SERVhex(arrcnt) = Asc(" ")
   Next
  End If
 End If
 For arrcnt = 1 To 5
  reshex(arrcnt) = ((((0 Xor SIDSNhex(arrcnt)) Xor SERVhex(arrcnt)) Xor SERVhex(arrcnt + 5)) Xor SERVhex(arrcnt + 10))
 Next
 reshex(1) = reshex(1) Xor 84  Xor 0
 reshex(2) = reshex(2) Xor 131 Xor 11
 reshex(3) = reshex(3) Xor 194 Xor 46
 reshex(4) = reshex(4) Xor 52  Xor 105
 reshex(5) = reshex(5) Xor 119 Xor 188
 hexstr = "0123456789ABCDEF"
 resstr = ""
 For arrcnt = 1 To 5
  hihex = reshex(arrcnt) \ 16
  lohex = reshex(arrcnt) Mod 16
  resstr = resstr + Mid(hexstr, hihex + 1, 1) + Mid(hexstr, lohex + 1, 1)
 Next
 SolManKeyGen = resstr
End Function


How to increase Dialog work process time in SAP

Goto transaction code RZ11, enter the parameter name – rdisp/max_wprun_time and press enter. Once you get the below screen, click on Change Value and enter the desired time. Please not to set the value to 0 as it will make the running time unlimited.

No restart required as the parameter is dynamically switchable. For permanent change, please do it on transaction code RZ10. You can refer to SAP Note 25528.

SAP Kernel Up-gradation in Windows Environment step by step

Step by Step Procedure for Kernel Up-gradation:


  1. Basis Administrator shall login to www.service.sap.com with OSS & password and download the latest Kernel files.

    • Downloads---->SAP Support Packages---->Support packages & Patches-Entry By application group---->SAP application Components---->SAP ERP---->SAP ERP 6.0---->  Entry By Component---->SAP ECC Server----> SAP KERNEL 7.20 EXT 64-BIT UC---->Windows Server on X64 64BIT---->MaxDB “SAPEXEDB_402-20006745.SAR”    (Kernel Part II)

    • Downloads---->SAP Support Package---->Support packages & Patches-Entry By application group---->SAP application Components---->SAP ERP---->SAP ERP 6.0---->Entry By Component---->SAP ECC Server---->SAP SAP KERNEL 7.20 EXT 64-BIT UC---->Windows Server on X64 64BIT---->#Database  Independent “SAPEXE_402-20006748.SAR” (Kernel Part I).                                                                                                         

   2.     Login to the Server through OS level with SIDadm.

   3.     Make the copies of the existing folders  in the backup folder :- 

    • Drive:\usr\sap\SID\SYS\exe

   4.     Stop the SAP Instance & Services

    • SAPSID_00
    • SAPSID_01
    • SAPHostControl
    • SAPHostExec

   5.     Extract the SAR Files  

    • Go to command prompt
    • Go to as above path & Extract the files

      c:\sapcar –xvf *.sar
  6.    Copy and paste the uncared files to \usr\sap\SID\SYS\exe\uc\NTAMD64\ .

  7.    Select the option copy and Replace if it prompts pop message as “There is already a file with same name in the location.”

  8.    Start the services and Instances

   9.      Check the updated kernel from Command Prompt  by giving disp+work.

How to generate SAP Solution Manager Key



To Generate Solution Manager Key Execute T-code SMSY in Solution Manager system, you need to do the following steps:

1) Create a system by right clicking on System entry and select Create new system.

2) Enter the System Name i.e., SID (3 chars)

3) Product = SAP ECC (select from the list)

4) Product Version= ECC 5.0 (select from the list)

5) Save the entries.

6) Select Menu Item "System--->Other Configuration" and enter the SID which you have created earlier.

7) Enter the Server Name(hostname)

8) Finally click on Generate "Installation/Upgrade Key Button "

The system generates a Key ,copy that Key and paste it in the SAPINST screen when it prompts for Sol man Key.

SAP Security Audit Log


The Security Audit Log is a tool designed for auditors who need to take a detailed look at what occurs in the SAP system. By activating the audit log, you keep record of those activities you consider relevant for auditing. This information is recorded on a daily basis in an audit file on each application server. You can then access this information for evaluation in the form of an audit analysis report. Statistical information can easily be retrieved on transactions and reports.
The audit log’s main objective is to record:
·         Security-related changes to the SAP System environment
(for example, changes to user master records)
·         Information that provides a higher level of transparency
(for example, successful and unsuccessful logon attempts)
·         Information that enables the reconstruction of a series of events
(for example, successful or unsuccessful transaction starts)

Specifically, you can record the following information in the Security Audit Log:
  • Successful and unsuccessful dialog logon attempts
  • Successful and unsuccessful RFC logon attempts
  • RFC calls to function modules
  • Successful and unsuccessful transaction starts
  • Successful and unsuccessful report starts
  • Changes to user master records
  • Changes to the audit configuration

To Configure the audit log :           SM19
To Analysis audit log         :           SM20
To Delete old log               :           SM18
  
Before you activate the audit log you have to setup several parameters in RZ10 :
  rsau/enable                            :           Set to 1 to activates audit logging
rsau/local/file                          :           Name and location of the audit log file
rsau/max_diskspace/local       :           Max. space of the audit file. If maximum size is reached auditing stops.
rsau/selection_slots                 :           Max. number of filters
rsau/max_diskspace/local       :           Max. space of the audit file. If maximum size is reached auditingstops.
rsau/max_diskspace/per_file  :           minimum is 1MB & Maximum is 2 GB
rsau/max_diskspace/per_day :            minimum value should be 3*per_file & maximum                                                                                   1024 GB.Socheck these parameter.


How extract a SAR file in SAP

What is a SAR file ?

SAR files are  delivered by SAP for releasing supportpackages of Kernel and other OS level binaries.
 

How to extract a SAR file in SAP 

Navigate to the path where the SAR file is located and use following command

to extract a SAR file.

SAPCAR -xvf <filename.SAR>

How to Kill the Work Process in SAP SM50

Stopping Run-Away or “Bad” Work Processes

1. Log on to any client in the appropriate SAP system.

2. Go to transaction SM50.

3. On the Process Overview screen, find the process which must be stopped. Place a √ in the □ to the left of the process number to be stopped by pressing Space.
 On the top-most menu bar,click the Process → Cancel without core.

4. Click the blue arrow circle picture-icon to refresh the Process
Overview screen until the stopped process has cleared from the
display.

5. You may now leave the SM50 transaction.

If this does not kill the process, you can go to transaction SM04 and kill the
 user’s session. If this does not kill the process, you can log on to the server, 
open a Task Manager session, and End the Process. If this does not kill the
 session, there is an executable in the RUN directory on the server called 
sapntkill.exe. Run it providing the process ID number. If none of the above work, 
you have no choice but to “bounce” the SAP instance and/or possibly the serve.

New Forum Saptecharena

Display all tables in SAP with DD02T


  • Execute SE16,
  • Enter DD02T
  • Click display table contents
  • Enter table name (eg: AGR* or GRAC*)
  • Execute


How to avoid TIME_OUT dumps in SAP system ?

These TIME_OUT dumps usually occur if the program has exceeded the maximum permitted runtime without interruption. After this program will get terminated and in ST22 a dump will get generated.

Usually SAP system will terminate the program after permitted runtime to make the work area available to other users who may waiting and to prevent a work area being blocked unnecessarily long time

In SAP, there is a parameter rdisp/max_wprun_time which limits the maximum permitted runtime without interruption. By default this value is set to 600 seconds. However, if you are frequently encountering more dumps in SAP system due  to this, you can consider increasing this value to 3600 seconds to avoid this issue.

How to schedule Basis standard jobs ?

How to schedule Basis standard jobs ?

Goto transaction SM36 and click on "standard jobs" pushbutton. This inturn displays standard jobs screen. Here select all the jobs and click on "default scheduling" push button to schedule all of them as per their default schedule.

What is the need of scheduling basis standard jobs ?

Standard jobs are the jobs that should run regularly in the SAP system. These jobs will perform housekeeping like deleting old spool requests (thus avoiding spool overflow), deleting old background jobs/logs/updates/batch input sessions/ABAP short dumps, collecting operating system/database level statistics (used for workload reporting)  etc

What are the Standard jobs that should run in an SAP system & their significance ?

SAP_CCMS_MONI_BATCH_DP : Internally this job runs
RSAL_BATCH_TOOL_DISPATCHING report. This job dispatches monitoring architecture methods

SAP_COLLECTOR_FOR_JOBSTATISTIC : Internally this job runs RSBPCOLL report. This job generates run time statistics for background jobs

SAP_COLLECTOR_FOR_PERFMONITOR : Internally this job runs RSCOLL00 report. This job collects data for the performance monitor

SAP_COLLECTOR_FOR_NONE_R3_STAT : Internally this job runs RSN3_STAT_COLLECTOR report. This job will collect non-abap statistic data (Distributed Statistic Records - DSR)


 SAP_REORG_ABAP_DUMPS : Internally this job runs RSSNAPDL report. This job cleans up old abap short dumps


SAP_REORG_BATCH_INPUT : Internally this job runs RSBDCREO report. This job cleans up old batch input sessions


SAP_REORG_JOBS : Internally this job runs RSBTCDEL report. This job cleans up old background jobs


SAP_REORG_JOBSTATIC :  Internally this job runs RSBPSTDE report. This job cleans up old data from the run time statistics of the jobs


SAP_REORG_ORPHANED_JOBLOGS : Internally this job runs RSTS0024 report. This job cleans up orphaned job logs. The logs that cannot be deleted by RSBTCDEL report (i.e SAP_REORG_JOBS), remains as orphans which will be deleted by this job.


SAP_REORG_SPOOL : This job internally runs RSPO0041 report. This job deletes old spool data


SAP_REORG_XMILOG : This job internally runs RSXMILOGREORG. This job deletes XMI logs


SAP_SOAP_RUNTIME_MANAGEMENT : This job internally runs RSWSMANAGEMENT report. This job does the SOAP runtime monitoring


SAP_REORG_UPDATERECORDS : This job internally runs RSM13002 report and this deletes old update records

What is the difference between dynamic and static parameter in SAP

In SAP, parameters are used to set the configuration and define the functionality of an sap system like number of workprocesses, buffer size, locktable size etc.

Basically there are 2 types of parameters :

  • Static
  • Dynamic
Static are the parameters those won't take effect immediately the value is set. Restart of an sap system is required for them to take effect.

Dynamic are the parameters those will take effect immediately in the run time. Restart of an sap system is not required for them to take effect.

Parameter can be differentiated whether it is dynamic or static by checking in RZ11 transaction of SAP.

In Rz11, type the parameter and display it. In the screen , there will be a check box with description as "Dynamically switchable". If that check box is ticked, it means that it is dynamic parameter and value can changed in run time without restart of the system. If it is not ticked, then it is static parameter and it needs restart of a sap system for the changes to take effect.

How to delete an SAP lock Entries (SM12)

SAP lock is set by the executing workprocess when a user/job wants a change access to data.

Whenever a lock to be set the respective workprocess checks in the locktable whether a respective lock conflicts the existing entries in the locktable. If so, a lock is refused. If there is no conflict, then a lock is set.

There are different types of locks :

Write locks (E) : This is also known as exclusive lock mode as the lock data can be edited by only one user. Any other requests from workprocesses to set another write lock or read lock are rejected. A cumulate lock can be applied on the lock data by the same lock owner again.

Read locks (S) : This is also known as shared lock mode as several users can have read access to the locked data at the same time. Additional read lock requests are entertained even if they are from different users. However a write lock is rejected.

Enhanced write locks (X) : This is also known as exclusive non-cumulative lock mode. An enhanced write lock can be requested only once even if it is by the same transaction.

Difference between write locks(E) and Enhanced write lock(X) is write locks can be set and released by the same transaction several times but X type locks can also be set once even by the same transaction.

Optimistic locks (O) : These locks are set up when the users displays the data in change mode. Several optimistic locks can be setup on the same data. Optimistic locks are read locks(S) at first and converted to write lock (E) when the users wants to save the data. If an optimistic locks on a data is changed to write lock(E), all other optimistic locks on that data will be deleted.

Locks that are set by an application program are released by the program itself or they are released by the update program once the database has been changed.

Transaction code SM12 can be used to monitor SAP locks.

Here you have option of selecting locks based on following parameters
  • tablename
  • lock argument
  • client
  • username
  • In case, as part of monitoring, if you encounter some old sap locks and after thorough analysis, you would like to delete these, it can be done in the following ways :
    • Select the locks and delete the lock from SM12
    • Identify the user who has set the respective lock and end the user session using SM04 transaction code