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

Home -> Community -> Usenet -> c.d.o.server -> Re: *** Index on a Primary Key ????

Re: *** Index on a Primary Key ????

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/10/24
Message-ID: <345159E7.23B@iol.ie>#1/1

TurkBear wrote:
>
> The short answer to your question is 'you can't' - when the primary
> key was designated, the column was indexed; once a column is indexed
> it cannot be indexed again - the error message doesn't refer to the
> index name but to the column name.
>
> John Greco
> Oracle DBA
>
> Chrysalis <cellis_at_iol.ie> wrote:
>
> >. wrote:
> >>
> >> Hello Everybody,
> >>
> >> I am trying to create an index on a primary key that's a part of combined
> >> primary keys (which are all indexed as multiple index ofcoarse). When I type
> >> the command
> >>
> >> CREATE INDEX xyz_idx on Table_Name (col_name);
> >>
> >> This gives me an error message saying that the index already exists, how can I
> >> execlude the column I'm trying to create the index on, from the multiple index
> >> set on it by the DBA as a part of a combined primary key ??
> >>
> >> I don't have the privilage (as a client) to drop and recreate an index on the
> >> multiple index that already exists (that was defined by the DBA) I only have
> >> the privilage to create a new index in the default table space.
> >>
> >> I would really appreciate your reply. Thanks.
> >>
> >> Elhamy
> >
> >In the absence of the exact error message, one of two interpretations is
> >possible:
> >
> >I.
> >The index name has already ben used for another index (*possibly* the
> >one on the primary key).
> >
> >In this case, if you really do need to create an index on a different
> >set of columns, you merely need to choose a different index name.
> >
> >Of course, there is no need to do this if the existing key has as its
> >leading columns the columns which you wish to index.
> >
> >II.
> >The DBA has already created a separate index on the same columns that
> >you wish to index, and in the same order.
> >In this case, there is no need for a new index.
> >
> >HTH
> >--
> >Chrysalis
> >
> >FABRICATI DIEM, PVNC
> >('To Protect and to Serve')
> >Terry Pratchett : "Guards Guards"

-- 

John,

   Since your post appeared next to my answer to the original question,
I have replied directly to you.  You do not, however, supply a valid
mailid.

   While it is true that you cannot index the same set of columns (in
the same sequence) more than once, it was not my understanding that this
was, in fact, the problem.

   Would you like to explain what part of my answer you disagree with?
  
-- 
Chrysalis

FABRICATI DIEM, PVNC
('To Protect and to Serve')
Terry Pratchett : "Guards Guards"
Received on Fri Oct 24 1997 - 00:00:00 CDT

Original text of this message

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