Oracle Error: ora-28001:the password have expired workaround

Source: Internet
Author: User
Tags dba

Oracle TIP error message ora-28001:the password has expired is due to the new features of oracle11g, oracle11g the default password expiration limit when creating a user is 180 days (that is, 6 months). If the user password has not been modified for more than 180 days, the user cannot log on. Oracle has introduced this default feature in 11G for database security by default, but this default feature is easily overlooked by DBAs or developers,
This problem occurs once the password has not been modified for 180 days.
There are two ways to resolve this:
The workaround is to use the following SQL statement
Note: You first need to log in with a DBA.
Run the Sqlplus command-line tool and enter:
Connect as SYSDBA;
Enter the DBA's user name and password.
SELECT * from Dba_profiles WHERE profile= ' DEFAULT ' and resource_name= ' Password_life_time '
The validity period of the password is set, and the Limit field is the valid number of days.
Method One:
The password can be modified by the following statement when the password is about to expire or expires, and the user can connect to the database properly after the password has been modified.
ALTER user username identified by password;

Method Two:
If you want to remove the 180-day password lifetime limit, you can turn it off by using the following SQL statement
ALTER profile DEFAULT LIMIT password_life_time UNLIMITED
As on the SQL statement, the password validity period default value of 180 days is modified to "unlimited". But for database security reasons,
It is not recommended to set the Password_life_time value to unlimited, we recommend that you periodically modify the database user password.

Oracle Password expires the password has expired solution
Oracle appears the password has expired this problem, today suddenly found that the project can not access, a search found not used, also can not go in,
This issue is caused by the reason that the oracle11g password expires
An exception occurred while debugging a Web project:
[Java] View plaincopyprint?
java.sql.sqlexception:ora-28001:the Password has expired
Check online, connect Oracle, log in as Oracle user, enter the following command
[SQL] View plaincopyprint?


SELECT * from Dba_profiles where profile= ' DEFAULT ' and resource_name= ' password_life_time ';
The results show:
Profile
------------------------------------------------------------
Resource_name
------------------------------------------------------------
Resource_type
----------------
LIMIT
------------------------------------------------------------

DEFAULT
Password_life_time
PASSWORD
180


The result shows that the password is valid for 180 days
Enter the command:
Alter profile default limit Password_life_time unlimited;
Commit

Execute again:
SELECT * from Dba_profiles where profile= ' DEFAULT ' and resource_name= ' password_life_time ';
The results are shown as:

[SQL] View plaincopyprint?

Profile
------------------------------------------------------------
Resource_name
------------------------------------------------------------
Resource_type
----------------
LIMIT
------------------------------------------------------------

DEFAULT
Password_life_time
PASSWORD
UNLIMITED

You need to change the password after doing the above steps, or else the password has expired exception will appear???

command to change Password
Alter user xxxuser identified by Welcome1;
If the account is locked, you need to unlock the command
Alter user Xxxuser identified by Oracle account unlock;
Problem solving

Note: The contents of the essay are from the online data collation, for reference only.

Oracle Error: ora-28001:the password have expired workaround

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.