Operating Systems: i5/OS
             Personalize the table of contents and search results

 

Testing data source connections using scripting

 

You can test connections for data sources with the wsadmin tool and scripting. Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

 

Overview

Perform the following steps to test a data source to ensure a connection to the database.

 

Procedure

  1. Identify the DataSourceCfgHelper MBean and assign it to the dshelper variable.

    Example output:

    WASX7217I: Connection to provided datasource was successful.

  2. Test the connection. The following example invokes the testConnectionToDataSource operation on the MBean, passing in the classname, userid, password, database name, JDBC driver class path, language, and country.

    Example output:

    WASX7217I: Connection to provided data source was successful.




}
Using the AdminControl object for scripted administration

 

Related Reference


Commands for the AdminControl object