Partitioning Indexes Question

Trying to create this index partition


CREATE INDEX bb_bb60_stats.activity_accumulator_iecontent
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
CREATE INDEX bb_bb60_stats.activity_accumulator_iecontent
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL
 (
  PARTITION aa_2010_04  TABLESPACE BB_BB60_STATS_INDX,
  PARTITION aa_2010_05  TABLESPACE BB_BB60_STATS_INDX,
  PARTITION aa_2010_06  TABLESPACE BB_BB60_STATS_INDX,
  PARTITION aa_2010_07  TABLESPACE BB_BB60_STATS_INDX,



Getting the message
"Index created.

PARTITION  AA_2010_04         TABLESPACE BB_BB60_STATS_DATA
*
ERROR at line 5:
ORA-14010: this physical attribute may not be specified for an index partition
"
What attribute am I specifying that I should not?
xoxomosAsked:
Who is Participating?
 
k_murli_krishnaConnect With a Mentor Commented:
All above can be explained in the following:

1) PK constraint is a rule that prohibits multiple rows from having the same value in the same column or combination of columns.

2) Oracle Database enforces a UNIQUE key or PRIMARY KEY integrity constraint on a table by creating a unique index on the unique key or primary key.

3) Thus, when your table ACTIVITY_ACCUMULATOR was created with primary key as CONTENT_PK1, a unique index is created by Oracle with same name as primary key constraint name

4) Your very first statement in your very first post:
CREATE INDEX bb_bb60_stats.activity_accumulator_iecontent
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;

This runs through since this is a duplicate index unlike the unique index created by Oracle to enforce uniqueness. Index with (same name in the same schema) OR (same type on the same set of coulmn(s) with matching sort specifiers i.e ASC or DESC) are not allowed.

Now you are trying to create an index partition but the top main part i.e. CREATE INDEX is exactly same as above. The error you are getting is not about index already exists but syntax error in creating index partition described as below:

ORA-14010:
this physical attribute may not be specified for an index partition
Cause:       unexpected option was encountered while parsing physical attributes of an index partition; valid options for Range or Composite Range partitions are INITRANS, MAXTRANS, TABLESPACE, STORAGE, PCTFREE; only TABLESPACE may be specified for Hash partitions
Action:       remove invalid option(s) from the list of physical attributes of an index partition

Please go through the following link on how to create table partitions and extending on that as how to create index partitions:

Partitioned Tables and Indexes
http://docs.oracle.com/cd/B10501_01/server.920/a96524/c12parti.htm
0
 
Steve WalesSenior Database AdministratorCommented:
I don't claim to be an expert on partitioning, but it looks like you are creating the index twice with the same name ?

Oracle in general doesn't like two things of the same type in the database with the same name.  

(Unless something about partitioning requires you to do it this way, but nothing I could find in the documentation suggested that)
0
 
xoxomosAuthor Commented:
Thanks
That's what I thought also but when i removed the first SQL command and just ran the second, I got some kind of error.  I'll run over that again now and come back with the error message.  Did a search on it in mySupport, came back with basically 'returned no rows' on the Knowledge thing :-)
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
xoxomosAuthor Commented:
I'll run this now:
DROP INDEX bb_bb60_stats.activity_accumulator_iecontent;
DROP INDEX bb_bb60_stats.activity_accumulator_ie1;
DROP INDEX bb_bb60_stats.activity_accumulator_ie2;
DROP INDEX bb_bb60_stats.activity_accumulator_ie3;
DROP INDEX bb_bb60_stats.activity_accumulator_ie4;
DROP INDEX bb_bb60_stats.activity_accumulator_ie5;
DROP INDEX bb_bb60_stats.activity_accumulator_ie6;
DROP INDEX bb_bb60_stats.activity_accumulator_pk1;
CREATE INDEX bb_bb60_stats.activity_accumulator_iecontent
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie1
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie1
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie2
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie2
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie3
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie3
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie4
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie4
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie5
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie5
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie6
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
CREATE INDEX bb_bb60_stats.activity_accumulator_ie6
 ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL;
COMMIT;
 CREATE INDEX bb_bb60_stats.activity_accumulator_pk1
                                                              .......................................................................;
0
 
xoxomosAuthor Commented:
It's finished dropping whatever is there now starting the CREATE.  That will run about fifty minutes, make a significant amount of noise on OEM's 'Performance' screen, the error out.
0
 
xoxomosAuthor Commented:
ON bb_bb60_stats.activity_accumulator (content_pk1) LOCAL
                                        *
ERROR at line 2:
ORA-01408: such column list already indexed.
When I issue the drop, it says index does not exist
When i issue the CREATE it says index does exist.
0
 
xoxomosAuthor Commented:
SQL query show only one non system generated index.

SQL>  select owner, index_name from dba_indexes where table_owner = 'BB_BB60_STATS'
  2  and table_name = 'ACTIVITY_ACCUMULATOR';

OWNER                          INDEX_NAME
------------------------------ ------------------------------
BB_BB60_STATS                  ACTIVITY_ACCUMULATOR_IECONTENT
BB_BB60_STATS                  SYS_IL0000122326C00013$$

SQL>
0
 
Steve WalesConnect With a Mentor Senior Database AdministratorCommented:
It doesn't say that there is an index of that name, it says that those columns already exist in another index somewhere.

Does that table have a primary key ?  If you add a primary key constraint it automatically builds an index.

Check the values in dba_ind_columns for that table as well as dba_constraints.  Do you have a Primary Key (P) constraint using those columns ?
0
 
xoxomosAuthor Commented:
Yes
ACTIVITY_ACCUMULATOR_IECONTENT is the index on the primary key.
For the moment I would leave that be and try creating one or more of the other indexes.
0
 
xoxomosAuthor Commented:
SQL>  select index_name, column_name from dba_ind_columns
  2  where table_owner = 'BB_BB60_STATS'
  3  and table_name = 'ACTIVITY_ACCUMULATOR';

INDEX_NAME
------------------------------
COLUMN_NAME
--------------------------------------------------------------------------------
ACTIVITY_ACCUMULATOR_IECONTENT
CONTENT_PK1
0
 
xoxomosAuthor Commented:
SQL> select constraint_name from dba_constraints
  2  where table_name = 'ACTIVITY+ACCUMULATOR'
  3  and owner = 'BB_BB60_STATS';

no rows selected

SQL>
0
 
xoxomosConnect With a Mentor Author Commented:
Thanks krishna, looks like you are right here.  I've started creating indexes script again.
0
 
xoxomosAuthor Commented:
Thanks all.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.