Oracle lock and Unlock commands for users

Source: Internet
Author: User
Tags sqlplus

Ext.: http://database.51cto.com/art/200910/158576.htm

In the daily work of the DBA, the operations that are unlocked for the Oracle user are often encountered, and this article gives an operation method for unlocking the Oracle user under the command line, which can be accomplished with a few simple unlocking statements. Here are the specific procedures:

The default Scott user is locked out and can be logged on by unlocking it first. Use the following statement to unlock Scott:

Alter user Scott account unlock;

You may be asked for this password after unlocking:

Alter user Scott identified by Tiger;

Re-login:

Sqlplus Scott/tiger

We can land.

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> ALTER user test account lock;

The user has changed.

-------test user logged into the database and failed.
C:\>sqlplus test/test

ERROR:
Ora-28000:the
account is locked

Ways to unlock Oracle users:

Sql> Conn/as SYSDBA
sql> alter user test account unlock;

The user has changed. This completes the user unlock operation for Oracle.

Oracle lock and Unlock commands for users

Related Article

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.