When the database was created, a password was already set for 4 accounts such as SYS, where SYS and system had administrator privileges to log into the Oracle database using the SYSTEM account in the Sql*plus tool.
1, through the data dictionary dba_users, check the lock status of the Oracle account, as follows: (v wherein, open indicates that the account is unlocked, expired indicates that the account is out of date (need to set a password to dismiss this state); locked indicates that the account is locked. )
Second, use the ALTER USER statement below to unlock the Scott account:
Sql> ALTER USER Scott account UNLOCK;
Then use the ALTER USER statement to set the password for the Scott account as follows:
Sql> ALTER USER Scott identified by Tiger;
View the current status of the Scott account via the data dictionary dba_users as follows: The results of the query show that the Scott account has been successfully unlocked. When using data dictionary dba_users, be aware that the values of their fields are case-sensitive.
How to unlock an Oracle account