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: Temporarely disabeling constraints

Re: Temporarely disabeling constraints

From: Jörn Fieg <fieg_at_wmd.de>
Date: 1997/10/16
Message-ID: <34465A11.2351D682@wmd.de>#1/1

--------------924774A6E06402107A9F8698
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Ian Cary wrote:

> I believe the syntax your are looking for is;
>
>  alter table <table_name> disable constraint <constraint_name>;
>
> with enable replacing disable for the reverse operation.

At this point you may have a look on the type of the constraint. Enabling a primary key or an unique constraint this way causes the creation of an index in the _default_ user tablespace. If you want to use a different index tablespace you have to add in using clause like this:

 alter table <table_name> enable constraint <constraint_name>

    using index tablespace <tablespace_name>;

> If you are unsure of the constraint_name you require, al list of all the
> constraints for the current user can be found in the user_constraints view,
> alternatively if the current user is not the table ower the all_constraints
> view lists all constraints accessible by the user.
>
> Hope this helps,
>
> Ian



--------------924774A6E06402107A9F8698

Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

<HTML>

<P>Ian Cary wrote:
<BLOCKQUOTE TYPE=CITE>I believe the syntax your are looking for is;

<P>&nbsp;alter table &lt;table_name> disable constraint &lt;constraint_name>;

<P>with enable replacing disable for the reverse operation.</BLOCKQUOTE>
At this point you may have a look on the type of the constraint.
<BR>Enabling a primary key or an unique constraint this way
<BR>causes the creation of an index in the _default_ user tablespace.
<BR>If you want to use a different index tablespace you have to add
<BR>in using clause like this:

<P>&nbsp;alter table &lt;table_name> enable constraint &lt;constraint_name>
<BR>&nbsp;&nbsp;&nbsp; <B>using index tablespace &lt;tablespace_name></B>;
<BLOCKQUOTE TYPE=CITE>

<P>If you are unsure of the constraint_name you require, al list of all
the
<BR>constraints for the current user can be found in the user_constraints
view,
<BR>alternatively if the current user is not the table ower the all_constraints
<BR>view lists all constraints accessible by the user.

<P>Hope this helps,

<P>Ian</BLOCKQUOTE>

&nbsp;</HTML>

--------------924774A6E06402107A9F8698-- Received on Thu Oct 16 1997 - 00:00:00 CDT

Original text of this message

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