#查看用户cursor的使用情况
col sid for a9999999999
col osuser for a20
col machine for a20
col num_curs for a9999999999 select o.sid,osuser,machine,count(*) num_curs
from v$open_cursor o , v$session s
where username ='&username'
and o.sid=s.sid
group by o.sid ,osuser,machine
ordre by num_curs desc ;

Troubleshooting :
    1. Check the value of the OPEN_CURSORS parameter

2. A DBA can use the V$OPEN_CURSOR view to see what cursors are in use at any point in time in each session

3. If it is proving difficult to identify the reason for the ORA-1000 error then it is possible to get the user session to generate a trace file when the error occurs by setting the following event either in affected sessions or systemwide:
       For the current session:
          ALTER SESSION SET EVENTS '1000 trace name errorstack level 3';
          --OR--
       Systemwide:
           ALTER SYSTEM SET EVENTS '1000 trace name errorstack level 3';

This event will cause a trace file to be written by a session the first time it hits an ORA-1000. Provided MAX_DUMP_FILE_SIZE is large enough this trace should help identify what cursors in the session are being used for and hence help identify the cause of the ORA-1000.
(See Note:75713.1 for important information about setting events)

Warning :
              Although ORA-1000 can often be tackled by increasing OPEN_CURSORS it is not sensible to just keep increasing this value as open cursors hold resources. Eg: If you have increased OPEN_CURSORS up to several hundred then it may be better to identify what all the cursors are for rather than just blindly increasing OPEN_CURSORS further.

 
 
 
通过trace 文件分析 找到相应SQL(设置trace 后让业务跑程序,使问题再现)
        alter system set event '1000 trace name errorstack level 3' ;
      
        alter system set event  '1000 trace name errorstack off ' ; 
最后,定位是业务在批量处理数据,导至cursor不足。 

最新文章

  1. L1-009. N个数求和
  2. C语言创建及解析Json的使用法则
  3. 回顾yii的学习进程 总结了一下的发展过程
  4. Eclipse 代码自动补全配置方法
  5. PL/0编译器(java version)–PL0.java
  6. myEclipse下安装SVN插件
  7. 关于“怎么比较两个SQL查询语句产生的结果集是否相同”搜集到的一些资料
  8. 知方可补不足~CSS中的几个伪元素
  9. Mysql对自增主键ID进行重新排序
  10. Akka(11): 分布式运算:集群-均衡负载
  11. CF Round#436 div2
  12. 【NOIP2015】子串(动态规划)
  13. 【Android 应用开发】Android游戏音效实现
  14. 关系数据库数据与hadoop数据进行转换的工具 - Sqoop
  15. Jquery密码强度校验
  16. 【Codeforces 650 D】Zip-line
  17. Sqoop异常:Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONObject
  18. [译]Angular-ui 之 多命名视图(Multiple Named Views)
  19. linux下一个网卡配置多个ip【虚拟ip】
  20. [文文殿下]基本的DP技巧

热门文章

  1. php学习笔记-定义数组和引用数组元素
  2. C语言-郝斌笔记-004判断是否为回文数
  3. p1627 [CQOI2009]中位数
  4. python3-file文件操作
  5. Android二维码扫描功能的集成开发
  6. Jmeter-BeanShell的使用介绍
  7. PreparedStatement预编译对象实现
  8. android studio中使用x5 webview来读写cookies的问题
  9. C# DLL(程序集)的生成和调用
  10. JS控制A标记的href跳转