栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

异常ORA-08103:使用Hibernate的setfetchsize时对象不再存在

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

异常ORA-08103:使用Hibernate的setfetchsize时对象不再存在

最有可能基于已使用

ON COMMIT DELETe ROWS
option 创建的全局临时表(GTT)打开了游标。
ORA-08103: objectno longer exists
错误的原因是
commit
语句之后紧随其后的
delete
语句。这是一个简单的示例:

 SQL> declare  2    type t_recs is table of number;  3    l_cur sys_refcursor;    -- our cursor  4    l_rec t_recs;   5    6  begin  7    8    -- populating a global temporary table GTT1 with sample data    9    insert into GTT1(col) 10      select level 11        from dual 12     connect by level <= 1000; 13   14   open l_cur         -- open a cursor based on data from GTT1 15    for select col 16          from GTT1; 17   18    -- here goes delete statement 19    -- and 20    commit;  <-- cause of the error. After committing  all data from GTT1 will be 21   -- deleted and when we try to fetch from the cursor 22    loop      -- we'll face the ORA-08103 error 23      fetch l_cur    -- attempt to fetch data which are long gone. 24       bulk collect into l_rec; 25      exit when l_cur%notfound; 26    end loop; 27   28  end; 29  /ORA-08103: object no longer existsORA-06512: at line 24

带有

on commit preserve rows
语句的全局临时表的创建将允许从基于该表的游标中安全地获取数据,而不必担心会遇到
ORA-08103:
错误。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/466992.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号