[Version 5.0.1 and later]Testing a connection using wsadmin

Before you begin

Why and when to perform this task

The AdminControl object of wsadmin has a testConnection operation that tests the configuration properties of a data source object. It takes a configuration ID as an argument.

Note: This invocation style is currently supported only for databases that do not require a user ID and password to make a connection, such as DB2 on a Windows NT machine.

Steps for this task

  1. Invoke the getid method for your data source.
  2. Set the value of the configuration id to a variable.
    set myds [$AdminConfig getid /JDBCProvider:mydriver/DataSource:mydatasrc/] 
    where /JDBCProvider:mydriver/DataSource:mydatasrc/ is the data source you want to test. After you have the configuration ID of the data source, you can test the connection to the database.
  3. Test the connection to the database.
    $AdminControl testConnection $myds

Related tasks
Testing a connection with the administrative console



Searchable topic ID:   testcon1
Last updated: Jun 21, 2007 9:56:50 PM CDT    WebSphere Application Server for z/OS, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/tdat_testcon1.html

Library | Support | Terms of Use | Feedback