Skip to Main Content

Oracle Database Discussions

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!

Problem moving Table when trying to tidy SYSAUX

JimboMay 18 2012 — edited Jul 12 2012
I have fallen foul of the well known problem of SYSAUX filling up with Stats History. As part of resolving this I am moving some of the items in SYSAUX to an interim tablespace to allow me to shrink the datafile behind SYSAUX.

However I have run into a problem with one of the table moves

SQL> alter table SYS.WRI$_ADV_SQLT_PLANS move tablespace SYSAUX_INT;
alter table SYS.WRI$_ADV_SQLT_PLANS move tablespace SYSAUX_INT
*
ERROR at line 1:
ORA-00997: illegal use of LONG datatype

Indeed the column OTHER in this table is defined as LONG

It appears my options would be -

1. To convert the LONG to LOB and then the table move command will work - however I have some concerns that everything might not be compatible with the new LOB definition for the column - I presume you cannot convert LOB back to LONG ?

2. Truncate the table - will this free up the extents in the underlying datafile, allowing me to shrink it ?
If I create a copy of the table using CTAS into another interim tablespace, could I copy the contents back once I truncate the table ?
I am presuming truncate is better than delete in these circumstances

3. Similiar to the above except use export / import instead of CTAS. I am on 11.2.0.1, I have some concerns whether you can still use exp / imp or whether I am forced to use Data Pump ( I think I remember something about Data Pump not exporting SYS owned objects ? )

any advice greatly appreciated,
Jim
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 9 2012
Added on May 18 2012
15 comments
3,342 views