Home
Blog
About
Database administration
Operating systems
Development
Links
Following require login:
ScratchPad
Test database connectivity in a SAP environment.
SAP provide a utility to perform just this check, e.g.
[db2]: /home/db2/bin $ R3trans -d -v -x This is R3trans version 6.14 (release 701 - 26.01.09 - 12:46:00). unicode enabled version R3trans finished (0000). [db2]: /home/db2/bin $ echo $? 0
Return code of 0 means success, 4 or 8 means connection was successful but there were warnings anything else (e.g. 12) means connection failed
R3trans options:
-d | DB connect. Test if SAP database is available. |
-v | Verbose |
-x | DB connect without access on any SAP table. |
-w logfile | Log file. Default is trans.log in current directory |
Using R3trans has one problem - it requires access to a file called /sapmnt/<SID>/global/dscdb6.conf That file contains encrypted passwords and is only readable by user <SID>adm or members of the sapsys group.
In a SAP environment we should not be using db2stop/start to stop and start DB2. Rather we should be using the SAP scripts stopdb and startdb - those two scripts perform additional checks one of which is running R3trans to test database connectivity …
Ref:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/3d/ad5c974ebc11d182bf0000e829fbfe/content.htm
http://help.sap.com/saphelp_40b/helpdata/fr/3d/ad5ca44ebc11d182bf0000e829fbfe/content.htm