Getting 'Incorrect username or password' or 'unknown error' while connecting to the IBM DB2 connector connection.

Getting 'Incorrect username or password' or 'unknown error' while connecting to the IBM DB2 connector connection.

book

Article ID: KB0081527

calendar_today

Updated On:

Products Versions
Spotfire Connector for IBM DB2 All Versions

Description

While connecting to the IBM DB2 connection, if you are getting any error like 'Incorrect username or password' or 'unknown error' then check the Spotfire Analyst/Web Player logs. After reviewing the Spotfire Analyst/Web Player logs for more detail information, if you are getting the below error then follow the resolution section:

-------------------------------------------------------
System.Data.Odbc.OdbcException (0x80131937): ERROR [IM004] [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
   at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
   at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.Odbc.OdbcConnection.Open()
   at Spotfire.Dxp.Data.Adapters.DB2.DB2AdapterConnection.TryOpenConnection(OdbcConnection connection)
2018-05-09T19:31:48,931+05:30 2018-05-09 14:01:48,931 1 [Main Thread] ERROR Spotfire.Dxp.Forms.Data.Access.AsynchronousTaskManager [(null)] - Background task failed.
Could not connect due to an unknown error.
External error:
ERROR [IM004] [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
--------------------------------------------------------

Issue/Introduction

Getting 'Incorrect username or password' or 'unknown error' while connecting to the IBM DB2 connector connection.

Environment

All Supported OS

Resolution

Follow the below steps to resolve the issue:

1) Check whether the entered database username and password is correct. You can verify it by making use of any 3rd party tool like Dbvisualizer, Squirrel SQL.

2) If username and password is correct then make sure to add the userid of the database to either the DB2ADMNS or DB2USERS group of the database.

3) If still you are facing then check the desired Spotfire Analyst/Web Player logs to verify that if you have multiple IBM DB2 ODBC driver installed. Below is the snapshot of the Spotfire Analyst logs:

-----------------------------------------------------------------
Spotfire.Dxp.Data.Adapters.Internals.Common.Configurations [(null)] - Loading ODBC driver information for IBM DB2 (IBM DB2 ODBC DRIVER)
2018-05-09T19:17:22,196+05:30 2018-05-09 13:47:22,196 sfadmin [Main Thread] DEBUG Spotfire.Dxp.Data.Adapters.Internals.Common.Configurations [(null)] - Found 2 matching drivers for IBM DB2 (IBM DB2 ODBC DRIVER - DB2COPY1,IBM DB2 ODBC DRIVER)
-----------------------------------------------------------------  

For Spotfire Analyst, uninstall anyone of the IBM DB2 ODBC driver from the Spotfire Analyst machine and once it is done,relaunch Spotfire Analyst. 
For Web Player, Uninstall anyone of the IBM DB2 ODBC driver from the Node Manager machine and restart the Node Manager Service.

Additional Information

http://www-01.ibm.com/support/docview.wss?uid=swg21229860

http://support.spotfire.com/sr_spotfire_dataconnectors.asp#db2