➤ EMP DEPT Tables Queries
➤ Set Operators in Oracle
➤ CREATE command
➤ RENAME command
➤ DROP command
➤ Default Value in Column
➤ ABS() in Oracle SQL
➤ CEIL() in Oracle SQL
➤ SYSDATE in Oracle
➤ Trunc Oracle date
➤ TO_CHAR() in Oracle
➤ GROUP BY Clause
➤ Having Clause
➤ ORDER BY Clause
➤ Constraints in Oracle
➤ Rename Constraint
➤ Disable Constraint
➤ Drop Constraint
➤ NOT NULL Constraint
➤ UNIQUE Constraint
➤ PRIMARY KEY Constraint
➤ FOREIGN KEY Constraint
➤ CHECK Constraint
➤ Unlock User in SQL Plus
➤ Find SID in Oracle database
➤ Check Database Version
➤ Check Database Size
➤ Error ORA 01031
How to unlock Scott user in SQL Plus | In the Oracle database, the Scott user is having some important tables, which is very useful for beginners to learn the Oracle database. At the time of the oracle installation, we can unlock the Scott user. But if you didn’t unlock the Scott user at the installation time then after installing, we can unlock it.
Open Oracle database using SQL plus. Search “SQL plus” in the window search bar and open it. The default password for the scott
user is “tiger”.
username: scott
password: tiger
ORA-28000: the account is locked
If you are also getting this, it means you have to unlock the Scott user account. To unlock the Scott user, you need to sign in as admin (administrator),
username: \sys as sysdba
password: sys
Now, execute the below query to unlock the user,
SQL> alter user scott account unlock;
Using above query you can unlock any user, just replace the user name with scott in this query.
Now, scott user is unlocked and you can sign in with scott user. Currently the default password for the scott user is:- “tiger”. If you wish then you can change the password and assign your own password, else assign “tiger” as new password (Since you are beginner so it will be easy to remember the default password).
SQL> conn scott/tiger
Enter password: type_your_password
Conform password: type_your_password
Now, let us see all the above process in the singe window, Unlock scott user in SQL Plus,
SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 20 12:18:53 2020
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: scott
Enter password:
ERROR:
ORA-28000: the account is locked
Enter user-name: \sys as sysdba
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter user scott account unlock;
User altered.
SQL> conn scott/tiger
ERROR:
ORA-28001: the password has expired
Changing password for scott
New password:
Retype new password:
Password changed
Connected.

Command to unlock the Oracle database user accounts.
SQL> alter user USERNAME account unlock;
Command to lock the Oracle database user accounts.
SQL> alter user USERNAME account lock;
You can use this SQL command to change the password and unlock an account at the same time:
SQL> alter USERNAME identified by PASSWORD account unlock;
If you enjoyed this post, share it with your friends. Do you want to share more information about the topic discussed above or do you find anything incorrect? Let us know in the comments. Thank you!
Read also,
Great content! Super high-quality! Keep it up! 🙂