The AdminControl object of the wsadmin scripting
tool has a testConnection operation that tests the configuration properties
of a data source object.
Before you begin
About this task
The testConnection operation takes a data source configuration
ID as an argument.
Note: This invocation cannot accept
user IDs and passwords that must be defined in the database itself.
This invocation can only be used for databases that do not require
a user ID and password to make a connection (such as DB2® on
a Windows® machine), or for data sources that
have a component-managed or container-managed authentication alias
set on the data source object.
Procedure
Invoke the getid() method for your data source.
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.
Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.
This feature requires Internet access.
Most of the following links will take you to information that is not part of the formal product documentation and is provided "as is." Some of these links go to non-IBM Web sites and are provided for your convenience only and do not in any manner serve as an endorsement by IBM of those Web sites, the material thereon, or the owner thereof.
Last updated: Oct 21, 2010 1:44:59 AM CDT http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-express-dist&topic=testcon1 File name: tdat_testcon1.html