ORA-10635: Invalid segment or tablespace type

I got ” ORA-10635: Invalid segment or tablespace type ” error in Oracle database.

 

ORA-10635: Invalid segment or tablespace type

Details of error are as follows.

SQL> alter table <table_name> enable row movement;
Table altered.

SQL> alter table <table_name> shrink space compact;
alter table <table_name> shrink space compact
*
ERROR at line 1:
ORA-10635: Invalid segment or tablespace type

 

 

This ORA-10635 error is related with the SHRINK clause is not valid on a compressed table and ORA-10635 is normally expected.
Bug 4076841 10.1.0.3 RDBMS 10.1.0.3 SQL LANGUAGE PRODID-5 PORTID-453
Abstract: ALTER TABLE SHRINK SPACE LIMITATIONS DID NOT INCLUDE COMPRESSED SEGMENTS
–> Status: 99,Closed, Documentation Bug Fixed

(b) Autosegment space management was not set for the tablespace. Shrink operations can be performed only on segments in locally managed tablespaces with automatic segment space management (ASSM). Within an ASSM tablespace, all segment types are eligible for online segment shrink except these:
* IOT mapping tables
* Tables with rowid based materialized views
* Tables with function-based indexes.

 

BTW: The SHRINK option is not supported for SecureFiles LOBs.

 

To solve this error, perform the following steps.

(a) In case of a table being compressed table:

SQL> conn / as sysdba
SQL> alter table <table_name> nocompress;
SQL> alter table <table_name> enable row movement;
SQL> alter table <table_name> shrink space compact;
SQL> exit

 

(b) If decompressing the table is not possible or if the decompression does not help, then the following workaround can add value:

SQL> conn / as sysdba
SQL> alter table <table_name> enable row movement;
SQL> alter table <table_name> move tablespace &tablespace_name;    --- the newly specified tablespace can be the same current one
SQL> alter table <table_name> shrink space compact;
SQL> exit

(c) In case autosegment space management is not set for the tablespace, please enable it. The way to “convert” to ASSM is to export all the objects from the MSSM tablespace, then create a new ASSM tablespace and finally import in this new one all the objects.

 

 

 

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

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

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

Your email address will not be published. Required fields are marked *