SAP instance ( ABAP only ) connects to database using client software, when you work with distributed environments this issue could occur and SAP instance wont be able to connect to DB.
This issue can occur because of several reasons. I would like to present couple of scenarios regards to connections from SAP system to the database isn’t possible anymore. This could mainly occur during startup.
You will see error message like ” Database is not available via R3trans – Database must be started first “
These errors gives impression that DB is not up and running, when checked further DB is running fine.
In here you can check this by logging on to database host as user db2<sid>
db2<sid> 52> db2 get snapshot for database on <dbsid>
Database name = <SID>
Database path = /db2/<SID>/db2<sid>/NODE0000/SQL00001/M EMBER0000/
Input database alias = <SID>
Database status = Active
Catalog database partition number = 0
Catalog network node name = xxxxxx
Operating system running at database server= xxxxxx
Location of the database = Local
First database connect timestamp = 03/09/2015 07:35:34.818230
Last reset timestamp =
Last backup timestamp = 11/09/2014 21:15:24.000000
Snapshot timestamp = 04/16/2015 23:29:02.597560
Here you can see the status of DB as ACTIVE
So where could be the problem ?
As DB is active but still cannot accessed by SAP instance so need to check DB client software, this could be one of the reason.
Checking client software and the connections between client SW and server side of DB.
For further steps getting to root cause of the issue you need to take closer look at the architecture
In here you need to check client software that enables SAP work process to establish connection to database.
Since DB2 version 9.1 for LUW, this software is located in global directory of your SAP system.
From this location files needed by SAP system are copied at the system start to executables folder of the SAP systems.
eg: /usr/sap/<SID>/<instance>/exe. using sapcpe process, which is part of SAP startup procedure
After this step, check how the problem can be investigated further.
A first check you can run R3trans tool. In here switch user to <sid>adm user on SAP Instance host and issue ” R3trans -d “.
This command checks whether connection to database is possible or not .
If you get put ” R3trans finished (0000)”, this return code shows that the database is available and client connectivity is possible.
But in here we are discussing about possible error.
This is R3trans version 6.22 (release 720 – 18.11.11 – 11:29:00).
unicode enabled version
2EETW169 no connect possible: “DBMS = DB6 — DB2DBDFT = ‘DB6′”
R3trans finished (0012).
If you get this error message, you need to check trans.log from the location where you issue R3trans -d command.
In this trans.log steps for during connection will be listed, also with steps that doesn’t work well at the time of connection.
( As optional for more detailed log you can use R3trans -vd this give more detailed description of the steps along with relevant SAP notes )
On the other hand you also need to check your network settings. Make sure that the network communication between SAP Instance host able to connect to DB.
This can be done via “ns look up <hostname>” . This command for Linux/Unix as well as Windows. Also need to check the port for communication between DB server and client need to be available to setup connection.
You can perform test by using the command
telnet <host> <database listener port> .
At a given time if the connection is established you can consider this part of set is done successfully.
In here I want to stress on Client and DB version. You need to make sure that both client and server side are on same DB and Fixpack version. Client side Fixpack can be lower than DB side but not otherway round.
You can check the version with “db2level” command
example output :
vml29:db2abc 54> db2level
DB21085I This instance or install (instance name, where applicable: “db2abc”)
uses “64” bits and DB2 code release “SQL10012” with level identifier
Informational tokens are “DB2 v10.1.0.2”, “s121127”, “IP23394”, and Fix Pack
Product is installed at “/db2/db2abc/db210FP2”.
Other most frequent scenario is password mismatch.
At times you may face problems due to password mismatches, this mainly occurs when you don’t share global directoy to you SAP system but synched it between th database instance and SPA instance.
When you change password of database user, them values will be update in file /usr/sap/<SID>/global/dscdb6.conf.
If case of R3trans -d fails, in trans.log you can see SQL30082N with Reason Code “24” ( username or password invalid ). If this is the case you can create dscdb6.conf file with following command.
dscdb6up -create <password of user sap<sid>> <password of user <sid>adm>
The file is recreated and both the passwords are changed in password file then you will notice and message like
“password file ‘/usr/sap/<SID>/sys/global/dscdb6.conf’ successfully written.”
This tool can also be used to set the password for user <sid>adm or sap<sid> only. To change the password one of these users issue following command.
dscdb6up <username> <password>
This doc is based on my personal experience only. If you are looking for more information you can navigate through
http://scn.sap.com/docs/DOC-14356 and also SAP Note : 1091801