DBAs often unlock oracle users in their daily work.ArticleThe command line is used to unlock oracle users. Several Simple unlock statements can be used to unlock oracle users. The specific process is as follows:
Scott users are locked by default, and they can be unlocked first to log on to the land. Use the following statement to unlock SCOTT:
Alter user Scott account unlock;
This password may be required after unlocking:
Alter user Scott identified by tiger;
Log On again:
Sqlplus Scott/Tiger
You can log on.
Oracle commands for locking and unlocking users
SQL> Conn/As sysdba is connected. // Scott cannot log on when the default tieger password is not set.
How to lock a user:
SQL> alter user test account lock;
The user has changed.
------- The test user fails to log on to the database. C: \> sqlplus test/test
Error: ORA-28000: the account is locked
How to unlock an oracle user:
SQL> Conn/As sysdba SQL> alter user test account unlock;
The user has changed. This completes the Oracle user unlocking operation.