Solution for Oracle Database User Account being expired

Source: Internet
Author: User

Solution for Oracle Database User Account being expired

The Oracle database account has expired. You must change the password before you can use it again.

But sometimes, for various reasons, we do not know what the plain text of the original password is, but we often cannot modify the existing password. Fortunately, we can use the original password to change the password.

In 11G, dba_users.password no longer displays the user's password:

SQL> select username, ACCOUNT_STATUS from dba_users where username in ('system', 'Scott ');

USERNAME ACCOUNT_STATUS

--------------------------------------------------------------

SCOTT OPEN

SYSTEM EXPIRED

SQL> select password from dba_users where username in ('system', 'Scott ');

PASSWORD

------------------------------

In the system table user $, you can view the user's PASSWORD and status (ASTATUS)

SQL> select user #, name, password, astatus from user $ where name in ('system', 'Scott ');

USER # NAME PASSWORD ASTATUS

--------------------------------------------------------------------------------

83 SCOTT F894844C34402B67 0

5 SYSTEM 2D594E86F93B17A1 1

SQL>

You can use the previous query result to change the password of an expired user:

SQL> alter user system identified by values '2d594e86f93b17a1 ';

User altered.

SQL> select user #, name, password, astatus from user $ where name in ('system', 'Scott ');

USER # NAME PASSWORD ASTATUS

--------------------------------------------------------------------------------

83 SCOTT F894844C34402B67 0

5 SYSTEM 2D594E86F93B17A1 0

SQL>

In fact, you can also directly modify the table user $ field ASTATUS to 0, so that the user account becomes open.
The meaning of the value corresponding to ASTATUS can be viewed through user_astatus_map.

SQL> select * from user_astatus_map;

STATUS # STATUS

------------------------------------------

0 OPEN

1 EXPIRED

2 EXPIRED (GRACE)

4 LOCKED (TIMED)

8 LOCKED

5 EXPIRED & LOCKED (TIMED)

6 EXPIRED (GRACE) & LOCKED (TIMED)

9 EXPIRED & LOCKED

10 EXPIRED (GRACE) & LOCKED

9 rows selected.

SQL>

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.