并行CTAS导致的ORA-00060死锁报错

使用CTASCreate Table As Select)创建新表时,如果开启并行(parallel),那么可能会导致ORA-00060: deadlock detected while waiting for resource报错。

 

Deadlock graph:

---------Blocker(s)-------- ---------Waiter(s)---------

Resource Name process session holds waits process session holds waits

CI-00000001-00000005 88 951 X 92 955 X

session 951: DID 0001-0011-0000005A session 955: DID 0001-0011-0000005A

Rows waited on:

Session 955: no row

Information on the OTHER waiting sessions:

End of information on OTHER waiting sessions.

 

这是由于CTAS试图在表空间中分配空间时,无法找到足够的空间,所以尝试从recyclebinpurge space导致的。此为oracle Bug 4449233 - PARALLEL CTAS FAILS INTERMITTENTLY WITH ORA-60

 

所以在一般情况下,不建议使用并行CTAS创建新表,如果实在需要,建议在创建前先执行purge recyclebin

 

请使用浏览器的分享功能分享到微信等