Database users should not be locked

Source: Internet
Author: User

Database users should not be locked

1) view the default number of database locks

[SQL]
  1. SQL>SetLinesize 2000
  2. SQL>Select*FromDba_profilesWhereResource_nameLike 'Failed _ LOGIN_ATTEMPTS %';
  3. PROFILE RESOURCE_NAME RESOURCE LIMIT
  4. --------------------------------------------------------------------------------------------------------------
  5. DEFAULTFAILED_LOGIN_ATTEMPTSPASSWORD10
  6. MONITORING_PROFILE FAILED_LOGIN_ATTEMPTSPASSWORDUNLIMITED
We can see from the above that the database is locked after 10 retries

2) view the last locked time

[SQL]
  1. SQL>SelectLOCK_DATE, usernameFromDba_usersWhereUsername ='Jscn';
If the value of LOCK_DATE is null, it indicates that it is not locked. If the value is not empty, it indicates that it is locked.

LOCK_DATE, username
-----------------------------------
13:36:10 JSCN

3) set the default logon times of the system.

[SQL]
  1. SQL>AlterProfileDEFAULTLimit FAILED_LOGIN_ATTEMPTS 10;-- Retries 10 locks in a row
  2. Profile altered.
  3. SQL>AlterProfileDEFAULTLimit FAILED_LOGIN_ATTEMPTS UNLIMITED;-- Do not lock
  4. Profile altered.

4) Unlock

[SQL]

  1. SQL>Alter UserJscn account unlock;
  2. UserAltered.

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.