ORA-02266: unique/primary keys in table referenced by enabled foreign keys

Hi,
I am trying to delete data from a table by dropping a partition. I have identified all the child tables by running the following command.
select 'select count(*) from '||table_name||' where employee_id = 100;'
from dba_constraints
where constraint_type='R'
and r_constraint_name in
(select constraint_name from dba_constraints
where constraint_type in ('P','U') and table_name='EMPLOYEE);
'SELECTCOUNT(*)FROM'||TABLE_NAME||'WHEREEMPLOYEE_ID_ID=100;'
select count(*) from PT_ORDERS where employee_id = 100;
select count(*) from PT_DEP where employee_id = 100;
select count(*) from PT_SKILLSET where employee_id = 100;
I dropped the partition for employee_id 100 in all of the child tables. The select count(*) returns 0 rows for each of the above.
When I try to run the below command on the EMPLOYEE table, I get 'ORA-02266: unique/primary keys in table referenced by enabled foreign keys'.
alter table EMPLOYEE drop partition EMP_ID_100;
I cant see why I am unable to drop this partition now as there is now child data in any of the referenced tables. Any suggestions or help on this would be greatly appreciated.
Thanks.
Rgs,
Rob

You should disable foreign key constraints first and drop partition. Deletion of rows or dropping partitions in childs don't work in this case
as you have the global dependency:
<PRE>
SQL> create table scott.t (x int primary key, y int)
2 partition by list (y) (
3 partition p_1 values(1), partition p_2 values(2))
4 /
Table created.
SQL> create table scott.t_c (x int references scott.t(x), y int)
2 partition by list (y) (
3 partition p_1 values(1), partition p_2 values(2))
4 /
Table created.
SQL> insert into scott.t values(1,1)
2 /
1 row created.
SQL> insert into scott.t values(2,2)
2 /
1 row created.
SQL> insert into scott.t_c values(1,1)
2 /
1 row created.
SQL> insert into scott.t_c values(2,2)
2 /
1 row created.
SQL> commit;
Commit complete.
SQL> alter table scott.t_c drop partition p_2;
Table altered.
SQL> alter table scott.t drop partition p_2;
alter table scott.t drop partition p_2
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
SQL> select constraint_name from dba_constraints
2 where owner = 'SCOTT' and constraint_type = 'P'
3 and table_name = 'T';
CONSTRAINT_NAME
SYS_C0011058
SQL> select constraint_name from dba_constraints
2 where owner = 'SCOTT' and constraint_type = 'R'
3 and r_constraint_name = 'SYS_C0011058';
CONSTRAINT_NAME
SYS_C0011059
SQL> alter table scott.t_c disable constraint SYS_C0011059;
Table altered.
SQL> alter table scott.t drop partition p_2;
Table altered.
SQL> alter table scott.t_c enable novalidate constraint SYS_C0011059;
Table altered.
</PRE>
I guess you should consider such option as Referencial partitioning (with some restrictions).
Best wishes,
Dmitry.

Similar Messages

  • ORA-02266: unique/primary keys - error while using Exchange Partition

    Hi All,
    While using EXCHANGE PARTITION statement as given below,
    ALTER TABLE SOURCE_TABLE EXCHANGE PARTITION PRT_EXCG_PRTN WITH TABLE TARGET_TABLE
    we are getting this error,
    ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    However, there are no tables have foreign keys referring this TARGET_TABLE, we checked this by referring
    USER_CONSTRAINTS table, it has only primary key and NOT NULL constraints.
    SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME like 'TARGET_TABLE';
    We are using the following version,
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE     9.2.0.6.0     Production
    TNS for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Production
    Is it due to any error in our end or it could be a bug in Oracle and should we go for any patch updation ?
    Please guide us to resolve this error as soon as possible, thank you.
    Regards,
    Deva

    *** Duplicate Post ***
    Please Ignore.

  • In ADF how can i insert data in multiple table if they have foreign key

    I have started working on ADF and can anybody inform me in ADF how can i insert data in multiple table if they have foreign key,please?
    Thnak you very much.

    Hello,
    Still no luck.I am surely doing silly mistakes.Anyway,Here are my workings-
    1> student_mst (id(pk),studentname) and student_guard_mst(id(fk),guardianname)
    2> created EO from both of the tables,made id in both EO as DBSequence and an association was also generated.
    3> i made that association composite by clicking the checkbox
    4> i created 2 VO from 2 EO.
    5> put those VO in Application Module.
    6> dragged and dropped 2 VO on my jspx page and dropped them as ADF Form.
    Now what to do please?

  • How to identify tables use currency as foreign keys?

    Currently we have identified some currencies that needed to updated to ISO values and others as obsolete(eg. some EURO countiries set to EUR) in ECC
    So my question is how to efficiently locate those foreign keys tables in ECC?
    Thx and Best Grds
    David

    I do not think I fully understand your question but I will give it a shot.
    If you are trying to locate a foreign key, then proceed as follows.
    1.  Transaction Code: SE11
    2.  Enter the table in question.  For example BSEG
    3.  Select a table. For example BUKRS or KUNNR
    4.  Click on Foreign Keys.  The symbol or icon is a key with an arrow pointing down. It is before Srch Help.
    5. A screen will pop-up with the foreign key fields and tables where you can you the CHECKTABLE.
    Or enter table using SE11: GLPCT
    2.  Select RTCUR
    3.  Click on Foreign Keys
    3.  In the pop-up screen,  double click on TCURC in the check table field.
    Hopes the above provides you with a clue.
    Elias
    Edited by: Elias Akorli on Dec 7, 2009 2:29 PM

  • Enable foreign key for a custom field?

    Hi,
    In my mater table I have a custom field (lumpsum) which has been declared in pa0001 (as a include structure). The same structure has the description for this field.
    My requirement is to assign foreign key for this field to make use of joins in my table view. As this field was into a custom structure of PA0001, I couldnu2019t able to foreign key for this field.
    Please help it
    Regards,
    Vijay

    Hi Vijay,
    Sice it is designed for value check, a foreigh key refers to a TABLE.
    Regards,
    Laurent

  • How to truncate the Dimensions: ORA-02266

    I simply want to truncate the dimensions of star schema.
    First I truncate the fact table with Sql, that works.
    Then truncating a dimension fails with this error:
    Truncate table fcDwh.DIM_DEPS
    Error report:
    SQL Error: ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    02266. 00000 - "unique/primary keys in table referenced by enabled foreign keys"
    *Cause:    An attempt was made to truncate a table with unique or
    primary keys referenced by foreign keys enabled in another table.
    Other operations not allowed are dropping/truncating a partition of a
    partitioned table or an ALTER TABLE EXCHANGE PARTITION.
    *Action:   Before performing the above operations the table, disable the
    foreign key constraints in other tables. You can see what
    constraints are referencing a table by issuing the following
    command:
    SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = "tabnam";
    If the fact table is already empty, I don't violate any foreign key constraint.
    Or am I wrong with this?
    The constraints below:
    OWNER CONSTRAINT_NAME CONSTRAINT_TYPE TABLE_NAME SEARCH_CONDITION R_OWNER R_CONSTRAINT_NAME DELETE_RULE STATUS DEFERRABLE DEFERRED VALIDATED GENERATED BAD RELY LAST_CHANGE INDEX_OWNER INDEX_NAME INVALID VIEW_RELATED
    FCDWH SYS_C0019008 C DIM_DEPS "DIMENSION_KEY" IS NOT NULL ENABLED NOT DEFERRABLE IMMEDIATE VALIDATED GENERATED NAME 07-SEP-07
    FCDWH DIM_DEPS_DIMENSION_KEY_PK P DIM_DEPS ENABLED NOT DEFERRABLE IMMEDIATE VALIDATED USER NAME 07-SEP-07 FCDWH DIM_DEPS_DIMENSION_KEY_PK

    Try using NumberFormat class:
    NumberFormat currency = NumberFormat.getNumberInstance();
    currency.setMinimumFractionDigits(2);
    currency.setMaximumFractionDigits(2);
    String s = currency.format(anyFloatValue);
    ..

  • Stuck with ORA-02266...even through I've already disabled the FK constraints...?

    I'm working to help some people on a structure I really don't know much about...they're trying to truncate the table.
    When trying to truncate table1:
    I got the ORA-02266: unique/primary keys in table referenced by enabled foreign keys error,
    I went through and have disabled every FK on the table....so, I'm a bit puzzled why I keep getting the same error.
    I was thinking of disabling the PK...to see if for some reason that was holding things back (so far out of a bunch of tables, this is the ONLY table not responding to having all FK's disabled).
    However, when I try to disable the PK I get:
    ORA-02297: cannot disable constraint (owner.table1_pk) - dependencies exist
    I've been looking around, and was going to maybe try the disable constraint with the cascade option, but, I'm not familiar with the cascade in this context...what will this do?
    Will it cause any problems with this or other tables when I try to re-enable the PK constraint on table1?
    Thank you in advance,
    cayenne

    Thank you, this looks like I'm on the path to untangling this mess.
    One question, please...would disabling the PK constraint with the CASCASE clause take care of this? What would this do exactly...disable the other tables' FK constraints..?
    If so, would it re-enable them when I re-enable this PK constraint?
    Thank you,
    C

  • ORA-02266

    Hello All,
    I am trying to truncate a table.
    I am wondering following message.
    ORA-02266: unique/primary keys in table referenced by enabled foreign keysAny help?
    Thanks,
    S!G

    Sea!Gull,
    TRUNCATE table operation does not enforce for foreign key constraint at data or row level. Even if there are no rows in any table (parent and child) truncate on parent will give this error a long as the FK constraint exists and is enabled.
    You have to disable the FK constraints in the "child/detail" table(s), in order to truncate "parent/master" table.
    Think about it, if TRUNCATE table enforced FK constraints at row/data level, it will not be any faster than DELETE statement. TRUNCATE bypasses lots of internal processes like FK checks, row level logging etc.
    SQL> drop table d;
    Table dropped.
    SQL> drop table m;
    Table dropped.
    SQL> create table m (c int primary key);
    Table created.
    SQL> create table d (c1 int, constraint d_fk foreign key (c1) references m(c));
    Table created.
    SQL> select * from m;
    no rows selected
    SQL> select * from d;
    no rows selected
    SQL> truncate table m;
    truncate table m
    ERROR at line 1:
    ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    SQL> alter table d disable  constraint d_fk ;
    Table altered.
    SQL> truncate table m;
    Table truncated.
    SQL> alter table d enable  constraint d_fk ;
    Table altered.
    SQL> truncate table m;
    truncate table m
    ERROR at line 1:
    ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    SQL> Regards,
    Sudhakar B.
    Edited by: user517570 on Jan 6, 2010 9:57 AM (Added the code tag)

  • Drop partition without disabling foreign key

    Hi All,
    I have parent and child table.
    Parent table
    create table parent_1
    (id number,
    create_date date,
    constraint parent_1_pk001 PRIMARY KEY (id))
    PARTITION BY RANGE (create_date)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    (PARTITION parent_1_part VALUES LESS THAN ('01-JAN-2010'));
    Child Table
    create table child_1
    (id number,
    create_date date,
    constraint child_1_fk001 FOREIGN KEY (id)
    REFERENCES parent_1 (id))
    PARTITION BY RANGE (create_date)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    (PARTITION create_date_part VALUES LESS THAN ('01-JAN-2010'));
    I am having problems dropping partition.
    Parent_1
    1     26-JUL-12
    2     26-JUL-12
    Child_1
    1     26-JUL-12
    alter table CHILD_1 drop partition SYS_P274;
    table CHILD_1 altered.
    ON DROPPING PARENT PARTITION
    alter table parent_1 drop partition SYS_P273;
    Error report:
    SQL Error: ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    02266. 00000 - "unique/primary keys in table referenced by enabled foreign keys"
    *Cause:    An attempt was made to truncate a table with unique or
    primary keys referenced by foreign keys enabled in another table.
    Other operations not allowed are dropping/truncating a partition of a
    partitioned table or an ALTER TABLE EXCHANGE PARTITION.
    *Action:   Before performing the above operations the table, disable the
    foreign key constraints in other tables. You can see what
    constraints are referencing a table by issuing the following
    command:
    SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = "tabnam";
    PLEASE CAN I KNOW IF THERE IS ANY WAY TO DROP PARENT PARTITION WITHOUT DISABLE/ENABLE FOREIGN CONSTRAINTS
    Thanks

    SQL Error: ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    02266. 00000 - "unique/primary keys in table referenced by enabled foreign keys"
    *Cause: An attempt was made to truncate a table with unique or
    primary keys referenced by foreign keys enabled in another table.
    Other operations not allowed are dropping/truncating a partition of a
    partitioned table or an ALTER TABLE EXCHANGE PARTITION.
    *Action: Before performing the above operations the table, disable the
    foreign key constraints in other tables. You can't do that until you disable the foreign key constraint
    http://jonathanlewis.wordpress.com/2006/12/10/drop-parent-partition/
    Hope this helps
    Mohamed Houri
    www.hourim.wordpress.com

  • Legacy Mapping Problem: Compound PK is Foreign Key

    My job is to map beans using JPA onto a legacy database schema that must not get modified. I am stuck with doing the relation between two tables.
    The schema is:
    CREATE TABLE A (
         a1 INTEGER NOT NULL,
         a2 INTEGER NOT NULL,
         PRIMARY KEY (a1, a2)
    CREATE TABLE B (
         b1 INTEGER NOT NULL,
         b2 INTEGER NOT NULL,
         b3 INTEGER NOT NULL,
         FOREIGN KEY f (b1, b2) REFERENCES A (a1, b2) ON UPDATE CASCADE ON DELETE CASCADE,
         PRIMARY KEY (b1, b2, b3)
    )As you can see, both tables have compound primary keys, and the primary key of table B contains a foreign key to table A. This is typical in our DB because B in fact acts like a "inner table" (in the sense of "inner class") to A.
    So far I defined both classes and provided a primary key, but the question now is, how to provide the relation between both? The relation shall be unidirectional, so that I can query all Bs belonging to one A by "myA.getBs(): Collection".
    The code I have written so far is:
    @Entity
    public class A {
         @EmbeddedId
         private APK primaryKey;
         @OneToMany
         private Collection<B> characteristics;
    @Embeddable
    public class APK {
         private String a1;
         private String a2;
    @Entity
    public class B {
         @EmbeddedId
         private BPK primaryKey;
    @Embeddable
    public class BPK {
         private String b1;
         private String b2;
         private String b3;
    }Unfortunately that is not working, because the JPA Provider (here: TopLink Essentials) tries to map the relationship on a third table named "A_B" that actually is not there.
    So how to tell TopLink to find the mapping information in table B (just like using the foreign key f)?
    Please help, I am driving nuts!

    OK
    So i found out the real problem
    And the problem is that my CustomerHistory has a Text Field, as in a MS SQL Server TEXT Field
    When i changed it to a VARCHAR, it started working
    The strangest thing is that Customer also has a TEXT Field (mapped to a String) and i can do Finds without any problems
    So my question now is how can i work with TEXT in CMPs ?
    Thanks

  • How do you insert new records into multiple tables using the same unique primary key?

    I’ve created a PHP site and MySQL server using a free app called XAMPP.  I have successfully created a form in Dreamweaver that will write data to a (name) table in the SQL database.  Here’s my question: How do you write to two (or more) tables in the same database and pass the same primary key to both tables?  In the SQL database, I defined the first field as ID and set it as the primary key with auto update.  So, when you insert a new record, it creates a unique primary key for that record.  In my form, I’m capturing info that needs to be stored to two tables at the same time; a Name table and Address table. Since the Name and Address tables use the ID field as the primary key, I believe I will need to pass the ID value from the Name table to the insert of the Address table to insure they both have the same primary key, right?

    No. You probably need the primary key from one table to be a foreign key in the other tables. In any case, I believe you can use two methods to obtain the auto generated key. First with SQL:
    http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html
    And the other using a PHP function:
    http://us3.php.net/mysql_insert_id

  • Find which tables are linked to this one via foreign keys

    Hi, I need to drop & recreate a table, but this table is referenced by other tables via foreign key constraints.
    1. Is there a query I can run to find those tables (the ones referencing this one) ?
    2. What is the standard way to drop & recreate this table being referenced by others?

    1) You can try the following query:
    select r.owner, r.table_name
    from user_constraints r, user_constraints o
    where r.r_owner = o.owner and r.r_constraint_name = o.constraint_name
    and o.constraint_type in ('P','U') and r.constraint_type = 'R'
    and o.table_name = 'DEPT'
    2) To drop tables with references you can also use drop table cascade constraints,
    which will also drop constraints from tables:
    [email protected]> drop table dept;
    drop table dept
    ERROR at line 1:
    ORA-02449: unique/primary keys in table referenced by foreign keys
    [email protected]> drop table dept cascade constraints;
    Table dropped.
    Another way is to prepare a script which will remove the tables in proper order.
    Best Regards
    Krystian Zieja / mob

  • Questions about creating a foreign key on a large table

    Hello @ll,
    during a database update I lost a foreign key between two tables. The tables are called werteart and werteartarchiv_pt. Because of its size, werteartarchiv_pt is a partitioned table. The missing foreign key was a constraint on table werteartarchiv_pt referencing werteart.
    Some statistics about the sizes of the mentioned tables:
    werteart 22 MB
    werteartarchiv_pt 223 GB
    werteartarchiv_pt (Index) 243 GB
    I tried to create the foreign key again, but it failed with the following error (Excuses for the german error message):
    sqlplus ORA-00604: Fehler auf rekursiver SQL-Ebene 1
    sqlplus ORA-01652: Temp-Segment kann nicht um 128 in Tablespace TEMPS00 erweitert
    The statement I used:
    alter table werteartarchiv_pt
    add constraint werteartarchiv_pt_fk1
    foreign key (schiene, werteartadresse, merkmale)
    references werteart (schiene, werteartadresse, merkmale)
    on delete cascade
    initially deferred deferrable;
    So the problem seems to be, that Oracle needs a lot of temporary tablespace to generate the foreign key and I do not know how much and why.
    My questions now are, and hopefully someone is here, who can answer all or a part of it:
    1) Why does Oracle need temporary tablespace to create the foreign key? The foreign key uses the same columns like the primary key.
    2a) Is it possible to tweak the statement without using the temporary tablespace?
    2b) If it is not possible to avoid the usage of the temporary tablespace, is there a formula how to calculate the needed temporary tablespace?
    3) Is it possible to modify data in the tables while the foreign key is created or is the whole table locked during the process?
    Any help or hint is appreciated.
    Regards,
    Bjoern

    RollinHand wrote:
    My questions now are, and hopefully someone is here, who can answer all or a part of it:
    1) Why does Oracle need temporary tablespace to create the foreign key? The foreign key uses the same columns like the primary key.Because it's validating the data to ensure the foreign key won't be violated. If you had specified ENABLE NOVALIDATE when creating it then the existing data in the table wouldn't need to be checked and the statement should complete instantly (future data added would be checked by the constraint).
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/general005.htm
    Search for "Enable Novalidate Constraint State"

  • Does a foreign key have to be a primary key

    Hey all.I was checking on the database code written by sambapos.To my surprise, I found a foreign key that is not a primary key anywhere.
    Is that possible?
    If, so why?
    I am really astonished.

    Limitations and Restrictions
    A foreign key constraint does not have to be linked only to a primary key constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table.
    When a value other than NULL is entered into the column of a FOREIGN KEY constraint, the value must exist in the referenced column; otherwise, a foreign key violation error message is returned. To make sure that all values of a composite foreign key constraint
    are verified, specify NOT NULL on all the participating columns.
    FOREIGN KEY constraints can reference only tables within the same database on the same server. Cross-database referential integrity must be implemented through triggers. For more information, see
    CREATE TRIGGER (Transact-SQL).
    FOREIGN KEY constraints can reference another column in the same table. This is referred to as a self-reference.
    A FOREIGN KEY constraint specified at the column level can list only one reference column. This column must have the same data type as the column on which the constraint is defined.
    A FOREIGN KEY constraint specified at the table level must have the same number of reference columns as the number of columns in the constraint column list. The data type of each reference column must also be the same as the corresponding column in the column
    list.
    The Database Engine does not have a predefined limit on either the number of FOREIGN KEY constraints a table can contain that reference other tables, or the number of FOREIGN KEY constraints that are owned by other tables that reference a specific table.
    Nevertheless, the actual number of FOREIGN KEY constraints that can be used is limited by the hardware configuration and by the design of the database and application. We recommend that a table contain no more than 253 FOREIGN KEY constraints, and that it
    be referenced by no more than 253 FOREIGN KEY constraints.
    FOREIGN KEY constraints are not enforced on temporary tables.
    If a foreign key is defined on a CLR user-defined type column, the implementation of the type must support binary ordering. For more information, see
    CLR User-Defined Types.
    A column of type varchar(max) can participate in a FOREIGN KEY constraint only if the primary key it references is also defined as type
    varchar(max).
    Read this article
    http://msdn.microsoft.com/en-us/library/ms189049.aspx
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Is it possible to create foreign key from composite key in other table.

    SQL> desc PRODUCT_CONFIG_OPTION;
    Name Null? Type
    CONFIG_ITEM_ID NOT NULL VARCHAR2(20) --composite primary key
    CONFIG_OPTION_ID NOT NULL VARCHAR2(20) --composite primary key
    CONFIG_OPTION_NAME VARCHAR2(100)
    DESCRIPTION VARCHAR2(255)
    SEQUENCE_NUM NUMBER(18)
    LAST_UPDATED_STAMP TIMESTAMP(6)
    LAST_UPDATED_TX_STAMP TIMESTAMP(6)
    CREATED_STAMP TIMESTAMP(6)
    CREATED_TX_STAMP TIMESTAMP(6)
    SQL> DESC PRODUCT_CONFIG_ITEM;
    Name Null? Type
    CONFIG_ITEM_ID NOT NULL VARCHAR2(20)
    CONFIG_ITEM_TYPE_ID VARCHAR2(20)
    CONFIG_ITEM_NAME VARCHAR2(100)
    DESCRIPTION VARCHAR2(255)
    LONG_DESCRIPTION CLOB
    IMAGE_URL VARCHAR2(255)
    LAST_UPDATED_STAMP TIMESTAMP(6)
    LAST_UPDATED_TX_STAMP TIMESTAMP(6)
    CREATED_STAMP TIMESTAMP(6)
    CREATED_TX_STAMP TIMESTAMP(6)
    SQL> desc product;
    Name Null? Type
    PRODUCT_ID NOT NULL VARCHAR2(20)
    PRODUCT_TYPE_ID VARCHAR2(20)
    PRIMARY_PRODUCT_CATEGORY_ID VARCHAR2(20)
    MANUFACTURER_PARTY_ID VARCHAR2(20)
    FACILITY_ID VARCHAR2(20)
    INTRODUCTION_DATE TIMESTAMP(6)
    SUPPORT_DISCONTINUATION_DATE TIMESTAMP(6)
    SALES_DISCONTINUATION_DATE TIMESTAMP(6)
    SALES_DISC_WHEN_NOT_AVAIL CHAR(1)
    INTERNAL_NAME VARCHAR2(255)
    BRAND_NAME VARCHAR2(100)
    COMMENTS VARCHAR2(255)
    =========
    CREATE TABLE PROD_CONFIG_PROD_CONFIG_OPTION (
    PRODUCT_ID VARCHAR2(20),
    CONFIG_ITEM_ID VARCHAR2(20),
    CONFIG_OPTION_ID VARCHAR2(20),
    PAGE_NUM_TO NUMBER(18),
    ALTERNATE_PAGE_NUM_TO1 NUMBER(18),
    ALTERNATE_PAGE_NUM_TO2 NUMBER(18),
    ALTERNATE_PAGE_NUM_TO3 NUMBER(18),
    LAST_UPDATED_STAMP TIMESTAMP(6),
    LAST_UPDATED_TX_STAMP TIMESTAMP(6),
    CREATED_STAMP TIMESTAMP(6),
    CREATED_TX_STAMP TIMESTAMP(6),
    CONSTRAINT PK_PROD_CAT_CONFIG_MOD PRIMARY KEY (PRODUCT_ID),
    CONSTRAINT FK_PRODUCT_ID FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCT(PRODUCT_ID),
    CONSTRAINT FK_CONFIG_ITEM_ID FOREIGN KEY (CONFIG_ITEM_ID) REFERENCES PRODUCT_CONFIG_ITEM(CONFIG_ITEM_ID),
    CONSTRAINT FK_CONFIG_OPTION_ID FOREIGN KEY (CONFIG_OPTION_ID) REFERENCES PRODUCT_CONFIG_OPTION(CONFIG_OPTION_ID) )
    TABLESPACE DATA_SMALL
    i try to create this table if i omit 3rd foreign key constraint then table successfully created.but including trd foreign key constraint it return error "ORA-02270: no matching unique or primary key for this column-list"
    i checked everything is it possible to create foreign key from composite key in other table.

    And
    CONSTRAINT FK_CONFIG_OPTION_ID FOREIGN KEY (CONFIG_ITEM_ID,CONFIG_OPTION_ID) REFERENCES PRODUCT_CONFIG_OPTION(CONFIG_ITEM_ID,CONFIG_OPTION_ID)
    ?

Maybe you are looking for