Oracle的Ora-00031 錯誤

來源:互聯網
上載者:User

1、在刪除使用者時不能順利進行,出現ora-14452錯誤

SQL> drop user ggtransfer2 cascade;

drop user ggtransfer2 cascade

*

ERROR at line 1:

ORA-00604: error occurred at recursive SQL level 1

ORA-14452: attempt to create, alter or drop an index on temporary table already

in use

 

2、尋找該使用者的對象所在的id

select object_id from user_objects where object_name=upper('GGS_STICK');

 

3、根據id找到sid,

select * from v$lock where id1=123623

 

548

 

4、根據sid找到sid及其serial#

select * from v$session where sid=548

548,1 

5、查看該sid的SQL語句

SELECT  sql_text

  FROM v$sqltext a

  WHERE a.hash_value = (SELECT sql_hash_value

                          FROM v$session b

                        WHERE b.SID = '&sid')

ORDER BY piece ASC

1、如果SQL語句不影響系統運行,kill

SQL> alter system kill session '548,1';

alter system kill session '548,1'

*

ERROR at line 1:

ORA-00031: session marked for kill

6、該SQL語句session不能正常kill,尋找在OS系統的進程

select spid, oSUSEr, s.program

from v$session s,v$process p

where s.paddr=p.addr and s.sid=548

1  29321  oraoms Oracle@CQXXDBS01 (Q002)

2、在OS系統kill進程

Kill -9 29321

ORA-00031: session marked for kill

Cause: The session specified in an ALTER SYSTEM KILL SESSION command cannot be killed immediately (because it is rolling back or blocked on a network operation), but it has been marked for kill. This means it will be killed as soon as possible after its current uninterruptible operation is done.

Action: No action is required for the session to be killed, but further executions of the ALTER SYSTEM KILL SESSION command on this session may cause the session to be killed sooner

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.