ORA-14452錯誤解決方案

來源:互聯網
上載者:User

最近工作中建立了一張session級的暫存資料表,刪除的時候報下面錯誤:ORA-14452:試圖建立,更改或刪除正在使用的暫存資料表中的索引

網上查閱資料解決方案如下:

1、先從user_objects或dba_objects中查詢到該表的object_id:

此處以sysdba登入:
C:\Documents and Settings\Administrator>sqlplus sys/Oracle@orcl as sysdba

SQL> select object_id from dba_objects where object_name=UPPER('RP_RETAIL001');

 OBJECT_ID
----------
     74317

2、根據查到的object_id知道使用該表的session:

SQL> set linesize 1000
SQL> select * from v$lock where id1=74317;

ADDR             KADDR                   SID TY        ID1        ID2      LMODE    REQUEST      CTIME      BLOCK
---------------- ---------------- ---------- -- ---------- ---------- ---------- ---------- ---------- ----------
000007FFC70967C0 000007FFC70967E0        166 TO      74317          1          3          0        424          0

3、在從v$session視圖中查到該session的SID和SERIAL#:

SQL> select serial# from v$session where sid=166;

   SERIAL#
----------
     51595

4、殺掉這些進程:

SQL> alter system kill session '166,51595';

系統已更改。

5 最後以普通使用者登入,刪除暫存資料表:

SQL> conn dylan/abc123@orcl
已串連。
SQL> drop table rp_retail001;

表已刪除。

-------------------------------------------
made by dylan.

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.