Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Temporarely disabeling constraints
--------------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
<HTML>
<P>Ian Cary wrote:
<BLOCKQUOTE TYPE=CITE>I believe the syntax your are looking for is;
<P> alter table <table_name> disable constraint <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> alter table <table_name> enable constraint <constraint_name>
<BR> <B>using index tablespace <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>
</HTML>
--------------924774A6E06402107A9F8698-- Received on Thu Oct 16 1997 - 00:00:00 CDT