Thursday 28 March 2019

How to Unlock & Reset SAP* Password in DB2

Tags

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

Tags

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