Bharath Krishnamurthy
Bharath Krishnamurthy

Reputation: 41

ORA-2800: account is locked error in 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?

Upvotes: 4

Views: 19183

Answers (2)

user3110281
user3110281

Reputation: 11

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;

Upvotes: 1

J.Hudler
J.Hudler

Reputation: 1258

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.

Upvotes: 12

Related Questions