Oracle database account is locked

  • 2021-01-22 05:32:58
  • OfStack

During the Oracle database manipulation, login to the Oracle account failed and the Oracle account was frequently locked. What is the cause of this failure? This article introduces this 1 process, through the process of slowly investigation we can find the cause of the fault.
Let's record the pace of finding this topic.
1. Press the time when the account is found to be locked
sqlplus or sqldeveloper, query account is locked, relevant statement:
Modify the date display pattern for the current session
alter session set nls_date_format = ""yyyy-MM-dd hh24:mi:ss"";
-- query the lock time of the account being locked
username, lock_date dba_users where username like "";
For example, the lock query here is: 20:03:03 by the time

2. Find the oracle installation directory
The oracle installation path of the common sense library of the project team is: C:\devsoftware\oracle11g

3. Find the listening diary
C:\devsoftware\oracle11g\diag\tnslsnr\DEV2-216\listener\trace\listener.log file, this file will record some tracking information of oracle

4. Check the listening diary
After finding the file, the invention is too large to open with editplus. Please upload this file to linux machine or load one tail.exe method on windows machine, follow the order tail-20 listener.log, and see the last 20 lines of the document.

5. Position the topic
According to the above query, the corresponding time status can be found in the diary to locate the operation performed by Oracle at the current time.
01-Aug -2011 20:03:35 * (CONNECT_DATA= (SERVER=DEDICATED) (SERVICE_NAME=portalteam) (PROGRAM=D:\TRS\TRSGateway4.6\gwserver_x64\TrsAgent.exe) (HOST=DEV2-216) (USER=Administrator))) * (ADDRESS = (PROTOCOL = tcp) (HOST = fe80: : e816:9 e03:60 ac: fdaa % 11) (13678) PORT =) * portalteam establish * * 0

6. Summary
As can be seen from above, the reason that caused the Oracle account to be locked was caused by the process "TrsAgent.exe". I thought carefully 1 that we had corrected the password but did not correct the login information of GateWay, so the account often failed to login to Oracle, because we have calculated that the maximum allowable login error times of Oracle is 10, so the account will be locked after exceeding 10 errors.

Related articles: