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最大游标数

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

  • 相关阅读:
    线段树&&线段树的创建线段树的查询&&单节点更新&&区间更新
    树&二叉树&&满二叉树&&完全二叉树&&完满二叉树
    Git学习记录 力做全网最强入门教程
    Markdown测试
    [转载] c++对结构体数组排序
    c/c++ 中#ifndef和#endif的作用及使用
    交互题(apio2016Gap)
    linux下对拍
    CTSC2017密钥、吉夫特
    省队十连测
  • 原文地址:https://www.cnblogs.com/yangpeng-jingjing/p/8391771.html
Copyright © 2011-2022 走看看