CLI0199E - "Invalid connection string attribute" when running CLI/ODBC application
An application could fail with a CLI0199E - "Invalid connection string attribute." error after migrating from a DB2 v8 client to a DB2 v9.5+ client.
The application is using a connection string that either contains an invalid DB2 CLI keyword or a combination of keywords that are incompatible with each other.
DB2 lists its set of supported ODBC/CLI keywords in its corresponding documentation for v9.5, v9.7, v10.1 and v10.5.
If the keyword is not supported then the CLI/ODBC driver can return that error message.
There are two ways of connecting to a database with a CLI application in DB2. One is to use a data source name (or DSN) and the other is to use a DSN-less connection which requires using keywords such as HOSTNAME, PORT (or SERVICENAME), DATABASE, and PROTOCOL. The DSN-less mechanism allows you to connect to the database without the need of a data source name.
The DB2 CLI driver no longer allows a combination of both keywords and that could result in this error as well. For example if the connection string contained both DSN and HOSTNAME or both DSN and SERVICENAME it could return the "Invalid connection string attribute" error message as well.
Resolving the problem
Modifying the application by removing unnecessary keywords from the connection string should resolve the problem.
More support for:
DB2 for Linux, UNIX and Windows
Programming Interface - CLI
Software version: 9.5, 9.7, 9.8, 10.1, 10.5
Operating system(s): AIX, HP-UX, Linux, Solaris, Windows
Reference #: 1662361
Modified date: 26 June 2014
Translate this page: