Verify a connection
User errors cause most test connection problems. This article provides a checklist of steps that you must complete to enable a successful connection. Click on the link for more information on a specific step.If, after completing these steps and reviewing the applicable information, your connection is still not successful, check the SystemOut.log for warning or exception messages. Then use the technical support search funtion to find known problems.
- Create the authentication data alias.
- Create the JDBC provider.
- Create a Version 5.0 or 4.0 data source.
- Save the data source.
- Restart the server.
If you are running Websphere Application Server Version 5.0.2, you do not have to complete this step unless you also created a new JAAS entry.
- Test the connection
One can test your connection from the data source collection view or the data source details view. Access either view in the administrative console, and then select a connection from the list. Click the test connection button on the connection.
You must complete all the steps and restart the server before you test the connection. Neither the authentication data alias nor the WebSphere Application Server environment variables (in Version 5.0.1) are available before a server restart.
In the Network Deployment environment, your test connection results depend on the Java Virtual Machine that was running when you created the data source. If you defined the data source at the cell level, the test connection occurs on the deployment manager (dmgr). If you defined the data source at the node or server level, the test connection occurs on the node agent. You must restart the dmgr or the node agent on which the data source was defined, to acquire new or updated JAAS authentication alias entries and environment variables.
In a default WebSphere Application Server installation, the database driver path environment variables as, for example, DB2_JDBC_DRIVER_PATH , are defined and initialized to NULL at the node level. If you create a cell level data source and add the environment variable note indicating the node level environment variable will override the cell level value, your test connection will validate the datasource; however, your application programs will not work because the path to the database driver files is NULL. Ensure your default WebSphere Application Server database driver path environment variables are deleted or set to suitable values.
The following table illustrates the combinations of data sources and related environment variables that can be tested:
Test connections on different data source and environment variable combinations
Data sources Cell level variables Node level variables Server level variables Cell level Ok Fail Fail Node level Ok Ok Fail Server level Ok Ok Ok
One can bypass this environment variable lookup by hard coding a path to the database driver. Defining a path does not mean the data source cannot be used in failure scenarios.
Test connection
JDBC providers
Data sources
Looking up data sources with resource references for relational access
Binding to a data source
Creating and configuring a JDBC provider using the administrative console
Creating and configuring a data source using the administrative console
Creating a JDBC driver on multiple nodes
Creating and configuring a JDBC provider and data source using the JMX API
Data Source collection
Data Sources (Version 4)
JDBC Provider collection
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.