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: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Tue, 01 Oct 2002 09:28:27 -0800
Message-ID: <F001.004DD8C2.20021001092827@fatcity.com>

-----Original Message-----
>From: Khedr, Waleed [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: Jacques Kilchoer
  INET: Jacques.Kilchoer_at_quest.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 - 12:28:27 CDT

Original text of this message

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