Query the user status in Linux and unlock the Locked User

Source: Internet
Author: User

Query the user status in Linux and unlock the Locked User

1. If the current user is a root user, switch to the Oracle user first, enable sqlplus, and assign the dba role.

[Oracle @ oa2RedHat ~] $ Sqlplus/nolog

SQL * Plus: Release 11.2.0.1.0 Production on Fri Oct 10 16:41:26 2014

Copyright (c) 1982,200 9, Oracle. All rights reserved.

SQL> conn/as sysdba;
Connected.
SQL> select username, account_status from dba_users;

Obtain the following menu list, find the user you want, and view the status of the user. If locked, execute the following command to unlock

SQL> alter user test account unlock;

Of course, you can also use the plsql client tool to remotely connect to the database you want to unlock, use the dba role, and then perform the unlock operation on the graphical interface. This is relatively simple.

This article permanently updates the link address:

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.