【发布时间】:2021-04-06 11:40:26
【问题描述】:
我不会在 Oracle 12c 中删除 gtt。我不知道哪个session 正在保留待处理的交易。它是on commit preserve rows 表。
drop TABLE pjm.pjm_ecc_gtt1
Error report -
ORA-14452: attempt to create, alter or drop an index on temporary table already in use
14452. 00000 - "attempt to create, alter or drop an index on temporary table already in use"
*Cause: An attempt was made to create, alter or drop an index on temporary
table which is already in use.
*Action: All the sessions using the session-specific temporary table have
to truncate table and all the transactions using transaction
specific temporary table have to end their transactions.
如何强制中止会话并将其删除。我知道v$session,但我怎么知道哪个会话使用我的表。
我被截断了,但仍然无法删除。
【问题讨论】:
-
谢谢。没有锁。
-
@Mahima 我们遇到过这样的问题,但它一直挂在
truncate声明上。原因是孤立的进程,它在操作系统级别,但不在会话中。我们的 DBA 已经设法解决了这个问题,但我不知道他们是如何识别的。 -
您在哪个版本或 Oracle 中,知道为什么要删除全局临时表,因为全局,与其他数据库产品(如 MySQL 和 SQL Server)的临时表不同,Oracle 中的全局临时表是永久数据库对象,将数据存储在磁盘上并对所有会话可见。但是,存储在全局临时表中的数据是会话私有的。也就是说,每个会话只能访问自己在全局临时表中的数据。
-
@hkandpal 我们实际上必须更改表格。我们需要更多的专栏。所以我们将删除并重新创建。它的新项目,问题仅在开发环境中。
标签: sql database oracle plsql oracle12c