Thursday, 28 March 2019

How to Unlock & Reset SAP* Password in DB2


Unlock & Reset SAP* Password in DB2 


Log in to the operating system as db2 and switch to the SQL mode.
 

Status of the SAP* user
 

Execute as following.

db2 => select BNAME, MANDT, UFLAG from .USR02 where BNAME='SAP*'

BNAME  MANDT UFLAG
------------ -----        ------
SAP*         000        0
SAP*         500        0
SAP*         900        0


 3 record(s) selected.

 Unlock SAP* on DB2

Execute the following command.


UPDATE SAPSCHEMA.USR02 set UFLAG=0 where BNAME='SAP*' and MANDT='000'
 

Reset / Delete SAP* on DB2

Execute the following command.


DELETE SAPSCHEMA.USR02 where BNAME='SAP*'and MANDT='000'



Find SAP Schema name in DB2

Log in to the operating system as db2 and switch to the SQL mode. 


select schemaname from syscat.schemata

 







 

Monday, 18 March 2019

SAP cannot log onto the database DB6


Symptom

After a system copy, for example, the logon of SAP (Work processes, R3trans, tp) to the database does not work. For example, you notice the following error messages.
With DB2 Version 7: SQL1403N The username and/or password supplied is incorrect.

  •   With DB2 Version 8: SQL30082N Attempt to establish connection failed ...
  •  When you execute R3trans This is R3trans version 6.05 (release 46D - 16.05.02 - 15:45:00).2EETW169 no connect possible: "DBMS = DB6
    DFT = 'EI2'"

    R3trans finished (0012).
  •  The file trans.log contains the following error message: 4 ETW000 [developertrace,0] *** ERROR in DB6Connect[dbdb6.c, 1201] 4 ETW000 16557 4 ETW000 [developertrace,0] &+*** DB6Connect( SQLConnect ): er] SQL10002N The password supplied is too long. SQLSTATE=28000 4 ETW000 74 4 ETW000 [developertrace,0] &+*** 60 4 ETW000 [developertrace,0] &+*** 61 4 ETW000 [developertrace,0] *** ERROR in DB6Connect[dbdb6.c, 1201] 4 ETW000 51

 Other Terms
  db6, db2udb, SQL1403, dbcdb6up, dscdb6.conf, DB2DB6EKEY, SQL30082
 
Reason and Prerequisites


The passwords of the adm and sap or sapr3 users are stored in enciphered form in the file system. The value of the environment variable DB2DB6EKEY is used for the code. This variable can be maintained inconsistently on UNIX systems for different users and shells. The error occurs in particular when shell scripts are called that are often written for the corn shell while the users are running under the C shell.


Solution
 
Check the setting of this variable for both the corn shell (ksh) and C shell (csh) of the users db2 and adm.


After the value is set in a uniform manner, you need to log on again on the
operating system level. It may be necessary to reset the passwords so that they
can be deciphered again by the SAP programs. Proceed as follows. 

adm>
dscdb6up adm
dscdb6up sap

 
Note:
Environment variables are usually set in the user profiles which are imported
during the login or when the shell is called. The profiles are usually stored in
the .-files in the $HOME of the users. The profile files of the corn shell end
with .sh, and those of the C shell with .csh. Check this with
grep DB2DB6EKEY .??* 






More details refer Snote :582875

Wednesday, 30 January 2019

R3trans -X can't connect to ASE server

Symptom

  • Execute R3trans -X from a Java stack system return following output:
  This is R3trans version x.xx (release xxx - xx.xx.xx - xx:xx:xx ).
  unicode enabled version 2EETW169 no connect possible:
 "DBMS = SYBASE --- " R3trans finished (0012).

  • Trans.log shows "uid=SAPSR3":
     ...
4 ETW000 [ dev trc,00000] Connection 0 failed using DRIVER={Adaptive Server Enterprise};server=;port=4901;uid=SAPSR3;db=;pwd=xxxxxxxx;TextSize=2147483647;CRC=0;FetchArraySize=1000;ReleaseLocksOnCursorClose=1;DynamicPrepare=1;QuotedIdentifier=00 comm rd ODBC;logintimeout=3;ProtocolCapture=cap_p4397_comm_rd;supresstdscontroltokens=1;SuppressRowFormat=
   ...
Environment
  •  SAP Adaptive Server Enterprise (SAP ASE) 15.7 and 16.0 for Business Suite
  •  SAP NetWeaver (NW) - All versions
  •  SAP Business Warehouse (BW) - All versions
Cause

The values of "DB_CONNECT/DEFAULT_DB_USER" in Secure Storage is "SAPSR3" instead of "SAPSR3DB". 

The values of "DB_CONNECT/DEFAULT_DB_PASSWORD" in Secure Storage is SAPSR3's password instead of SAPSR3DB's password. 

Resolution 

 Connect to the host machine with adm login account and then use rsecssfx utility.
Check if current "DB_CONNECT/DEFAULT_DB_USER" is "SAPSR3DB" or not using:


rsecssfx get DB_CONNECT/DEFAULT_DB_USER 

If the value of "DB_CONNECT/DEFAULT_DB_USER" is not "SAPSR3DB", then
 change it to "SAPSR3DB" using:

 rsecssfx put DB_CONNECT/DEFAULT_DB_USER SAPSR3DB -plain

 change "DB_CONNECT/DEFAULT_DB_PASSWORD" to SAPSR3DB's password using:

 rsecssfx put DB_CONNECT/DEFAULT_DB_PASSWORD





More details refer Snote : 2584472

Tuesday, 8 January 2019

SAP Standard Filesystem Hierarchy.


SAP Standard Filesystem Hierarchy



usr/sap 
/usr/sap/ccms
/usr/sap/SID
/usr/sap/SID/DVEBMGSnn                contain SAP instance specific directories data, log, and work..
/usr/sap/SID/DVEBMGSnn/work
/usr/sap/SID/SYS                               contain profile, global, and exe directory.
/usr/sap/SID/SYS/exe
/usr/sap/SID/SYS/global    -->       /sapmnt/SID/global.
/usr/sap/SID/SYS/profile    -->      /sapmnt/SID/profile.
/usr/sap/trans                                  Transport directory.
/usr/sap/trans/bin                            TPPARAM file (global transport parameter).
/usr/sap/trans/buffer                        Special buffer with the SID of every system in the transport.
 

group (including control information)
/usr/sap/trans/cofiles                        Transport request control file.
/usr/sap/trans/data                            Transport request data file.
/usr/sap/trans/EPS
/usr/sap/trans/EPS/in
/usr/sap/trans/log                              Transport logs, trace and statistic file.
/usr/sap/trans/tmp                             Temporary directory.


                                                 //sapmnt
                                                       |
                                                    SID
                                                       |
                                           +-------+-------+
                                                     | | |
                                             exe global profile
/sapmnt       directory structure for sharing common files to all system belonging into the same group.
/sapmnt/SID              shared directory or link to directory /usr/sap/SID/SYS
/sapmnt/SID/exe        SAP executable application directory.
/sapmnt/SID/global    SAP central system log.
/sapmnt/SID/profile    SAP instance profile.




 

Standard Users in SAP.


Users

SAP*

SAP* is the super user of SAP system and used for doing client copy. SAP* is the only user in the SAP System that does not require a user master record, but that is instead defined in the system code itself. SAP* has by default the password 'pass', as well as unlimited system access authorizations. When you install your SAP System, a user master record is defined for SAP* with the initial password as the master password (set during installation) in clients 000 and 001. The presence of a SAP* user master record deactivates the special properties of SAP* and standard password 'pass'. It has only the password and the authorizations that are specified for it in the user master record.
When temporary license expires only SAP* user is allowed to login to client 000 to install permanent
license.

DDIC
 
It is the maintenance user for ABAP Dictionary and software logistics. It is used for any upgrade or installation type of work like,
1. TMS Configuration,
2. Applying Support Packages,
3. Applying Add-ons,
4. Implementing SAP Notes etc.

  • Best practice is not to use DDIC user but create a new user by copying from DDIC.
  • DDIC is the only user that is allowed to log on to the SAP System during an upgrade.
  • DDIC is hard coded to do some things other IDs cannot and restricted from doing some things that other IDs can.

EARLYWATCH

 
The SAP EarlyWatch service uses this user. This user should only be used for EarlyWatch functions like monitoring and performance analysis.
Default users in each clients,

Client 000
Username: SAP* --> short for SAP Star
Password:
Username: DDIC --> copy of SAP*, short for Data Dictionary
Password:

Client 001
Since Client 001 is a copy of Client 000, it has the same users and passwords as in Client 000.

Client 066
Username: EARLYWATCH
Password: support

New Client
Username: SAP*
Password: pass


 

What is Logical System in SAP?


Logical System

When data is distributed between different systems, each system within a network has to be clearly identifiable. The "logical system" deals with this issue.

A logical system is an application system in which the applications work together on a common database. In SAP terms, the logical system is a client.


Since the logical system name is used to identify a system uniquely within the network, two systems cannot have the same name if they are connected to each other as BW systems or as source systems, or if there are plans to connect them in any way. 

The logical system’s naming convention is CLNT such as SDKCLNT100