Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

ORA-02327: Cannot Create Index on Expression with Datatype String

Expert Oracle Database Tips by Burleson Consulting

March 1, 2015

 

Question:  I just tried moving all tables and indexes from one tablespace to another using a command formatted like the following:

alter table a move tablespace b

I then attempted to rebuild all indexes tablespace b.  There is one LOB index in the original table that did not get moved and attempts to rebuild that index to make it use the new tablespace fails with an ORA-02327 error:


ORA-02327: cannot create index on expression with datatype LOB
 

How do I get this LOB index moved to tablespace b and resolve this ORA-02327 error?

Answer:  When you use ALTER INDEX MOVE TABLESPACE, you do not need to rebuild the index.

A LOB index cannot be moved the way you are attempting to move it. The DDL should be extracted and the index built in another tablespace.

This is confirmed by checking the oerr utility to fully display the ORA-02327 error:

ORA-02327: cannot create index on expression with datatype string

Cause: An attempt was made to create an index on a non-indexable expression.

Action: Change the column datatype or do not create the index on an expression whose datatype is one of VARRAY, nested table, object, LOB, or REF.

The LOB index should be in the same tablespace as the LOG segment as follows:

SQL> DESC TESTLOB
Name Null? Type
----------------------------------------- -------- -----------

COL1 NUMBER
COL2 CLOB

SQL> COLUMN SEGMENT_NAME FORMAT A25
SQL> SELECT SEGMENT_NAME,TABLESPACE_NAME FROM USER_SEGMENTS;

SEGMENT_NAME TABLESPACE_NAME
------------------------------ ------------------------------
TESTLOB USERS
SYS_IL0000005539C00002$$ USERS
LOB_TESTLOB_COL2 USERS

3 rows selected.

SQL> ALTER TABLE TESTLOB MOVE LOB (COL2) STORE AS (TABLESPACE B);

Table altered.

SQL> SELECT SEGMENT_NAME,TABLESPACE_NAME FROM USER_SEGMENTS;

SEGMENT_NAME TABLESPACE_NAME
------------------------------ ------------------------------
TESTLOB USERS
SYS_IL0000005539C00002$$ B
LOB_TESTLOB_COL2 B

3 rows selected.

SQL>
 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2016

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.


 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster