ORA-14404: partitioned table contains partitions in a different tablespace

I got ” ORA-14404: partitioned table contains partitions in a different tablespace ” error in Oracle database during the drop tablespace.

 

ORA-14404: partitioned table contains partitions in a different tablespace

 

Details of error are as follows.

SQL> DROP TABLESPACE TBS_TEST INCLUDING CONTENTS AND DATAFILES;
DROP TABLESPACE TBS_TEST INCLUDING CONTENTS AND DATAFILES
*
ERROR at line 1:
ORA-14404: partitioned table contains partitions in a different tablespace

 

If you want to learn more details about Tablespace, read the following post.

What is the Tablespace and How to Create Permanent, Undo and Temp Tablespace in Oracle

 

 

partitioned table contains partitions in a different tablespace

This ORA-14404 errors are related with the partitioned table contains partitions in a different tablespace.

To solve this error, you need to move these partitions in a different tablespace to the same tablespace.

 

You can use the following post to learn how to move partitions to another tablespace.

How to Move Tables, Index Rebuild, Partitions and Subpartitions to Another Tablespace in Oracle

 

You can use the following script to move these partitions to different tablespace.

ALTER TABLE TABLE_OWNER.TABLE_NAME MOVE PARTITION PARTITION_NAME TABLESPACE NEW_TABLESPACE_NAME NOLOGGING;

 

You can generate the move all partitions script under this tablespace as follows.

select 'ALTER TABLE '||TABLE_OWNER ||'.'||table_name||' MOVE PARTITION '||partition_name||' TABLESPACE NEW_TABLESPACE_NAME UPDATE INDEXES;' from dba_tab_partitions where TABLESPACE_NAME = 'TBS_TEST';

 

 

You can generate the move all subpartitions script as follows.

SELECT 'ALTER TABLE ' ||TABLE_OWNER ||'.' ||TABLE_NAME ||' MOVE SUBPARTITION ' ||SUBPARTITION_NAME ||' TABLESPACE NEW_TABLESPACE_NAME parallel 64 UPDATE INDEXES;' FROM DBA_TAB_SUBPARTITIONS where TABLESPACE_NAME = 'TBS_TEST';

 

Once you moved these partitions to the different tablespace, you can drop the tablespace as follows.

 

SQL> DROP TABLESPACE TBS_TEST INCLUDING CONTENTS AND DATAFILES;

Tablespace dropped.


 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

 311 views last month,  2 views today

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

IT Tutorial