Oracle learning 01-ora-28000: the account is locked-Solution

Source: Internet
Author: User

ORA-28000: the account is locked
Step 1: Use PL/SQL. the login name is system, and the database name remains unchanged. When selecting a type, change normal to sysdba;
Step 2: Select myjob to view users;
Step 3: Select system and right-click Edit ";
Step 4: change the password and remove the "account locked" check box;
Step 5: click "application" and then "close ";
Step 6: log on again and you will be able to pass the verification;
Second
Alter User Username account unlock;

Third

In PLSQL developer, the ora-28000 the account is locked is prompted when you log on with Scott/tiger.

Solution:

After Oracle10g is installed, use Scott/tiger for testing. The following error message is displayed:
Oracle10g the account is locked
Oracle10g the password has expired
Cause: Scott of Oracle10g cannot log on by default.
Solution:
(1) Conn sys/sys as sysdba; // Log On As A DBA
(2) alter user Scott account unlock; // then unlock
(3) Conn Scott/tiger // a dialog box is displayed, which allows you to change the password.

Enter cmd in running mode, enter sqlplus in DOS mode, and log on with the System user name. The password is the Oracle password you entered when you installed oracle. After logging on.

SQL> conn sys/sys as sysdba;(The semicolon is required, but I log on to the system. This should not be conn sys/sys as sysdba. Conn system/orcl as sysdba ;)
Connected.
SQL> alter user Scott account unlock;
User altered.
SQL> commit;
Commit complete.
SQL> conn Scott/tiger // enter the new password and confirm the password. OK
Password Changed
Connected.

Then you can log on to PLSQL developer with Scott/tiger .....

Even encountered the ORA-28000: the account is locked error in the Process of database troubleshooting, the detailed processing is as follows for your reference:

1. query the default value of the failed_login_attempts parameter:
Oracle10g(Note: In 9i environment, the value of this parameter is unlimited)

SQL> Conn/As sysdba

Connected.

SQL> DESC dba_profiles;
NameIs it null? Type
---------------------------------------------------------------

ProfileNot null varchar2 (30)
Resource_nameNot null varchar2 (32)
Resource_typeVarchar2 (8)
LimitVarchar2 (40)

SQL> select resource_name, limit from dba_profiles where resource_name = 'failed _ login_attempts ';

Resource_nameLimit
------------------------------------------------------------------------
Failed_login_attempts10

2. Simulate account lock
(Modify the default profile failed_login_attempts = 3 to facilitate the simulation of the lock phenomenon)
A. Modify the parameter failed_login_attempts = 3.

SQL> Conn/As sysdba
Connected.
SQL> alter profile default limit failed_login_attempts 3;

Configuration File changed

SQL> select resource_name, limit from dba_profiles where resource_name = 'failed _ login_attempts ';

Resource_nameLimit
------------------------------------------------------------------------
Failed_login_attempts3

B. Reproduce the wrong Login
Correct Login

SQL> conn jd/JD
Connected.

The first Logon Failed.
SQL> conn jd/Supervisor
Error:
ORA-01017: invalid username/password; logon denied

Warning: you are no longer connected to Oracle.

The second Login Failed.
SQL> conn jd/Ju
Error:
ORA-01017: invalid username/password; logon denied

The third Logon Failed.

SQL> conn jd/JL
Error:
ORA-01017: invalid username/password; logon denied

After three consecutive logon failures, the account is locked

SQL> conn jd/JY
Error:
ORA-28000: the account is locked

3. Unlock

SQL> Conn/As sysdba
Connected.
SQL> alter user JD account unlock;

The user has changed.

4. Solution
(1) You can query the locations where the wrong password or database connection may cause the wrong password during application deployment, and thoroughly query the problem.
(2) modify the parameter failed_login_attempts = unlimited.

SQL> alter profile default limit failed_login_attempts unlimited;

Configuration File changed

SQL> select resource_name, limit from dba_profiles where resource_name = 'failed' _ Lo
Gin_attempts ';

Resource_nameLimit
------------------------------------------------------------------------
Failed_login_attemptsUnlimited

5. extended knowledge points and remarks
(1)Q: What does failed_login_attempts = 3 3 mean? Are the cumulative failures or consecutive failures?
A: failed_login_attempts = 3 indicates the number of consecutive logon failures starting from the first logon failure. Instead of the number of cumulative failures.
The test is as follows:

SQL> Conn/As sysdba
Connected.
SQL> alter profile default limit failed_login_attempts 3;

Configuration File changed

SQL> conn jd/JD
Connected.

The first Logon Failed.
SQL> conn jd/Supervisor
Error:
ORA-01017: invalid username/password; logon denied

Warning: you are no longer connected to Oracle.

The second Login Failed.
SQL> conn jd/GH
Error:
ORA-01017: invalid username/password; logon denied

The logon is correct.

SQL> conn jd/JD
Connected.

The first Logon Failed.
SQL> conn jd/DF
Error:
ORA-01017: invalid username/password; logon denied

Warning: you are no longer connected to Oracle.

The second Login Failed.
SQL> conn jd/SD
Error:
ORA-01017: invalid username/password; logon denied

The third Logon Failed.

SQL> conn jd/FG
Error:
ORA-01017: invalid username/password; logon denied

After three logon failures, the user is locked.

SQL> conn jd/HJ
Error:
ORA-28000: the account is locked

(2)Q: How do I query the current failed_login_attempts value from the database? Dba_profiles is a quota and does not represent the current value. How can I query the failed value?
A: Select name, lcountFrom user $, user $ is the base table of view dba_users. Generally, You can query the base table you are trying to use. Oracle may hide some parameters.

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.