Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ora-01408?

Re: ora-01408?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 13 Jan 1999 14:13:35 GMT
Message-ID: <369da8d7.2830439@192.86.155.100>


A copy of this was sent to David Spaisman <davedba_at_intercall.com> (if that email address didn't require changing) On Tue, 12 Jan 1999 22:11:25 -0800, you wrote:

>Hello:
>
>I am working on NT with oracle 8.0.4.
>
>I am trying to set up another test database
>based upon a production database.
>
>Based upon an extract of ddl by DBArtisan, I ran the extract ddl and
>most of the objects were created i nthe test database. One object not
>created were three indices. The error message given was : ora-01408:
>
>on editool.app_activity_log(act_id asc)
>*
>ORA-01408: such column list already indexed
>
>And in fact there is also a primary index constraint which utilizes the
>same column(act_id). But when I look at production(this is a package
>bought from a vendor) the primary index and this same second index
>exist!! I can't figure out how. I looked at the original ddl we got from
>the vendor and it is the same as what I am running?
>
>
>1) so how did this happen?
>

it can happen like this:



create table t1 ( x int );

create unique index x_idx on t1(x);

alter table t1 add constraint t1_pk primary key(x);


>2) How do I get this second index created in the test database?
>

the primary key will CREATE an index if none exists. It will use an EXISTING index (subsume it) if one already exists.

Therefore, if you add the constraint before the index, the index doesn't NEED to be created as the primary key constraint creates it for you...

>Thanks.
>
>DAvid Spaisman
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Jan 13 1999 - 08:13:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US