Tuesday, 23 February 2016

How to solve DB2 "User ID revoked" ERRORCODE -4214 in Windows?

If we tried connecting to DB2 using the wrong password, the user account will be locked after the 3rd attempt and we'll receive the following error message:
Could not create connection
    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277)
........
Caused by: com.ibm.db2.jcc.am.SqlInvalidAuthorizationSpecException: [jcc][t4][2017][11253][4.14.137] Connection authorization failure occurred.  Reason: User ID revoked. ERRORCODE=-4214, SQLSTATE=28000
To unlocked the user account:
- Open Control Panel | User Accounts
- Select Manage User Accounts
- Select Advanced tab
- Click Advanced button on the Advanced user management section
- Open Users folder on the pop-up window, double-click on the DB2 user account
- Uncheck the Account is locked out option on the user properties pop-up window

Voila! We can now connect to our DB2.