How do you unlock a user in Oracle?
Daniel Johnson
Published Feb 28, 2026
How do you unlock a user in Oracle?
Using SQL*Plus to Unlock Accounts and Reset Passwords
- Log in as the Oracle Database software owner user.
- Set the ORACLE_HOME and ORACLE_SID environment variables.
- Start SQL*Plus and log in as the SYS user, connecting as SYSDBA:
- To unlock an account:
- To reset the password:
How do you lock and unlock a user in Oracle?
To lock an Oracle user account, you can use the following command: alter user username account lock; To unlock the user, simply replace ‘lock’ with ‘unlock.
How do I unlock a SQL account?
Open Server Management Studio, connect to the server and go to the Security –> Logins item in Object Explorer. Select the login that is locked out and double-click on it. The Status page should let you re-enable the login (uncheck the “Login is locked out” box).
How do you check if a user is locked in Oracle?
Log in as oracle user. Verify if any database schema user account is locked by using the following command: $ select username, account_status from dba_users where username like ‘PV%’;
How do you unlock a user in a database?
Using SQL*Plus to Unlock Accounts and Reset Passwords
- Start SQL*Plus and log in as the SYS user, connecting as SYSDBA: Copy $ $ORACLE_HOME/bin/sqlplus SQL> CONNECT SYS as SYSDBA Enter password: sys_password.
- Enter the command ALTER USER account IDENTIFIED BY password ACCOUNT UNLOCK; to unlock an account. Note:
Who locked user Oracle?
If an oracle user is locked, it is usually caused by an incorrect password entry. In some cases, even if you remove the user’s lock with the help of the following script it will lock again after a while. SQL> alter user ADURUOZ account unlock; User altered.
Why is my Oracle account locked?
If an oracle user is locked, it is usually caused by an incorrect password entry. SQL> alter user ADURUOZ account unlock; User altered. This is usually due to an application server that attempts to log in with the old password.
What is account lock in Oracle?
Oracle locks the protect user account after too many failed attempts to log in to DLP Enforce. This can occur during installation or when changing a password.
How do you unlock a database user?
Why is SA account locked out?
If the SA account is locked down you may receive the error message “Login failed for user ‘sa’ because the account is currently locked out. The system administrator can unlock it. When password policy is checked for a SQL Server login account, your account will get locked out after too many failed login attempts.
How do I find my SYS password in Oracle 12c?
Lost SYS password Tips
- login oracle user.
- cd $ORACLE_HOME/network/admin.
- ed(vi) file sqlnet.ora.
- Remark by # at begining of line. SQLNET.AUTHENTICATION_SERVICES = (NONE) => #SQLNET.AUTHENTICATION_SERVICES = (NONE)
- sqlplus /nolog or (svrmgrl) command.
- connect sys as sysdba, or connect internal.
How long is Oracle account locked?
The default lockout time is 60 minutes. Alternatively, you can require that only an account administrator can unlock the user.