Skip to Main Content
  • Questions
  • Online Table move to different table space.

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Rajeshwaran.

Asked: April 03, 2020 - 6:32 am UTC

Last updated: April 03, 2020 - 10:22 am UTC

Version: 18c

Viewed 1000+ times

You Asked

Team,

we are on 18c and trying to move a table to a different table space, using the online move it got failed like this.

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



It is not possible to move segments to different table space online? kindly advice.

and Chris said...

From the docs:

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

You're trying to do the impossible! Ditch the parallel option.

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Performance

Get all the information about database performance in the Database Performance guide.