Troubleshooting data source connection errors

A test connection to the data source server might return an error for several reasons. There are actions that you can take to determine why the error occurred.

Symptom

An error is returned when you attempt to connect to the data source.

Cause

There are several possible causes for a connection problem.

Resolving the problem

To troubleshoot data source connection errors, check the following items for problems:

  • Verify that the data source is available.
  • If applicable, ensure that the data source server is configured for incoming connections.
  • Ensure that your user mapping settings for the REMOTE_AUTHID and REMOTE_PASSWORD options are valid for the connections to the data source. Alter the user mapping, or create another user mapping as necessary.
  • If applicable, ensure that the data source client software on the federated server is installed and configured correctly to connect to the data source.
  • For ODBC data sources, ensure that the ODBC driver on the federated server is installed and configured correctly to connect to the ODBC data source server. On federated servers that run Windows, use the ODBC Data Source Administrator tool to check the driver. On federated servers that run UNIX, consult the ODBC client vendor's documentation.
  • Verify that the settings for the variables set on the federated server are correct for the data source. These variables include the system environment variables, the variables in the db2dj.ini file, and the Db2® Profile Registry (db2set) variables.
  • Check your server definition. If necessary, drop the server definition and create it again.
  • For ODBC wrapper, verify whether specifying a schema name is allowed or not when creating a nickname. For example, connecting to MySQL with schema name might return the following error:
    CREATE NICKNAME "NICK2" FOR MYSQL."TESTUSER".TT02
    DB21034E  The command was processed as an SQL statement because it was not a
    valid Command Line Processor command.  During SQL processing it returned:
    SQL1822N  Unexpected error code "HY090" received from data source "MYSQL".
    Associated text and tokens are "The owner 'TESTUSER' was larger than
    SQL_MAX_OWNER_NAME_LE".  SQLSTATE=560BD
    
    Resolution   
        The error will be seen when you specify a SchemaName. Do not specify a SchemaName.