Oracle database user account is in expired state how to handle

Source: Internet
Author: User

Account expires, the user must change the password, the account can be reused.

But sometimes, because of various reasons, we do not know the original password of the plaintext is what, but many times can not modify the existing password, fortunately, 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                          Opensystem                         expiredsql> Select password from dba_users where username in (' SYSTEM ', ' SCOTT '); PASSWORD------------------------------

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

Sql> Select User#,name,password,astatus from user$ where name in (' SYSTEM ', ' SCOTT ');     user# NAME                           PASSWORD                          astatus---------------------------------------------------------------------------- ----        f894844c34402b67 SCOTT                        0         5 SYSTEM                         2D594E86F93B17A1                        

Through the above query results, with the original password to modify the password of the 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---------------------------------------------------------------------------- ----        f894844c34402b67 SCOTT                        0         5 SYSTEM                         2D594E86F93B17A1                        

In fact, you can directly modify the table user$ field Astatus to 0, so that the user account will become open state.
Astatus the meaning of the corresponding value can be viewed with 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        

Oracle database user account is in expired state how to handle

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.