Archive for the ‘Questions – 04’ Category

Sap Basis Questions – 04   Leave a comment

  • What is client 000 in SAP R/3?

Client 000 is defined as the SAP standard and the customer cannot change it. This client serves as a copy template for the creation of further client

 

  • What are the different type of work process ?

The following work process in SAP R/3

  • Dialog (D): each dispatcher needs at least 2 dialog work processes (not shown above)
  • Spool (S): at least 1 per R/3 System (more than 1 per dispatcher allowed)
  • Update (V): at least 1 per R/3 System (more than 1 per dispatcher allowed)
  • Background (B): at least 2 per R/3 System (more than 1 per dispatcher allowed)
  • Enqueue (E): exactly 1 per R/3 System (only 1 E work process is required and allowed)

 

  • How do you start SAP R/3?

To start R/3, run the shell script startsap from the home directory of user <sid>adm.
startsap starts the saposcol process, which is the statistics collector for operating system resource data, if it is not yet running.

  • startsap calls the script startdb, which starts the database if it is not already started.
  • startsap then starts the central instance.
  • The R/3 System administrator can start additional instances and application servers. To start the instances independently of the database, use the script startsap.
  • startsap has the following options:
  • startsap r3: Checks if the database is running; if it is, only the instance is started
  • startsap db: Starts only the database
  • startsap all: Default entry; starts both the database and the R/3 instance

 

  • In what sequence are profile parameter read?

R/3 processes read the appropriate parameters from a C source in the R/3 kernel

  • The default profile /usr/sap/<SID>/SYS/profile/DEFAULT.PFL is read; profile values already defined in the C source are replaced with the values in the default profile
  • The instance profile /usr/sap/<SID>/SYS/profile/<SID>_<instance>_<hostname> is read; profile values already defined in the default profile or in the C source are replaced with the values defined in the instance profile
  • This procedure ensures that system parameter values reflect the instance profile and the values in the default profile and the C source.

 

  • What are the step involved before stopping R/3 system?

Before stopping any R/3 system following steps are basic steps to be performed.

  • Before the R/3 System is stopped, the R/3 System administrator should check the:
  • Check if any background jobs from any application server are active or have been triggered externally. Use transaction SM37
  • Check if the background work process BTC is running in any application server.
  • Check if any update records are open when the system is stopped, the records are rolled back and set to status init. At startup, the records are processed again.
  • The administrator must decide whether to interrupt the jobs or wait until they are finished.
  • Give system users advance warning of the system shutdown. To create a system message, you can use transaction SM02.
  • Before shutting down the system, use transaction SM04 to check whether users are still logged on, and ask them to log off.
  • The R/3 System administrator and administrators of external systems should also inform one another about data transfers between their respective systems.

 

  • How do you check the work process from UNIX?

Use the following commands.
To check all the work processes:
ps -ef | grep <SID> | grep dw
To check the message server:
ps -ef | grep <SID> | grep ms

To check the SAP OS collector:
ps -ef | grep sapos

 

  • How do you display the server name?

To display the server name, use transaction SM51. Information about the process types is also displayed. For further information, select one of the instances and choose Processes. Alternatively, to display the system processes, use transaction SM66.

 

  • How do you display all active users in your system?

To display the overview of all active users on the instance where you are logged on, use transaction SM04. For a user overview of the whole system, call transaction AL08.

 

  • Q. What happens to locks when the enqueue server is restarted?

A. If they have not been saved to disk in the backup file, they will be lost. The locks that are inherited by the update task when COMMIT WORK is executed after CALL FUNCTION .. IN UPDATE TASK are saved to the disk. The locks are saved to disk when the update request becomes valid, that is, with the COMMIT WORK. Each time the enqueue server is restarted, the lock entries saved on the disk are reloaded to the lock table. A lock is saved to disk at the point at which the backup flag is set.

 

  • Q. The enqueue server is a single-point-of-failure in the SAP System. Can I guarantee high availability for the Enqueue Server?

A. To guarantee this you must use the standalone Enqueue Server with the Replication Server. This is described in the documentation Standalone Enqueue Server.

SAP note 524816 contains the prerequisites that must be fulfilled for using the standalone Enqueue Servers with the Replication Server.

 

  • Q. Where is the lock table stored?

A. In the main memory (shared memory) of the enqueue server. All work processes on the enqueue server has access to the table. External application servers execute their lock operations in the enqueue process on the enqueue server. Communication in this case takes place via the relevant dispatchers and the message server.

 

  • Q. Can locks exist directly after startup?

A. Yes, the saved locks, which were inherited by the update task, are reloaded to the lock table during startup (see first question).

 

  • Q. How fast are lock operations?

A. In work processes on the enqueue server, a few 100 microseconds. In work processes of external application servers you have to include network communications and process changes. Depending on CPU and network load this amounts to a few milliseconds.

 

  • Q. What should I do first if a problem arises?

A. Use the diagnosis functions:
sm12 Extras ® Diagnosis and then
sm12 Extras ® Diagnosis in update
If a problem is reported, back up the trace files dev_w*, dev_disp, dev_eq* and check the Syslog.

 

  • Q. The following message is displayed in the diagnosis details in SM12:

Lock management operation mode
Internal lock management in same process
What does this message mean and what are the other options?
A.
“Internal lock management in same work process” in the diagnosis function means that you are logged onto the enqueue server and your work process can access the lock table straight away. You do not have to delegate enqueue requests to an enqueue process on a remote enqueue server. If you are logged onto an application server that is not an enqueue server, the diagnosis function will provide you with the name of the enqueue server.
Each SAP System has exactly one application server that functions as an enqueue server. This enqueue server maintains the lock table, which is located in a shared memory segment. All of the work processes on the enqueue server can access the lock table. All work processes on other application servers delegate their enqueue requests to a special enqueue work process on the enqueue server.

This procedure is configured automatically. The parameter line “rdisp/enqname =<application server name>” in the default profile DEFAULT.PFL indicates which application server is currently acting as the enqueue server. When an application server detects that its name matches the name of the enqueue server, it creates the lock table and all of its work processes process enqueue requests inline. If an application server detects that its name does not match the name of the enqueue server, it sends all enqueue requests to the enqueue server.
Work processes of the type “enqueue” guarantee that incoming requests are processed immediately. One enqueue process is usually sufficient. In very large SAP Systems with many application servers, a second process can be beneficial. However, it is not expedient to define more than two enqueue processes. If the transaction SM50 -> [CPU] shows that only the first enqueue process is being used, the bottleneck is due to something else.

 

  • Q.Why is an enqueue work process required in a central system? Don’t all work processes have the same access to the shared memory and thus to the lock table?

A. Although the enqueue process is not used in a central system, it does not do any harm. Since almost all customers install an application server sooner or later, problems will inevitably arise if the enqueue process is missing. For this reason, the enqueue diagnosis function will output an error if an enqueue process has not been configured.

 

  • Q. Are the locks in the lock table also set at the database level? If not, database functions could be used to process objects locked in the SAP system.

A. Locks are not set on the database. The lock table is stored in the main memory of the enqueue server.

 

  • Q. Is a lock table built if an enqueue work process is not started on the enqueue server in the instance profile?

A. Yes, because the work processes on the enqueue server use the lock table directly, and not via the enqueue process. The latter is only responsible for lock requests from external application servers.

 

  • Q.How can I find out who is currently holding the ungranted lock? In other words, how can check the program after an ENQUEUE to determine which use is currently holding the lock so that I can let him or her know?

A. When the ENQUEUE_… function module is returned, the name of the lock owner is listed in SY-MSGV1.

 

  • Q. Can I use special characters in my lock argument (especially the ‘at’ sign (@))?

A. The ‘at’ symbol is used as a wildcard in SAP locks (enqueues). In other words, it can stand for any other character during collision checks. For example, the parameter value 12345@ locks the quantities 123450 to 123459, 12345a to 12345z, and 12345A to 12345Z, and all other values with any special character in the 6th character position.
This is described in detail in the section Lock Collisions.
In order to prevent the wildcard mechanism from being activated in SAP locks when it is not required, you need to ensure when enqueue function modules are called that key value parameters do not contain any wildcard characters.
If key values that you want to use to lock individual entities do contain wildcard characters, you have to replace the wildcards with different characters before the enqueue is called.

 

  • Q. With a single-process system as an enqueue server, we have reached X SD Benchmark users. Can this number be increased by using a multiprocessor system (message server on the same machine as the enqueue server)? Can we assume that scaling is linear (number of CPUs * X SD users)? How many processes are advisable if message servers, dispatchers, one dialog, and two enqueue processes are to run on the system?

A. A significant increase in the enqueue server throughput can be expected by using several processors. The CPU load on the enqueue server is distributed relatively evenly between message server, dispatchers, and enqueue work processes, which means that up to 3 processors can be occupied simultaneously. Dispatchers and message server represent the bottleneck with the enqueue. Linear scaling can be expected for up to 3 processors, even if lock requests are so frequent that message server, dispatchers, and work processes are occupied simultaneously. Due to asynchronous system processes (for example, syncer), using more processors can further enhance throughput.

 

  • Q. The Syslog often contains messages such as “Enqueue: total wait time during locking: 2500 seconds”. How should I analyze this problem? Or is the entry not critical? (There are no records of terminations or timeouts.)

A. The message is output for information purposes only but may indicate parallel processing errors with ABAP programs. The specified wait time is the time that has elapsed since startup due to the use of the WAIT parameter when the enqueue function module was called.
The WAIT parameter enables a lock attempt to be repeated a number of times, for example, so that the update task does not have to be cancelled when a lock is set temporarily by other programs. The work process remains busy between the lock attempts.

 

  • Q. User cannot connect to SAP

A. Check SAP logon settings, ping the host, check message server, check dispatcher, etc

 

  • Q. User cannot print

A. See if the user has proper authoriztion. check SAP user setup, check SPAD, check spools, check unix queue or print queue at the os level, etc

 

  • Q. Why do you get “GetProcessList failed: 80004005” error while starting SAP console management

A. You have selected one of the Process List nodes in the tree. Then you closed MMC and clicked “Yes” in the dialog “Save console settings to SAPMMC?”. Now when you open again the MMC and those processes are not started, you get this error.

Solution: Start MMC and select SAP Systems in the tree. Then close it and choose “Yes” in the dialog “Save console settings to SAPMMC?”. Now you won’t get this annoying error on every start.

Posted June 22, 2012 by rahulkolan in Questions - 04

Hello world!   5 comments

Welcome to Sap Learning dot com ! This is your very first post. Click the Edit link to modify or delete it, or start a new post. If you like, use this post to tell readers why you started this blog and what you plan to do with it.

Happy blogging!