首页 > 其他 > 详细

24. (ora-01410无效的rowid)临时表 on commit delete rows 与 on commit preserve rows 的区别

时间:2015-12-04 10:50:18      阅读:572      评论:0      收藏:0      [点我收藏+]
ora-01410无效的rowid解决方式:

把临时表空间改成会话级别的就可以了,即把临时表的创建选项由on commit delete rows改为on commit preserve rows,就可以了

-- 事务级临时表:提交时删除数据
create global temporary  table tmp_table1
(
       x     number
) on commit delete rows ;
 
-- 会话级临时表:会话结束时删除数据
create global temporary table tmp_table2
(
       x     number
) on commit preserve rows ;
 
insert into tmp_table1
values(1);
insert into tmp_table1
values(2);
insert into tmp_table1
values(3);
 
 
insert into tmp_table2
values(1);
insert into tmp_table2
values(2);
insert into tmp_table2
values(3);
 
select * from   tmp_table1 ;
X
1
2
3
 
 
select * from   tmp_table2 ;
X
1
2
3
 
commit;
 
select * from   tmp_table1 ;
-- 无结果输出
select * from   tmp_table2 ;
X
1
2
3
 
SQL> conn / as sysdba;
SQL> select * from   user01.tmp_table1 ;
-- 无结果输出 
SQL> select * from   user01.tmp_table2 ;
-- 无结果输出

24. (ora-01410无效的rowid)临时表 on commit delete rows 与 on commit preserve rows 的区别

原文:http://www.cnblogs.com/zkx4213/p/5018518.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!