Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle 19c - Truncate partition and update global indexes on remote site

4174447Sep 16 2020 — edited Sep 17 2020

Hi,

I'm working on Oracle Enterprise 19.6 and we have a problem executing this request within our application :

ALTER TABLE myTable TRUNCATE PARTITION P1 UPDATE GLOBAL INDEXES

The request works perfectly with SQL Developper. When executed by our application, this error is thrown :

"ORA-12828: Can't start parallel transaction at a remote site"

I read I could split the request like this :

ALTER TABLE myTable TRUNCATE PARTITION P1;

ALTER INDEX myTable_pk_idx REBUILD;

But in my case, myTable_pk_idx is a global index.

We only truncate 1 partition at a time and we only have 1 index to rebuild on this table, so can I do somethng like this :

ALTER TABLE myTable TRUNCATE PARTITION P1;

ALTER INDEX myTable_pk_idx REBUILD PARTITION P1;

Will the index be as "usable" as it is with the first request ? (ALTER TABLE myTable TRUNCATE PARTITION P1 UPDATE GLOBAL INDEXES)

Do I have to rebuild all the partitions of the index? Is there a better way to do this?..

Thanks in advance for reading and for your answers!  ^^

Regards!

Comments
Post Details
Added on Sep 16 2020
3 comments
1,870 views