Transferred from: http://www.2cto.com/database/201402/277206.html
Modifying a locked user in Oracle 11g: Scott
After installing oracle11g and creating the Oracle database, you want to log in with the user Scott that comes with the database to see if the connection is successful.
In the cmd command, when you log in with "Sqlplus Scott/tiger",
Always prompt the following information: error:ora-28000: The account has been locked.
At the cmd command prompt, you can log in directly to Oracle and enter the following command:
Sqlplus/as Sysdba;
Then execute the following command:
sql> alter user Scott account unlock;
Shows that the user has changed so that the unlocked operation is complete.
Next, you can also reset the password to the Scott user.
Change Scott's login password
Sql> alter user Scott identified by grace;
Show that the user has changed, (Grace is the new password) so it's OK,
Test if Scott/grace can log in successfully
Sql> Conn Scott/grace display is connected.
A small summary of the beginner Oracle database:
Enter Sqlplus in the cmd command to connect to the database.
The format is: Sqlplus username/password
such as: Sqlplus Scott/tiger;
Enter conn in SQL Plus to connect to the database.
The format is: sql> conn username/password
such as: Conn Scott/tiger;
In SQL Plus, modify the normal user password,
The format is: Alter user username identified by password
such as: Alter user Scott identified by test;
Code to lock and unlock users in Oracle:
Sql> ALTER user username account lock; (locking)
Sql> alter user username account unlock; (unlock)