Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ora-01408?
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 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
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
![]() |
![]() |