Oracle User expiration and unlocking

Source: Internet
Author: User

Step 1: Login with Administrator account or DBA authority, such as system account

STEP2: Execute SELECT * from Dba_users where username like '%test% '

Where Account_status is the state.

The state can be divided into two categories: 1. Basic state; 2. Combined state.
Basic Status: 0 OPEN, 1 EXPIRED, 2 EXPIRED (GRACE), 4 LOCKED (TIMED), 8 LOCKED
The following four types are basic: 5 EXPIRED & LOCKED (TIMED), 6 EXPIRED (Grace) & LOCKED (TIMED), 9 EXPIRED & LOCKED, EXPIRED (Grace) & ; LOCKED

1. The open state indicates that the user is in a normal state.
2, locked, and Locked (TIMED) indicate that the user is locked out.

There are two types of users that are locked:
One is that the DBA explicitly locks the user through the SQL statement;
The other is a passive lock, by default if the password is entered incorrectly more than 10 times.


This restriction is controlled by the failed_login_attempts in profile and can be viewed in view dba_profiles.
1) explicitly lock user Locked:alter [username] account lock;
2) Enter 10 times the wrong password after the passive lock locked (TIMED)
3) Expired and expired (GRACE) indicate user password expiration status.

You can use the SELECT * from Dba_profiles where profile= ' DEFAULT ' and resource_name= ' password_life_time ';

View First

Modify Password_life_time in profile to implement password expiration: Alter profile default limit Password_life_time unlimited;


After the password expires, you can also modify the Password_grace_time control in the profile for the number of days used: Alter profile default limit Password_grece_time 180;


4) for users with password expiration open:alter user [username] identified by <password> account unlock;

If you execute ALTER user TEST08 identified by password, it means to change the password of the test08 expired account to password

5) If the account is locked, you need to unlock the command

Alter User Xxxuser identified by Oracle account unlock;

or ALTER USER xxuser account UNLOCK directly;

This article is from the "joyous blog" blog, please be sure to keep this source http://joyous.blog.51cto.com/9184276/1539059

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.