ORA-2800: account is locked error in qtp
Solution 1
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.
Solution 2
This solution is for Oracle 10g and error ORA-28000:the account is locked Type in the SQL Command Line:
conn sys as sysdba
enter password
alter user system account unlock;
Related videos on Youtube
Bharath Krishnamurthy
Updated on September 15, 2022Comments
-
Bharath Krishnamurthy over 1 year
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 inQTP
?Can anyone please help me resolve the issue?
-
Bharath Krishnamurthy over 11 yearsThank you for your response. The account is not actually locked because I am able to connect to db using sql client. Any thoughts ?
-
J.Hudler over 11 years@user1799868 - I've complemented my answer with "what would I do" follow-ups.
-
Bharath Krishnamurthy over 11 yearsThank you Hudler. You are right. My bad, I was doing wrong call through my framework. Recently the production database schema arrangement were changed and automation framework does not support this change. So I will have to make some change to the framework :)
-
J.Hudler over 11 yearsI'm glad I could help. If you confirm that my answer pointed you to the solution, I would appreciate you to flag it as accepted :)
-
J.Hudler about 10 years@PedroMorteRolo: The context is given by the prefixes
cmd>
for command-prompt andsql>
for the SQL*Plus command-line.