# Troubleshooting database connection problems

This topic lists known database connection problems and solutions.

- A connection that was created in a previous version of the workbench is not working in this version
- A connection appears to be active but is not
- Connection to the database server fails
- Duplicate schema nodes appear when importing or deleting EJB JAR files
- Problems when importing metadata from the database
- No system schemas or tables are seen in Server Explorer
- Problems connecting to Cloudscape 5.1
- Problems connecting to DB2 Universal Database for iSeries V5R1
- The application requester cannot establish the connection
- This product appears to hang while loading database schemas

## A connection that was created in a previous version of the workbench is not working in this version

When you migrate to the current version of the workbench, you might have to edit database connections that you created by using previous versions of the workbench. This might happen because support for specific JDBC drivers and database vendors has changed. To fix this problem, edit the database connection to use one of the supported JDBC drivers.

To edit a database connection:

- Right-click a database connection in the Server Explorer, and click Edit Connection.
- Edit connection properties by using the New Database Connection wizard.

## A connection appears to be active but is not

If a database connection is canceled from outside of the workbench (for example, in DB2 Universal Database™ by using the FORCE APPLICATIONS ALL command), the workbench cannot detect that the connection is dropped.

Some tasks you perform in this product require a live connection to the database. Any task that requires an active connection to the database (such as running an SQL statement in the SQL query builder) will not work properly if the connection is dropped. If a connection appears to be active in the workbench but is not active, first try to disconnect from the database and then reconnect.

If the connection is still not active, then follow these steps:

1. Disconnect from the database.
2. Restart the database server.
3. Reconnect to the database.

If the database connection is still not active, then shut down the workbench and restart it.

## Connection to the database server fails

If the connection to the database server fails, you might receive an error message similar to this one: `IWAS0126E Problems encountered while trying to establish connection &1. Reason: '&2'`. For more information about the reason code (&2), refer to the documentation that comes with your database server.

## Duplicate schema nodes appear when importing or deleting EJB JAR files

Importing or deleting EJB JAR files (samples or otherwise) with either the Data Perspective or the J2EE Perspective or both open, occasionally causes duplicate schema nodes to appear under the databases for that EJB JAR file. The entries are harmless; however, you can close and reopen the perspective to remove the duplicate entries.

## Problems when importing metadata from the database

When you are importing metadata from the database, the database server or JDBC driver might report errors. When the load completes, these errors are shown in the JDBC Catalog Loader error message. These messages can indicate errors or information about the load process.

To view the error messages:

1. In the JDBC Catalog Loader error message, click Details to see more information about the exception.
2. Click OK to close the JDBC Catalog Loader error message.
3. Refer to the appropriate vendor documentation for further instruction on how to fix the problem.
4. Fix the problem.
5. In the Server Explorer, right-click on the database connection, and then select Refresh to import the catalog metadata again.

## No system schemas or tables are seen in Server Explorer

By default, the system schemas are filtered out during the database connection. To see system schemas and tables, you must clear the Exclude system schemas check box when you are setting a JDBC connection filter. JDBC connection filters are set when you create a database connection. They cannot be changed after the connection is complete.

## Problems connecting to Cloudscape 5.1

If you connect and disconnect from a Cloudscape™ 5.1 database multiple times, tables might display without columns in the Server Explorer. If this problem occurs, restart the workbench.

## Problems connecting to DB2 Universal Database for iSeries V5R1

On Linux™, the workbench might shut down abnormally when you connect to DB2 Universal Database for iSeries™ V5R1 by using the AS/400® Toolbox for Java™ JDBC Driver. The problem occurs when you enter an incorrect password or leave the password field blank. If this problem occurs, restart the workbench and connect again using the correct password.

Note: On iSeries systems, logical files are not shown in the Project Explorer. Use the Operations Navigator view to work with logical files.

## The application requester cannot establish the connection

For DB2 Universal Database for iSeries, the Toolbox JDBC driver uses the system name, user ID, and password provided in the call to `DriverManager.getConnection()` to establish a connection to the iSeries database. If any of these values are not provided, the Toolbox JDBC driver displays a sign-on prompt. If the Toolbox JDBC driver cannot sign on to the system for any reason, you will see this message: `The application requester cannot establish the connection`. Here is a list of potential causes for this error:

- The system name is incorrect. Ping the specified system name to verify the name. If the ping fails, then there is a TCP/IP configuration problem between your client and the server.
- The user ID or password is incorrect.
- The iSeries database host server is not started. To start the host server, run the following command on a CL command line: `STRHOSTSVR *DATABASE`

  You can verify that the iSeries database host server is running by running the NETSTAT *CNN command. When the Work with TCP/IP Connection Status screen is displayed, look for the as-database entry under the Local Port heading and ensure that the entry is in Listen status.

## This product appears to hang while loading database schemas

Connections to remote server for all database vendor might take a considerable amount of time. To decrease the load time, configure appropriate connection filters.

(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.