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: Constraint and its index

Re: Constraint and its index

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 9 Jun 1999 18:56:05 +0200
Message-ID: <928947281.1689.0.pluto.d4ee154e@news.demon.nl>


Hi Tony
Which version of Oracle. If 7.3 and higher you should be able to rebuild the index
(at least the non-unique or non-pk indexes) by issuing
alter index <index name> rebuild
storage clause

To drop a constraint (this will drop the index also) alter table <tablename> drop constraint <constraint name>

To create it
alter table <table name> add constraint <constraint name> primary key (columns,...)
using index <storage clause>
And yes the index is automatically created in the same tablespace as the table.

Hth,
Sybrand Bakker, Oracle DBA

Tony Adolph wrote in message <7jm25b$n0g$1_at_nnrp1.deja.com>...
>I am sorting out the storage parameters for the tables and indexes in
>the main db. I noticed that there were a number of indexes that were
>in the data's tablespace. Most of these I simply dropped and recreated
>in the correct tablespace, but I have a few that are used to maintain
>constraints. My question: does the constraint index get automatically
>created in the tablespace of the table it is for? If not, how do I
>disable the constraint drop and recreate the index in the tablespace I
>want?
>
>Any info would be appreciated
>cheers
>Tony A
>
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Wed Jun 09 1999 - 11:56:05 CDT

Original text of this message

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