How to resolve a locked Scott user in oracle_11g (reprint)

Source: Internet
Author: User
Tags sqlplus

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.