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!

ORA-26027 despite skip_unusable_indexes = TRUE

max71Oct 17 2008 — edited Oct 21 2008
Guys,

I’m on 10.2.0.3.

Why I’m getting ORA-26027 during INSERT even when SKIP_UNUSABLE_INDEXES = TRUE. Is this a Bug or a Feature? What’s the solution/work-around here?

My goal here is to load data quicker using following steps. But I’m getting this error wherever there is UNIQUE index.

1) Make local index partitions unusable ( There are no global indexes )
2) Load data using DL INSERT
3) Rebuild UNUSABLE indexes.

Here is the test case…
SQL>drop table t1;

Table dropped.

SQL>create table t1
  2  PARTITION BY RANGE (CREATED)
  3  (
  4    PARTITION P1_2005 VALUES LESS THAN (TO_DATE(' 2006-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
  5    PARTITION P1_2006 VALUES LESS THAN (TO_DATE(' 2007-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
  6    PARTITION P1_2007 VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
  7    PARTITION P1_2008 VALUES LESS THAN (TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
  8    PARTITION P1_MAX VALUES LESS THAN (MAXVALUE)
  9  )
 10  as
 11  select * from dba_objects
 12  /

Table created.

SQL>create unique index t1_p1 on t1 (created, object_id ) local;

Index created.

SQL>alter table t1 MODIFY PARTITION  p1_2006 unusable local indexes;

Table altered.

SQL>insert /*+ APPEND */ into t1 partition (p1_2006) select * from dba_objects where to_char(created, 'YYYY') = '2006';
insert /*+ APPEND */ into t1 partition (p1_2006) select * from dba_objects where to_char(created, 'YYYY') = '2006'
                          *
ERROR at line 1:
ORA-26027: unique index SCOTT.T1_P1 partition P1_2006 initially in unusable state

SQL>show parameter skip_un

skip_unusable_indexes           Boolean TRUE
SQL>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 18 2008
Added on Oct 17 2008
10 comments
4,367 views