zoukankan      html  css  js  c++  java
  • Oracle最大游标数控制

    /***********************************************************************
    * ********
    * Oracle最大游标数控制 ******
    * ***
    *************************************************************/

    select * from v$session where username is not null

    select username,count(username) from v$session where username is not null group by username --#查看不同用户的连接数

    select count(*) from v$session --连接数

    Select count(*) from v$session where status='ACTIVE' --#并发连接数

    show parameter processes --最大连接

    alter system set processes = value scope = spfile;--重启数据库 #修改连接

    show parameter open_cursors; --查看最大游标数

    select count(*) from v$open_cursor; --查看当前游标数

    select * from v$open_cursor;

    SELECT * FROM V$OPEN_CURSOR O WHERE O.SID = (SELECT SID FROM (SELECT O.SID, OSUSER, MACHINE, COUNT(*) NUM_CURS
    FROM V$OPEN_CURSOR O, V$SESSION S
    WHERE O.SID=S.SID
    GROUP BY O.SID, OSUSER, MACHINE
    ORDER BY NUM_CURS DESC) T WHERE ROWNUM = 1);--查看最大回话跟着所有游标信息

    select o.sid, osuser, machine, count(*) num_curs
    from v$open_cursor o, v$session s
    where user_name = 'LDDBA' and o.sid=s.sid
    group by o.sid, osuser, machine
    order by num_curs desc;

    alter system set open_cursors=1000 scope=both; --修改Oracle最大游标数

    /*************************************************************
    *************************************************************/

  • 相关阅读:
    SpringCloud(四)GateWay网关
    C++中的间接宏函数
    一个C++引用库的头文件预编译陷阱
    谈谈C++中的数据对齐
    在C++中实现aligned_malloc
    WPF中的DesignerProperties
    在.NET 6中使用DateOnly和TimeOnly
    在 Ubuntu 上安装 .NET SDK 或 .NET 运行时
    Microsoft Build 2021第二天
    Microsoft Build 2021大会开始后,Develop Blog一系列更新
  • 原文地址:https://www.cnblogs.com/yangpeng-jingjing/p/8391771.html
Copyright © 2011-2022 走看看