返回顶部
首页 > 资讯 > 数据库 >sqlplus登录用户hang住
  • 275
分享到

sqlplus登录用户hang住

摘要

环境oracle 11.2.0.4, linux redhat 6.9  RAC2个实例 1.问题现象 sqlplus登录用户hang住 [email protected] ~]$ sqlplus wa/Sx SQL*Plus: Rel


	sqlplus登录用户hang住
[数据库教程]

环境oracle 11.2.0.4, linux redhat 6.9  RAC2个实例

1.问题现象

sqlplus登录用户hang住

[email protected] ~]$ sqlplus wa/Sx

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jul 23 09:47:40 2020

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/passWord; loGon denied

2.排查异常情况

PROGRAM         USERNAME   OSUSER    SQL_ID      MacHINE   STATUS S_TIME    EVENT
------------------------- ----- ------- -------------- -------- -------------- ---------
JDBC Thin Client           admin           osx-scp001xx ACTIVE        library cache lock
JDBC Thin Client           admin           osx-scp001xx ACTIVE        library cache lock
JDBC Thin Client           admin           osx-scp001xx ACTIVE        library cache lock
[email protected] (TNS V  root               localhost    ACTIVE        library cache lock
[email protected] (TNS V  root               localhost    ACTIVE        library cache lock
[email protected] (TNS V  root               localhost    ACTIVE        library cache lock
[email protected] (TNS V  root               localhost    ACTIVE        library cache lock
[email protected] (TNS V  root               localhost    ACTIVE        library cache lock
[email protected] (TNS V  root               localhost    ACTIVE        library cache lock
[email protected] (TNS V  root               localhost    ACTIVE        library cache lock

检查RAC 2个节点,ACTIVE的Session都是啥event,可以发现是library cache lock
1. 会话等待事件是library cache lock
2. ???USERNAME 都是null?
3. 为啥没有library cache pin ? or 其它的等待事件!!!

3.观察AWR报告

SQL> begin
  2   dbms_workload_repository.create_snapshot();
  3   end;
  4  /
PL/SQL procedure successfully completed.
技术图片
观察 connect xxx   99%!!!

--关闭错误输入密码时的密码延迟验证特性,避免用户持续输入错误密码时产生大量的library cache lock等待,严重时使数据库完全不能登录

alter system set event=‘28401 trace name context forever,level 1‘,‘10949 trace name context forever,level 1‘ scope=spfile;

 

In 11g there is an intentional delay between allowing failed logon
attempts to retry. For some specific application types this can cause
a problem as the row cache entry is locked for the duration of the
delay . This can lead to excessive row cache lock waits for DC_USERS
for specific users / schemas .
 
This "fix" allows the logon delay to be disabled in 11.2.0.1 onwards
by setting event 28401 in the init.ora.
eg:
    event="28401 trace name context forever, level 1" # disable logon delay.
This "event" will disable the logon sleep delay system-wide, 
ie. it will affect all user accounts, system-wide, and so should be used
    with extreme caution.

观察上述信息,可以了解到问题的原因,需要确认!
1.关闭监听,组织新的会话连接;
$ srvctl stop listener
2.杀掉已连接的会话

select ‘alter system kill session ‘‘‘||sid||‘,‘||serial#||‘‘‘ immediate;‘ as "sql_text" from v$session where event=‘library cache lock‘;

3.测试确认是密码错误【已掌握密码】
会话均不存在后,测试登录是等待一段时间可以出现报错信息,而非Hang住

ERROR:
ORA-01017: invalid username/password; logon denied

  4.修改密码即可!

SQL> alter user wxx identified by "Sxx1";

  5.启动监听

$ srvctl start listener

!如果想后续再次出现同样的问题,可以设置上述Event,本次由于是稳定的生产环境,极少出现,因此并未设置event.

sqlplus登录用户hang住

原文地址:https://www.cnblogs.com/lvcha001/p/13381682.html

您可能感兴趣的文档:

--结束END--

本文标题: sqlplus登录用户hang住

本文链接: https://lsjlt.com/news/7525.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作