12 April, 2013

COMMON DATABASE IN SAP

MS SQL Server
MS SQL Server is a Relational Database Management System developed by Microsoft Inc. Its primary query languages are:
    T-SQL.
    ANSI SQL.
Type of file in SQL Server Database
    Model
    Master
    Msdb
Type of file extention in SQL Server Database
    Mdf- Contain master data
    Ndf - Contain Main or original data
    Ldf-  Contain logs of transactions
Periodic task in SQL Server DB
    Reorg- It’s like Defragment
    Rebuild Index- Delete deleted object from the table which occupied special space. 
How to delete SAP* password or reset it?
Delete from usr03 where bname =’sap*’ and mandt=’clientno’ ; 
Max DB
Properties:
    It having Live cache 
    We can see  live cache using LC10
    We can do replication of SLD. This function was present in Sybase from    Sybase SAPHANA originated this was the only reason that SAP buy the Sybase  for its replication feature.
DB2
IBM DB2 is a relational model database server developed by IBM. 
There are three main products in the DB2 family:  
    DB2 for LUW (Linux, Unix, and Windows), 
    DB2 for z/OS (mainframe), and
    DB2 for iSeries (formerly OS/400)
Access tools:
    CMD
    GUI
    DB2CC 
VERSIONS IN DB2
    DB2 express edition (free)
    DB2 enterprise edition
Note:
DB2 9.7 common
DB2 10.1 latest
No external listener in DB2 
Coordinating Agent
It is like the Server process in the oracle Database. 
DB2pfc
It is like Database writer which fetch data from Hard disk. Its called DB2 prefetcher.
DB2pcln
It is used to clean the page of the database. It called database page cleaner.
Internal Listener in DB2 
    TCP/IP listener
    IPC  listener
    SNA listener
Starting and Stopping DB2
    DB2 start
    Db2 stop force
    Db2 kill
    Db2 sync
IMPORTANT PARAMETER IN DB2
    Database manage configuration DBMCFG
    DB2 registry
To show all register parameter : DB2all
Show all parameter  : db2 get dbmcfg
Logarchmeth1 – true
How to change parameter in DB2
DB2 update dbcfg for <> suing <> off;
How to see live log in DB2 
DB2 Diag

05 April, 2013

SAP MEMORY MANAGEMENT

SAP Memory Management
Virtual memory
It is collection of shared memory and local memory. Where shared memory is like paging, cache, swap etc.
The operating system determines if the allocated memory area resides in the physical memory or in the operating system swap space. Depending on the operation system, the maximum size of the virtual memory may vary between the size of the operating system swap space and the sum of physical memory and operating system swap/page space.
Local memory is associated with individual work processes.
Local work process memory is used for:

  • ABAP load
  • Data stack
  • Buffer for database transfer
  • Local roll area
  • Local paging area
SAP Buffers in Shared Memory
Shared memory is associated with all the processes of one instance. SAP buffers contain global objects for all users and work processes, such as programs, and buffered table content.
Extended Memory in Shared Memory in Virtual Memory
Extended memory contains objects associated with individual users and their open transactions, such as variables, lists, and internal tables.
Heap memory:
Contains the same type of data as the extended memory and is used when extended memory is full. It is allocated and released on demand.None of the memory areas varies in size except SAP heap memory. Heap memory presents in the local memory.
SAP paging memory contains:
ABAP objects such as extracts and context-independent objects such as exports.
Roll memory
Contains the initial part of user contexts.

  • User context:      
  • Authorizations
  • Set/get parameters
  • Internal tables
  • Report lists
Working:-

Working
First min roll memory get full and then  it goes to extended memory after that I will go to the again max roll memory and after that it will go to heap memory and if it also goes full it going to stop from here. Here the process will be stop and its status will be priv.

Note:-
For memory management we use the t codes ST02 it will going to show the buffer area and other memory.

SPOOL AND PRINTING


SPOOL AND PRINTING
The spool request contains device-independent print data and includes administrative information (such as author,date, number of copies) and the actual print data. Only when the spool request is to be output on a particular device is an output request created. The device-independent print data from the spool request is converted to the printer language that the selected output device understands.There can also be several output requests for one spool request.The actual document content of a spool request is stored in TemSe (for temporary sequential objects), for which you define the storage location with the profile
Parameterrspo/store_location.
Valuedb (the default value): Spool requests are stored in database table TST03 (Advantage: backup as part of the database).
ValueG: Stored at operating system level in the global directory (advantage: performance).

Note: If a printer cannot be controlled at operating system level, it cannot be used from the SAP system, either.
Local Printing
SAP users can output documents on their local printers using front-end printing. These local printers do not need to be individually defined in the SAP system.
Remote Printing
With remote printing, the spool work process and operating system spooler are running on different hosts.Network printers provide their own operating system spoolers and are directly connected to a computer network.

STARTING AND STOPPING SAP


STARTING AND STOPPING SAP
When you start the SAP System, we simultaneously start the
System database
Application server
Respective processes
A start profile defines which processes are to be started or stopped. This profile is automatically generated during the system installation. You can change it later.
You can start and stop the SAP System and its database using operating system tools. There are special scripts available to do this, or you can use the appropriate program icons.
You can start and stop SAP instances with the Computing Center Management System (CCMS). The prerequisite for doing this is that the database and at least one SAP instance have been started.
Need of restart
1.To bring changes in the system
2.Migration
3.Hardware/software updates
4.Performance
5.Backup/Recovery

Procedure on windows:
1.Start the MMC on the SAP system host by choosing Start → Programs →   SAP Management Console.
       2.Right-click the SAP system node and choose Start or Stop.
All instances listed under the system node, will start or stop in the correct order.
       3.If the SAP system is installed on multiple hosts (distributed system), you have the following options to start or stop your system:
·         You start or stop the SAP instances using the MMC on each host.
·         You add the remote instances to the MMC configuration to start or stop all instances from a single MMC. To do so, use one of the following options to configure the MMC
Procedure on UNIX:
Starting the SAP System
       1.Log on in UNIX as a user with SAP administrator authorization (<SID>adm).
       1.Enter the command startsap [DB|R3|ALL] from your home directory. The following applies to this command:
·         DB starts the database system
·         R3 starts the instances and associated processes of the SAP System (using the sapstartprogram)
·         ALL starts both the database system and the SAP System. ALL is the default value and can be left out.
       2.After you have started the database and the central instance, you can perform other actions within the CCMS.
To check whether all application servers of an SAP System were started correctly, start the Alert Monitor (transaction RZ20) or the Overview of SAP Application Servers (transaction SM51)
Stopping the SAP System
       1.Log on in UNIX as a user with SAP administrator authorization (<SysID>adm).
       2.Enter the command stopsap [DB|R3|ALL] from your home directory. The following applies to this command:
·         DB stops the database system
·         R3 stops the instances and associated processes of the SAP System
·         ALL stops both the database system and the SAP System. ALL is the default value and can be left out.
Starting an SAP System is performed in a number of steps and is the task of the operating system user adm
Start the database:
Before the SAP instances are started, this must have operational status. The database is therefore always started as the first step.
Start the central instance:
Next, the operating system collector SAPOSCOL is started, if it is not already active. This is a standalone program that runs in the operating system background, independently of SAP instances. It collects data about operating system resources and makes this data available through the shared memory of all SAP instances.
The central instance with the message server and the dispatcher and its work processes is then started. Only once the message and Enqueue servers are active can other instances be started, if desired.
Start other instances:
If the dialog instance is not running on the same host as the central instance, the SAPOSCOL operating system collector is first started on this host.
The dispatcher is then started with its work processes.
SAP Services:
SAPOSCOL: Collects performance data for one or more SAP instances and runs once for each host.
SAP_: Controls the SAP instances and runs once for each instance.
SAP Profiles
the specifications of the instances; that is, the type and number of processes, main memory sizes, and other options are controlled at the start of the instances using profiles. These are files at operating system level that are stored in the directory
usr\sap\mnt\sys\profile.