Preface: Oracle database comes with many users, such as SYSTEM, SYS, and Scott, but by default, Oracle only understands locks on 5 of these users: SYS, SYSTEM, Dbsnmp, Sysman, and Mgmt_view, respectively. Other users are locked. In order to learn from Oracle later, it is necessary to understand the lock status of Oracle users and how to unlock them.
Here are the specific procedures:
1, The default Scott user is locked, first unlock will be able to log on. Use the following statement to unlock Scott:
Alter user scott account unlock;
You may be asked for this password after unlocking:
Alter User by Tiger;
Re-login:
Sqlplus Scott/Tiger
We can land.
2. Oracle lock and Unlock commands for users
Sql> Conn/as SYSDBA
is connected.
Scott user does not log on when Tieger default password is not set
How to lock a user:
SQL>alteruser test account lock;
The user has changed.
-------test user logged into the database and failed.
C: \>sqlplus test/testerror:ora-28000is locked
Ways to unlock Oracle users:
SQL>/ as sysdbasql>alteruser test Account Unlock
The user has changed. This completes the user unlock operation for Oracle.
Oracle User Unlocked