暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle 在线表移动到不同的表空间。

ASKTOM 2020-04-03
333

问题描述

团队,

我们在18c上,试图将表移动到不同的表空间,使用在线移动它就像这样失败了。

c##rajesh@PDB1> alter session set ddl_lock_timeout =300;

Session altered.

c##rajesh@PDB1> show parameter ddl_lock_timeout

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
ddl_lock_timeout                     integer     300

c##rajesh@PDB1> set timing on time on
18:19:27 c##rajesh@PDB1> alter table app_legacy.APP_CLM_PRF nologging;

Table altered.

Elapsed: 00:00:00.03
18:19:39 c##rajesh@PDB1> alter table app_legacy.APP_CLM_PRF move tablespace TS_QPNY_CLM_PRF_5010 online PARALLEL 8;
alter table app_legacy.APP_CLM_PRF move tablespace TS_QPNY_CLM_PRF_5010 online PARALLEL 8
                       *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-12801: error signaled in parallel query server P00Q, instance en702c101vm01.us1.ocm.s1234567.oraclecloudatcustomer.com:PDB1 (1)
ORA-04021: timeout occurred while waiting to lock object app_legacy.SYS_RMTAB$$_H229541



不能在线将段移动到不同的表空间?请多多指教。

专家解答

从文档中:

Parallel DML and direct path INSERT operations require an exclusive lock on the table. Therefore, these operations are not supported concurrently with an ongoing online partition MOVE, due to conflicting locks.

https://docs.oracle.com/en/database/oracle/oracle-database/20/sqlrf/ALTER-TABLE.html#GUID-552E7373-BF93-477D-9DA3-B2C9386F2877__CJAGDCEB

你想做不可能的事!放弃平行选项。
文章转载自ASKTOM,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论