How to Test Data Source in WebSphere Application Server 5.0?
 Technote (FAQ)
 
Problem
WebSphere Application Server version 5.0 doesn't have the "testConnection" button at the data source setup panel. It will be available in the next PTF.
 
Solution
In WebSphere Application Server version 5.0, use wsadmin scripting to test the data source:
  1. Invoke wsadmin.bat (on Windows) or wsadmin.sh (on UNIX) from command line. The wsadmin resides in $WAS_HOME/bin directory.
  2. At the wsadmin command line, enter the following commands in this color. In this example, the JDBC Provider is called "DB2 JDBC Provider" and data source is called "V5_db2ds".

Note: If the JDBC Provider or data source name has embedded blank, variable must be set prior to invoking $AdminControl command (in this example, the variable "myprov" is set to "DB2 JDBC Provider")

wsadmin>set myprov "DB2 JDBC Provider"
DB2 JDBC Provider

wsadmin>set myds [$AdminConfig getid /JDBCProvider:$myprov/DataSource:V5_db2ds/]

V5_db2ds(cells/TGPLAPTOP/nodes/TGPLAPTOP:resources.xml#DataSource_2)
wsadmin>$AdminControl testConnection $myds {{user db2admin} {password db2admin}}

DSRA8025I: Successfully connected to DataSource.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java 2 Connectivity (J2C)
Operating system(s): Windows
Software version: 5.0
Software edition:
Reference #: 1104498
IBM Group: Software Group
Modified date: Feb 19, 2003