Title: RE: disable validate on a partitioned table?

-----Original Message-----
>From: Khedr, Waleed [mailto:[EMAIL PROTECTED]]
>
>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

Reply via email to