1. Determine if the account is locked by failed password attempts. When the failed attempts equals the max logon attempts set in the user’s profile, the user will be displayed in the results. This is a good query, but will not work in all cases, depending on how the profile was setup.
SELECT DBC.USERS.USERNAME, DBC.USERS.LOCKEDDATE, DBC.USERS.LOCKEDTIME, DBC.USERS.LOCKEDCOUNT FROM DBC.USERS INNER JOIN DBC.PROFILES ON DBC.USERS.PROFILENAME = DBC.PROFILES.PROFILENAME WHERE DBC.USERS.LOCKEDCOUNT >= DBC.PROFILES.MAXLOGONATTEMPTS;
2. The SQL statement to unlock the account.
MODIFY USER <user> AS RELEASE PASSWORD LOCK;
3. Rerun the query to verify that the account is no longer in the results.