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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: disable validate on a partitioned table?

RE: disable validate on a partitioned table?

From: Khedr, Waleed <Waleed.Khedr_at_FMR.COM>
Date: Tue, 01 Oct 2002 10:54:13 -0800
Message-ID: <F001.004DDAFD.20021001105413@fatcity.com>


Try this before exchanging segments:  

alter table country_temp add (constraint country_uq2 unique (country_founded) disable validate) ;  

Waleed

-----Original Message-----
Sent: Tuesday, October 01, 2002 1:28 PM
To: Multiple recipients of list ORACLE-L

-----Original Message-----
>From: Khedr, Waleed [ mailto:Waleed.Khedr_at_FMR.COM
<mailto:Waleed.Khedr_at_FMR.COM> ]
>
>This is probably b/c the unique key does not include the partitioning key.

The unique key did include the partitioning key. Here is my example (Oracle 8.1.7.2.1 on Windows 2000)

SQL> create table country (country_founded date, country_name varchar2 (30))

2 partition by range (country_founded)
3 (partition country_p1 values less than (to_date ('+15000101', 'SYYYYMMDD')),
4 partition country_p2 values less than (maxvalue) 5 ) ;
Table créée.

SQL> insert into country (country_founded, country_name) 2 values (to_date ('12910801', 'YYYYMMDD'), 'Switzerland') ; 1 ligne créée.

SQL> insert into country (country_founded, country_name) 2 values (to_date ('17760704', 'YYYYMMDD'), 'United States of America') ; 1 ligne créée.

SQL> commit ;
Validation effectuée.

SQL> alter table country add (constraint country_uq1 unique (country_founded) disable validate) ;
Table modifiée.

SQL> create table country_temp (country_founded date, country_name varchar2 (30)) ;
Table créée.

SQL> insert into country_temp (country_founded, country_name) 2 values (to_date ('19600820', 'YYYYMMDD'), 'Senegal') ; 1 ligne créée.

SQL> commit ;
Validation effectuée.

SQL> alter table country exchange partition country_p2 with table country_temp ;
alter table country exchange partition country_p2 with table country_temp *
ERREUR à la ligne 1 :
ORA-25132: contrainte UNIQUE (JRK.COUNTRY_UQ1) désactivée et validée dans ALTER TABLE EXCHANGE
PARTITION SQL> alter table country exchange partition country_p2 with table country_temp
2 without validation ;
alter table country exchange partition country_p2 with table country_temp *
ERREUR à la ligne 1 :
ORA-25132: contrainte UNIQUE (JRK.COUNTRY_UQ1) désactivée et validée dans ALTER TABLE EXCHANGE
PARTITION

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Khedr, Waleed
  INET: Waleed.Khedr_at_FMR.COM

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Oct 01 2002 - 13:54:13 CDT

Original text of this message

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