Chinaunix首页 | 论坛 | 博客
  • 博客访问: 12048
  • 博文数量: 14
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 170
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-20 09:05
文章分类

全部博文(14)

文章存档

2011年(1)

2009年(13)

我的朋友

分类: Oracle

2009-03-28 00:43:48

无效的游标
1、确认游标是否打开
2、要注意隐示的游标
出现ORA-01001错误,解决方法如下:
1、show parameters open_cursors
2、alter system set open_cursors=number值;
3、增加open_cursors的值能及时解决问题,但事后还要对相应的语句进行检查
4、通过查询v$sesstat 查询出目前打开的游标数量,以判断是否设置的open_cursors是否合理
select a.value, s.username, s.sid, s.serial#
from v$sesstat a, v$statname b, v$session s
where a.statistic# = b.statistic# and s.sid=a.sid
and b.name = 'opened cursors current' order by 1 desc


注:open_cursors的值增大对系统性能影响不是太大,不要设置的太离谱就行了!!!!
        主要根据自己的需求而定!!!!
阅读(1174) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~