ORA-28000: The account is locked

Introduction

Understanding ORA-28000 Error

Checking the Locked Accounts in Oracle

To identify which accounts are locked, use the following SQL query:

SELECT username, account_status FROM dba_users WHERE account_status = 'LOCKED';

Unlocking an Oracle Account

1. Unlocking a User Account via SQL*Plus

ALTER USER username ACCOUNT UNLOCK;

2. Resetting the User Password and Unlocking

ALTER USER username IDENTIFIED BY newpassword ACCOUNT UNLOCK;

3. Modifying the Failed Login Attempts Policy

SELECT profile, resource_name, limit FROM dba_profiles WHERE resource_name = 'FAILED_LOGIN_ATTEMPTS';
ALTER PROFILE default LIMIT FAILED_LOGIN_ATTEMPTS 10;

4. Unlocking Using Enterprise Manager

If you prefer a GUI method, use Oracle Enterprise Manager (OEM):

  1. Log in to Oracle Enterprise Manager.
  2. Navigate to Security > Users.
  3. Select the locked user and click Unlock Account.
  4. Optionally, reset the password if required.

5. Checking If the Password Has Expired

SELECT username, expiry_date FROM dba_users WHERE username = 'username';
ALTER USER username IDENTIFIED BY newpassword;

Preventing Future Account Locks

1. Adjusting Password Policies

Modify the password policy settings to reduce the chance of frequent locks:

ALTER PROFILE default LIMIT PASSWORD_LIFE_TIME UNLIMITED;

2. Monitoring Failed Login Attempts

Regularly monitor failed login attempts using the Oracle Audit Trail:

SELECT username, timestamp FROM dba_audit_session WHERE returncode = 1017;

3. Implementing Account Lockout Alerts

4. Educating Users on Strong Password Practices

  • Use complex passwords.
  • Store credentials securely.
  • Avoid multiple incorrect login attempts.

Conclusion for ORA-28000

Read Also

How to Resolve ORA-011033: ORACLE initialization or shutdown in progress

FAQs

1. Why is my Oracle account locked?

2. How do I check if my Oracle account is locked?

Run the following SQL query:

SELECT username, account_status FROM dba_users WHERE account_status = 'LOCKED';

3. How can I prevent my Oracle account from getting locked?

4. Can a non-DBA user unlock their account?

No, only a DBA or a user with appropriate privileges can unlock an Oracle account.

Previous Post
Next Post

Leave a Reply

Your email address will not be published. Required fields are marked *