Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-2800: account is locked error in qtp

Tags:

oracle

odbc

qtp

I am getting the following error while connecting to db for checking db timings through QTP scripts:

"Cannot update system time with database time due to error: ERROR: [Oracle][ODBC][Ora]ORA-28000: the account is locked"

But the database SID and credentials given are correct and verified the same in some db client. I am not sure why its throwing error in QTP?

Can anyone please help me resolve the issue?

like image 577
Bharath Krishnamurthy Avatar asked Dec 12 '22 21:12

Bharath Krishnamurthy


1 Answers

1) Login to your Oracle Database using admin privileges:

cmd> sqlplus / as sysdba

or

cmd> sqlplus system/{systemPassword}@{OracleSID}

2) Unlock your user's account using the following command:

sql> alter user {yourDbUser} account unlock;

3) Still in SQL*Plus command prompt, prevent account locks to not occur again:

sql> ALTER PROFILE "DEFAULT" LIMIT PASSWORD_LIFE_TIME UNLIMITED;

sql> ALTER PROFILE "DEFAULT" LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED;

Edit due comment

The above instructions should solve your problem. I'm posting an additional command I've found related to this subject you can try (I'm not confident it is the solution though):

sql> grant connect, resource to {yourDbUser};

You can also check for the status of other locked users in your database. Maybe your tool is trying to connect with some other user that, besides the one you are using, still have this issue.

like image 187
J.Hudler Avatar answered Jan 04 '23 21:01

J.Hudler