删除临时表 ORA-14452 错误
来源:互联网 发布:淘宝网上采购平台 编辑:程序博客网 时间:2024/04/28 12:25
关于 oracle 临时表 ORA-14452
--总结:不管事务级还是会话级的临时表,都需要所有会话解除绑定,才能drop,解除绑定的办法就是清空每个会话的数据
--清空数据的办法:事务级别的临时表:commit/truncate table;会话级的临时表:truncate table ;
--注意,事务级临时表:不能用delete所有数据 然后commit这种方式清空,必须用truncate table,才能解除该会话同临时表的绑定
--事务级:on commit delete rows;
--会话级:on commit preserve rows;
--ORA-14452: attempt to create, alter or drop an index on temporary table already in use避免此错误就是解除所有数据绑定,清空每个使用的数据。
--测试会话级临时表
sqlplus
sql> set sqlprompt "SESSION 1"
SESSION 1> CREATE GLOBAL TEMPORARY TABLE TMP01 (int_id integer) ON COMMIT PRESERVE ROWS;
Table created.
SESSION 1> insert into tmp01 values (11);
1 row created.
SESSION 1> select * from tmp01;
INT_ID
----------
11
SESSION 1> commit;
Commit complete.
SESSION 1> select * from tmp01;
INT_ID
----------
11
SESSION 2> insert into tmp01 values(22);
1 row created.
SESSION 2> select * from tmp01;
INT_ID
----------
22
SESSION 1> truncate table tmp01;
Table truncated.
SESSION 1> drop table tmp01;
drop table tmp01
*
ERROR at line 1:
ORA-14452: attempt to create, alter or drop an index on temporary table already
in use
SQL> truncate table tmp01;
Table truncated.
SESSION 1> drop table tmp01;
Table dropped.
--测试事务临时表
SESSION 1> CREATE GLOBAL TEMPORARY TABLE TMP01 (int_id integer) ON COMMIT delete rows;
Table created.
SESSION 1> insert into tmp01 values (11);
1 row created.
SESSION 1> select * from tmp01;
INT_ID
----------
11
SESSION 2> insert into tmp01 values(22);
1 row created.
SESSION 2> select * from tmp01;
INT_ID
----------
22
SESSION 1> commit;
Commit complete.
SESSION 1> select * from tmp01;
no rows selected
SESSION 1> select * from tmp01;
no rows selected
SESSION 1> drop table tmp01;
drop table tmp01
*
ERROR at line 1:
ORA-14452: attempt to create, alter or drop an index on temporary table already
in use
SESSION 2> drop table tmp01;
Table dropped.
- 删除临时表 ORA-14452 错误
- 删除临时表空ora-25152错误
- 删除临时表报ora 14452
- 删除临时表遇到的ORA-14452问题
- ora-14452 试图创建,更改或删除正在使用的临时表中的索引
- ORA-01652永久/临时表空间无法扩展的错误
- 关于 oracle 临时表 ORA-14452
- 删除ORACLE的临时表空间报错:ORA-12906: cannot drop default temporary tablespace
- 创建、删除临时表
- 临时表的删除
- oracle临时表删除
- oracle 删除临时表
- SQL临时表删除
- sql临时表删除
- oracle 删除临时表
- 表空间_临时表空间引起的错误:ora-01652 小例
- ORA-01114错误原因及解决方法(临时表空间坏掉、或者满了)
- 临时表应用中出现的ora-14450错误的简单解决方法
- Oracle date 和 timestamp 区别
- JVM虚拟机内存模型
- 历史搜索记录保存
- 渗透神器sqlmap的使用笔记
- 全部最新版postfix+dovecot+postgresql+centos7+amavisd+clamd+spamassassin源文件安装搭建完善的邮件服务器
- 删除临时表 ORA-14452 错误
- Must-have plugins for Ionic Framework
- ionic解决跨域访问
- Redis常用命令
- 关于socket长连接的心跳包
- wireshark怎么抓包、wireshark抓包详细图文教程
- 基于cryptopp -- A Password Manager密码管理系统
- The attribute locations is undefined for the annotation type ContextConfiguration
- 利用AuthorizeAttribute属性简单避免 MVC 中的跨域攻击