Monday, 30 June 2014

Sunday, 29 June 2014

Client Size in SAP

Client Size in SAP

Run RSSPACECHECK report which we can run in SE38.This report will show client size in sap.

Review SAP note 118823 for Client size analyse.


How to Create a System in Solution manager

How to Create a System in Solution manager


IN t-code SMSY -->Navigate to Landscape Components -->right Click on Systems-->Select Create System with Assistant


Backup Types on Sql server

Backup Types on Sql server


Database Backup
Transaction Log Backup
Differential Backup
Complete System Backup


Tuning an expensive SQL statement on SAP

Tuning an expensive SQL statement

Create/change an index
Check if Auto update statistics is on
Understand the DB Optimizer
 Rewrite poor coding
 Use optimizer hints

Analyzing an expensive SQL statement

 Analyzing an expensive SQL statement

Statistical records → high database request time
SQL Trace → statements with long response times
Stored procedure name cache statistics → high execution times
 Process overview → report and table name
 Where used list → table

RAID technology

RAID technology provides two basic functions:
 Higher I/O performance by striping data over multiple physical disks, and therefore achieving an
even I/O distribution over all disks

 Fault tolerance by mirroring disks or adding parity information
RAID levels 2, 3, and 4 are not as efficient and are not commonly used. For more information about
these levels refer online.

RAID 0 is called disk striping. All read/write operations are split into slices (usually 16-128 KB) that
are spread across all disks in the RAID array. There is no redundancy added. Read and write
performance is improved by equally distributing workload on all participating disks. This level
provides the highest performance of all RAID levels.

In RAID 1, every physical disk is mirrored. All write operations are written to the original disk and
to the disk mirror. Write performance may be a little lower as both disks’ writes must be
synchronized. With mirroring, one disk may fail without data loss.

 In RAID 0+1 (also called RAID 10), every disk in the disk stripe set is mirrored. It provides nearly
the same performance as RAID 0 but adds redundancy at the cost of doubling the number of disks.
RAID 5 combines disk striping with parity. One physical disk is added to hold the parity
information. The parity information is also striped along all disks. Every write operation needs 2
physical reads and 2 physical writes (read data + parity and write new data + new parity). It offers
less fault tolerance, as only one disk in the whole array may fail without data loss. The total disk
storage is not available to store data.. There needs to be enough free space available for parity

information to equal the size of the smallest disk in the array.

Recommended memory settings for Sql server on SAP

 Recommended memory settings are detailed in SAP note 327494.  for Sql server  on SAP.

SAP on Sql server

SAP on Sql  server


SAP Database  <SID>
Files
File System <drive>:\<SID>DATA1\<SID>DATA1.mdf
<drive>:\<SID>DATA2\<SID>DATA2.ndf
<drive>:\<SID>DATAn\<SID>DATAn.ndf
<drive>:\<SID>LOG1\<SID>LOG1.ldf
<drive>:\<SID>LOGm\<SID>LOGm.ldf
Filegroup PRIMARY
...
<drive>:\<SID>DATA3\<SID>DATA3.ndf
...
<SID>DATA1
<SID>DATA2
<SID>DATA3
<SID>DATAn
<SID>LOG1
<SID>LOGm
...
SAP Database Files
Each database has two logical parts: data (data files) and transaction log (log files). When SQL
Server and the SAP System are installed, the data files of the <SID> database are created in the
directories <drive>:\<SID>DATA1\<SID>DATA1.mdf and
<drive>:\<SID>DATAn\<SID>DATAn.ndf, where n is the number of the file. The data files may
reside on different physical drives. SAP recommends storing the data files using RAID5. The
standard installation creates 3 data files. This makes it easier to expand the database. 

 The transaction log file is created in the directories <drive>:\<SID>LOG1\<SID>LOG1.ldf and
<drive>:\<SID>LOGm\<SID>LOGm.ldf, where m is the number of the file. The log files must be
mirrored. Hardware mirroring using RAID1 is strongly recommended. The standard installation
creates one log file.
After a standard installation, all SAP data files reside in the special filegroup PRIMARY.
 Stored procedure sp_helpfile returns the physical names and attributes of files associated with the

current database. Use this stored procedure to determine the names of files attached to one database.

Default Databases while Sqlserver installation

During SQL Server installation, databases master, tempdb, and msdb are created.

 master: Records all of the system level information for a SQL Server system, that is, all login
accounts, system configuration settings, existence of all other databases and the location of the
primary files.

 msdb: Used by SQL Server Agent for scheduling alerts and jobs, e.g. regular backups.

tempdb: Contains all temporary tables and is re-created every time SQL Server is started.
Temporary tables are automatically dropped at disconnect, and no connections are active when
the system is shut down.

SAP Architecture

SAP System Architecture


SAP System has a 3-tier architecture

 Presentation server
 Application server
 Database server

 The presentation server consists of a graphical user interface on the front end. Each SAP System user
runs an SAP GUI on a dedicated front-end computer.

 The application server is used primarily for data processing. An SAP instance that runs on an
application server combines special SAP services such as dispatching requests. The dispatcher, a
special process on each SAP instance, communicates with the front end SAP GUIs and distributes
work requests to the work processes. The application logic runs in the work processes, which are
connected to the database server.

 The database server is the computer where the database management system (DBMS) is located. The
DBMS (SQL Server) controls the databases and the database objects that perform all the database
activities.

 Note that an SAP GUI on a presentation server does not connect directly with the database,

Types of locks

Types of locks


Shared (S)

Used for operations that do not change or update data (read-only operations), such as a SELECT
statement.

Exclusive (X)

Used for data-modification operations, such as UPDATE, INSERT, or DELETE. This type of lock
ensures that multiple updates cannot be made to the same resource at the same time.

 Update (U)

Used on resources that can be updated. This type of lock prevents a common form of deadlock that
occurs when multiple sessions are reading, locking, and potentially updating resources later.

 Intent (I)

Used to establish a lock hierarchy.

Schema (Sch)

Used when an operation dependent on the schema of a table is being executed.
The two types of schema lock are: Schema stability (Sch-S), Schema modification (Sch-M)

SQL Server Security Modes

SQL Server Security Modes

SQL Server supports security modes for authentication

  •  SQL Server security
  • Trusted security
  •  Mixed security

Threads in Sqlserver


Threads in Sqlserver

  1. Lazy Writer
  2.  Lock Manager
  3.  Log Writer
  4.  Checkpoint Manager
  5. Background Task

SAP "sql" Transaction codes

SAP "sql" Transaction codes


SQLR - SQL Trace Interpreter  Basis - Monitoring
ST04_MSS - St04 for MS SQL Server  Basis - Microsoft SQL Server
SDBE - Explain an SQL statement  Basis - Computing Center Management System
DB02_MSS - Db02 for MS SQL Server  Basis - Microsoft SQL Server
ST04RFC - SAP Remote DB Monitor for SQL Server  Basis - Microsoft SQL Server



SP01 - Output Controller   Basis - Print and Output Management
ST05 - Performance Trace   Basis - Computing Center Management System
DBCO - Database Connection Maintenance   Basis - Database Monitors
DBACOCKPIT - Start DBA Cockpit
DB13 - DBA Planning Calendar   Basis - Database Monitors
SM21 - Online System Log Analysis   Basis - R/3 Syslog
ST22 - ABAP dump analysis   Basis - Syntax, Compiler, Runtime
DB02 - Tables and Indexes Monitor   Basis - Computing Center Management System
ST04 - DB Performance Monitor   Basis - Computing Center Management System
SE16 - Data Browser   Basis - Workbench Utilities
SM37-  Background Job Monitoring
SM66 -Global Work process Overview

Saturday, 28 June 2014

How To Troubleshoot when no one able to Login ABAP Stack in SAP

How To Troubleshoot when no one able to Login ABAP Stack in SAP

Scenarios:

Unable to login to SAP ABAP Stack from SAP GUI
No logon possible
Who logged in already complain that system is very slow or not responding
Solution:
Above cases even Basis Administrator cannot login through SAP  GUI ,he should use database operating tools such as putty ad dpmon to identify the issue and troubleshoot
1.Oraarch directory full
Sol:
Login to os level go to  oraarch directory path and backup the files under that path or trigger the archive log backup this makes with no time work processes  are free and able to login
2.Critical File System is full
Sol:
Contact OS Team to add up  space to required file system
3.Update got Deactivated
Activate the update going through the SM13 t-code
but you are able to update the deactivated update you need to login into the system using the sap gui
Not able to login still then use the tool DPmon from OS Level
Kill the wp according to the requirement.

Some wp going into PRIV mode
Contact with the specific user kill the session of user or work process needs to be terminated.kill until unless its going to slow down performance of your system.


SAP System start up Problems

SAP System start up Problems:

Two places you need to check: Event Viewer (Application and System logs) and the SAP Management Console (MMC). Event Viewer can provide useful information and it may help you pinpoint where the problem resides. The SAP MMC gives you the ability to visually see the system status (green, yellow or red lights), view the work processes status and view the developer traces, which are stored in the "work" directory. Example: /usr/sap/<SID>/DVEBMGSXX/work.


For a central SAP instance to start successfully, both the message server and the dispatcher need to start. If one of them or both fail to start, users cannot log in to the system. The following scenarios will illustrate possible causes of why an SAP instance might not start and the reason of the message:

"DISPATCHER EMERGENCY SHUTDOWN ".


Developer Traces:
dev_disp Dispatcher developer trace
dev_ms Message Server developer trace
dev_wp0 Work process 0 developer trace


The "services" file, which contains TCP and UDP services and their respective port numbers. This plain-text configuration file is located under winnt/system32/drivers/etc.Windows Task Manager (TASKMGR.exe), Event Viewer (EVENTVWR.exe).
Dispatcher Monitor (DPMON.exe), which is located under /usr/sap//sys/exe/run. Database logs.



1. Dispatcher does not start due to a port conflict

No work processes (disp+work.exe) exist in Task Manager.
Dispatcher shows status "stopped" in the SAP MMC.
Errors found in "dev_disp":
LOG Q0I=> NiPBind: bind (10048: WSAEADDRINUSE: Address already in use) [ninti.c 1488]
*** ERROR => NiIBind: service sapdp00 in use [nixxi.c 3936]
*** ERROR => NiIDgBind: NiBind (rc=-4) [nixxi.c 3505]
*** ERROR => DpCommInit: NiDgBind [dpxxdisp.c 7326]
*** DP_FATAL_ERROR => DpSapEnvInit: DpCommInit
*** DISPATCHER EMERGENCY SHUTDOWN ***


Problem Analysis
I highlighted the keywords in the error messages above: Address already in use Service sapdp00 in use The TCP port number assigned in the "services" file is being occupied by another application. Due to the conflict, the dispatcher shuts down.
Solution
If your server has a firewall client, disable it and attempt to start the SAP instance again.
If the instance starts successfully you can enable the client firewall back again.
If there is no firewall client at all, or if disabling it did not resolve the problem, edit the "services" file and check what port the appropriate "sapdp" is using.
If the instance number is 00, look for sapdp00. If the instance number is 01 look for sapdp01 and so on. You can use the following OS command to help you resolve port conflicts:
netstat -p TCP There are also utilities on the Internet that can help you list all the TCP and UDP ports a system is using.


2: Dispatcher dies due to a database connection problem

No database connections.No work processes

SAP MMC -> WP Table shows all processes as "ended".
   Errors found in "dev_disp":
C setuser 'tst' failed -- connect terminated
C failed to establish conn. 0
M ***LOG R19=> tskh_init, db_connect (DB-Connect 000256) [thxxhead.c 1102]
M in_ThErrHandle: 1
M *** ERROR => tskh_init: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c 8437]
*** ERROR => W0 (pid 2460) died [dpxxdisp.c 11651]
*** ERROR => W1 (pid 2468) died [dpxxdisp.c 11651]
*** ERROR => W2 (pid 2476) died [dpxxdisp.c 11651]. . .
*** ERROR => W11 (pid 2552) died [dpxxdisp.c 11651]
*** ERROR => W12 (pid 2592) died [dpxxdisp.c 11651]
my types changed after wp death/restart 0xbf --> 0x80
*** DP_FATAL_ERROR => DpEnvCheck: no more work processes
*** DISPATCHER EMERGENCY SHUTDOWN ***
DpModState: change server state from STARTING to SHUTDOWN


Problem Analysis
A connection to the database could not be established because either the SQL login specified in parameter "dbs/mss/schema" is set incorrectly or the SQL login was deleted from the database server. This parameter needs to be set in the DEFAULT.pfl system profile (under /usr/sap/sys/profile). In the messages above, we see that the SQL login 'tst' is expected but it does not exist at the database level.
Solution
Set the entry to the appropriate database owner. If the system is based on Basis <= 4.6 or if the system was upgraded from 4.x to 4.7 the database owner should be "dbo". But, if the system was installed from scratch and it's based on the Web AS 6.x the database owner should match the SID name in lower case. Example: if the SID is TST then the database owner should be "tst". If the parameter is set correctly in the DEFAULT.pfl profile check at the database level if the SQL login exists. If it doesn't, create it and give it database ownership to the .

3: SAP does not start at all: no message server and no dispatcher
The message server and the dispatcher do not start at all in the SAP MMC. The following error when trying to view the developer traces within the SAP MMC: The network path was not found. No new developer traces written to disk (under the "work" directory.)
Problem Analysis
The network shares "saploc" and "sapmnt" do not exist. That explains the "network path not found" message when attempting to view the developer traces within the SAP MMC.
Solution
Re-create the "saploc" and "sapmnt" network shares. Both need to be created on the /usr/sap directory


4: Users get "No logon possible" messages
Work processes start but no logins are possible.
Users get the login screen but the system does not log them in. Instead, they get this error: No logon possible (no hw ID received by mssg server).
In the SAP MMC, the message server (msg_server.exe) shows status "stopped".
The dev_ms file reports these errors:
[Thr 2548] *** ERROR => MsCommInit: NiBufListen(sapmsTST) (rc=NIESERV_UNKNOWN) [msxxserv.c 8163]
[Thr 2548] *** ERROR => MsSInit: MsSCommInit [msxxserv.c 1561]
[Thr 2548] *** ERROR => main: MsSInit [msxxserv.c 5023]
[Thr 2548] ***LOG Q02=> MsSHalt, MSStop (Msg Server 2900) [msxxserv.c 5078]
Problem Analysis
Work processes were able to start but the message server was not. The reason is because the "services" file is missing the SAP System Message Port entry. Example: SAPmsTST 3600/tcp
Solution
Edit the "services" file and add the entry. Then, re-start the instance. Make sure you specify the appropriate TCP port (e.g. 3600) for the message server.


5: The message server starts but the dispatcher doesn't
The dispatcher shows status "stopped" in the SAP MMC.
The "dev_disp" file shows these errors:
***LOG Q0A=> NiIServToNo, service_unknown (sapdp00) [nixxi.c 2580]
*** ERROR => DpCommInit: NiDgBind [dpxxdisp.c 7326]
*** DP_FATAL_ERROR => DpSapEnvInit: DpCommInit
*** DISPATCHER EMERGENCY SHUTDOWN ***
Problem Analysis
The keyword in the messages above is "service unknown" followed by the entry name "sapdp00". The dispatcher entry "sapdp00" is missing in the "services" file. Example: sapdp00 3200/tcp
Solution
Add the necessary entry in the "services" file. Example: sapdp00 3200/tcp Then, re-start the instance.


6: Work processes die soon after they start
All work processes die right after the instance is started.
The SAP MMC shows work processes with status "ended".
Only one work process shows status "wait".
An ABAP dump saying "PXA_NO_SHARED_MEMORY" is generated as soon as a user logs in.
The SAP MMC Syslog shows the following error multiple times: "SAP-Basis System: Shared Memory for PXA buffer not available".
Problem Analysis
The instance profile contains mis configured memory-related parameters. Most likely the "abap/buffersize" instance profile parameter is set to high.
Solution
Edit the instance system profile at the OS level under /usr/sap/sys/profile and lower the value assigned to "abap/buffersize". Then, restart the instance. Also, it's important to find out if any other memory parameter were changed. If not, the system should start once the adequate memory allocation has been set to the the "abap/buffersize" parameter

SQL SERVER important Services

SQL SERVER important  Services


MSSQLSERVER and SQLSERVERAGENT both services run as sidadm user

Steps to Change the Default SAP IMAGE on the right hand column of the SCREEN


Steps to change the default SAP IMAGE on the  

right hand column of the

screen :- 


- Transaction code - *SMW0* 
- X - Binary data for WebRFC application 
- Hit Enter 
- Click Execute 
- Click Settings -> Maintain MIME types 
- Click the Create button 
- Fill in :- TYPE : image/gif EXTENSION : .GIF 
- Click Save 
- Click Back to the Binary data for WebRFC 
- Click Create 
- Fill in :- Obj. name : ZXXXX.GIF Description : 
- Company Logo 
- Click Import and specify the filename where your 
- GIF file is 
- located.File type is BIN. Finish press the 
- Transfer button. 
- If successful, your logo will be shown in the 
- Binary data for 
- WebRFC. 
- Transaction code *SM30* - Table/View - *SSM_CUST* 
- Click Maintain 
- Click New Entries 
- Name Value to be set 
- START_IMAGE ZXXXX.GIF 
- RESIZE_IMAGE NO 
- Logoff and Login again .

Error Code 0208 during Releasing and Transporting Requests in SAP

Error Code 0208 during Releasing and Transporting Requests in SAP


Check that <sid>adm has read access to pf=/usr/sap/trans/bin/TP_DOMAIN_SID.PFL 

There is a permissions issue
 

DBA Cockpit: Error message for drop ORA_COCKPIT_HELPER


DBA Cockpit: Error message for drop 

ORA_COCKPIT_HELPER

Check this SAP note Note 1403384 

Prerequisites for RFC Connection

Prerequisites for RFC Connection


1. Firewall open between systems ports 33## and 36##/tcp and http ports. 
2. Registered program exists and active .

SAPSPrint Service

SAPSPrint  Service

SAPSPrint  Service  required for access method

S          Print Using SAP Protocol                                    

This article defines how to install SAPSprint on select  Print Servers to allow printing from various SAP Applications.
Download this file from
SAP Software Download Center àSupport packages and patchesàSearch for SAPSPrint

Installation:
Click on SAPSPrint .exe
It will guide you through the installation steps
Provide the port number as 515 if it already occupied then give port number as 516.

in user machine service looks like this





Prerequisites to do support pack upgrades

Prerequisites to do support pack upgrades


1.Login to 000 client and user like DDIC.
2.Spam/saint tools updated.3.Ensure that enough space in trans directory.4.There is at least 2 background work processes are running.5.If the support package file size is more than 10mb then need to apply from application server only6.While applying support packs the system is is Up& Running.7.Check the current versions and apply the suitable versions.8.Ensure that there is enough space in DB.9.Ensure that TMS is configured.10.Ensure that SAP Router is configured.
11.Check the table spaces and file system space and make sure that there is enough free space.
And go to SAP service market place and check the prerequisites of the particular patch by clicking on the info link of that patch.
Apart from then you needs to lock all other clients in system to prevent login during patching activity.
You needs to off database log (archive and transaction) generation.
All prerequisite SPs also needs to be in queue.

12. No aborted pactches in the system.
13.Free Space in EPS\IN Directory.
14.You should also order side effect report before applying support packs.
15.When you import/apply Support Packages, do not use the SAP System productively. This means no other user should be logged on except for the system administrator and no background jobs should be running.So lock all dialog users during SP upgrade & run BTCTRNS1.
16.You should check for all open request. Release them(if it belongs to you) or delete them ( if those are not required).If those are belongs to other team members then consult with them & release or delete them with there confirmation.confirmation. Dont keep any modifiable/open request in the system.
17.Make sure that there is enough space under /usr/sap/trans directory.If there is not enough memory then you will get dump at the time of SP upgradation.
18.Make sure that you have newest SPAM update in your sap system.

19.Before applying any patch first do take a offline backup of your SAP system.
As all below requirements are correct.


Friday, 27 June 2014

Windows: Fastest way of killing a process running on a specific port

Windows: Fastest way of killing a process running on a specific port


I have to kill a process on a Windows machine and I just know its port. Normally the steps are as below: Find the PID by looking at the ports (example port 515) List the processes running on ports

netstat -a -o -n
And then kill the process on that port with the following command

taskkill /F /PID <pid>

Tuesday, 24 June 2014

Current Running all processes in Sql Server and how to kill process

Current Running all processes in Sql Server and how to kill process


1.Go to Sql server login wizard.
2.Open new query Window.
3.Enter sp_who command.
4. And Execute.
5.It will show all current running processes.


How  to Kill Process in Sql server


kill <PID>

How to add a node to SICF

How to add a node to SICF



  1. make sure that client is modifiable in scc4 and se06 t-codes.
  2. go to SICF.
  3. go to specific path.
  4. add new  host service information.
  5. add package information.
  6. save.
  7. Activate it.
  8. release sub task and TR.
  9. Node successfully added to SICF.


Forgot J2EE_Admin Password or Unlock J2EE_Admin Password

Forgot J2EE_Admin Password or Unlock J2EE_Admin Password



1.Start the Config Tool
Going to Below Path
\usr\sap\<SID>\JCXX\j2ee\configtool\configtool.bat

2.Connect to the Default Database Settings
3.Navigate to
Global Server configuration  àservicesàcom.sap.security.core.ume.service
4.To change the value of the property
a.Select the property in the listuser.superadmin.activated)
b.In value  at the bottom of the screen , change the value to TRUE.
c.Choose set
d.Apply the changes
Follow the same set the property (ume.superadmin.password)also
In order to change to take effect ,Restart the Server.

5.Now Login to portal using sap*  and password a defined in config tool
6.Search for Administrator User
7.Reset or  change password for “Administrator”
8.Even create the new user and assign the necessary roles.

Disabling sap* User


1.Start the config tool
Go to Below Path
\usr\sap\<SID>\JCXX\j2ee\configtool\configtool.bat
Connect with the default database settings
2.Navigate to
Global server configurationàservicesàcom.sap.security.core.ume.service
3.Double click on the property ume.superadmin.activated=FALSE

4.Save the changes restart the java engine
Login as Administrator or new user.



Transport of Copies Creation

Transport of Copies


1.Open the t-code SE09
2.Click on Create Icon
3.A Pop up will come up .Select the option “Transport Of Copies”  and click on ok.
4.It will create a transport of copies you will be redirected to new pop up.
5.In the new pop up ,Enter the new description  select the Target and save.
6) In order to lock the released TR we need to include the objects (TR), click on Request/Task -> Object List -> Include Objects.

7) Enter the TR number if you want to include only one TR. Else select the second radio button and put all the TR’s and click on Ok.

8) Finally, verify the transport of copies in order to view all the TR’s which were included.
In this way, we can create the transport of copies based on our requirement. In order to import it on target system 

Saturday, 21 June 2014

Language Pack Installation -Chinese-part 10

Supplementary pack for CLNT ex 100





Special functions


Language Pack installation successfully completed 

Language Pack Installation -Chinese-part 9


Starting Supplementary Language Pack :000 Client