Sunday 15 December 2013

Checks to be performed before shutting down

Now that we learnt in how to start and stop the SAP systems .There are few checks that we need to do before doing a system shutdown and there are few functionality checks to be done after system start that is explained as below .

SHUTDOWN OF SAP SYSTEMS :-

  • The SAP system may need to be stopped due to maintenance purposes.
  • These include activities such as : 
  • Taking an offline database backup
  • Upgrading the SAP kernel
  • Activation of modified profile parameters
  • Upgrade of the SAP instance
  • Restarting due to system performance issues
Sequence of Stopping an SAP system
  • Stop all Dialog Instances one by one (there is no sequence to be followed here)
  • Stop the Central Instance
  • Stop the Central Services Instance if it is on a separate host other than the Central Instance
  • Finally , Stop the Database Instance


Checks to be performed before shutting down


  • Check transaction SM04 to find out if users are active.
  • It is a best practice to post a message on the SAP system informing the active users about the decision to shut down the system.
  • You can create a system message using transaction SM02
  • To check for all users across all instances , whether it be central or dialog , use the global command AL08,SM04 command will show only the users logged onto the particular dialog instance.
  • Check SM50 if there are no critical background jobs running before shutdown.If there are such jobs , identify the job owner and inform them about the shutdown reasons.Also plan to restart the jobs after the system is up and running.
  • Transaction SM66 is the correct transaction to use , for viewing processes running for different dialog instances. viewing processes running for different dialog instances
  • Check using SM37 , for released , ready and active jobs.
  • During the course of shutdown , the active and just released jobs might fail , and cause inconsistencies in transaction processing.If so , speak to the Job owner and ask them to reschedule the jobs or cancel the active ones
  • Check for Updates – SM13
  • It is important to check if there are any open updates pending
  • If there are any open updates , check the logs and trace files to identify the reason for the delay. In many cases , the updates may be pending because of excessive database activities.
  • Before deleting any open update , always check the SQL analysis transaction ST04.
  • Check Batch Inputs – SM35
  • Batch inputs are sessions which are recorded by users and can contain a sequence of reports and transactions where certain data is entered.This session is periodically run depending on the business need.Make sure that there are no active batch inputs during shutdown
  • Check for outbound and inbound queues in transaction SMQ1 and SMQ2 .So that failed queues can either be saved or executed again if after system restart that does not happen automatically via the SMQS scheduler.

Startup & Shutdown of AS ABAP Systems

Well  i have tried to explain the concept behind the starting and stopping of SAP systems.

SAP has provided 2 tools for start and stop of SAP AS ABAP instances

  • On Windows OS , SAP MMC (Microsoft Management Console) is provided
  • On Unix OS , the commands startsap and stopsap are provided


Sequence of Startup:-

The SAP System comprises of Database Instance , Central Services and finally the multiple Dialog Instances
The sequence of startup is extremely important. Starting the processes of sequence will result in an inconsistent state and may spawn zombie processes on the OS which will have to be killed.


To startup the SAP system , you should login to SAP with the <sid>adm OS user
The <sid>adm OS user belongs to the Unix Group called sapsys on the Unix OS
The <sid>adm OS users belongs to the Windows Group called SAP_<sid>_GlobalAdmin and Administrators Group
The underlying element of the SAP system is the database instance.Therefore this has to be started first
If Central Services has been setup , this has to be started next.This means that the Enqueue Service and the Message service should be started.
An independent program called SAP OS Collector (saposcol) is started alongwith the remaining ABAP work processes in the Central Instance.The dispatcher work process is started next.
Saposcol collects statistical data from the operating system such as CPU and Memory usage parameters
Finally , the individual dialog instances can be started. There is no dependency between the dialog instances

Role of SAP profiles in STARTUP

Each SAP instance , whether it is application instance or a dialog instance , has three profiles
The three profiles and the sequence in which they are read :
 START PROFILE
 DEFAULT PROFILE 
 INSTANCE PROFILE
The start profile is read by the sapstartsrv process and inputs are provided on the SAP system ID and number , as well the physical filepaths of the sap executables for starting message service and enqueue service
Once the dispatcher work process is started, the Default Profile file is read.This file provides the necessary information to the dispatcher on the memory and sap application performance settings required to run the instance
The instance profile is the last file to be read. Any settings in the instance profile file will override the settings in the default profile file.