How to fix Error ORA-39921 when using TTS
When doing transportable tablespace, I
get the following errors when run the TTS set check procedure:
SQL> EXECUTE dbms_tts.transport_set_check('MYTABLE',TRUE);
PL/SQL procedure successfully completed.
SQL> select * from sys.transport_set_violations;
VIOLATIONS
------------------------------------------------------------------------------------------------
ORA-39921: Default Partition (Table) Tablespace USERS for MYTABLE not contained in transportable set.
PL/SQL procedure successfully completed.
SQL> select * from sys.transport_set_violations;
VIOLATIONS
------------------------------------------------------------------------------------------------
ORA-39921: Default Partition (Table) Tablespace USERS for MYTABLE not contained in transportable set.
The problem is that the default
tablespace of the partition table is not in the tablespace we need transported,
we should change it by the following command:
ALTER TABLE MYTABLE MODIFY DEFAULT
ATTRIBUTES TABLESPACE <Tablespace_to_be_transported>;
After I change it, I run the TTS
set check procedure again, it's OK:
SQL> EXECUTE dbms_tts.transport_set_check('MYTABLE',TRUE);
PL/SQL procedure successfully completed.
SQL> select * from sys.transport_set_violations;
no rows selected
PL/SQL procedure successfully completed.
SQL> select * from sys.transport_set_violations;
no rows selected
You can now run your TTS.
Aucun commentaire:
Enregistrer un commentaire