Foreign key DML error

My apologies if this has been answered here already, but I did some research and could not find a matching problem.

I have a table called messages, defined as follows:

< pre >
-set the table
(Messages) CREATE TABLE
ID NUMBER CONSTRAINT pk_messages_id PRIMARY KEY,
title VARCHAR2 (255),
body VARCHAR2 (4000).
created_at TIMESTAMP,
removed_at TIMESTAMP
);
< / pre >

And I have a table of junction, called organization_messages, defined as follows:

< pre >
CREATE TABLE organization_messages)
organization_id VARCHAR2 (12),
message_id NUMBER,
CONSTRAINT fk_org_message_id
FOREIGN KEY (message_id)
Messages of REFERENCES (id)
ON DELETE CASCADE
);
);
< / pre >

I did this so that when a message is deleted, the join in organization_messages line would be deleted automatically, via the ON DELETE CASCADE.

I got your basic DML processing going on for the messages table in the APEX, but now that I've added the foreign key, I get this when I try to delete a line of messages:

< pre >
ORA-02291: integrity constraint (PASSPORT. FK_ORG_MESSAGE_ID) violated - key parent not found
Error failed to update org assignments.
Ok
< / pre >

What is the problem? Treatment of DML supplant triggers or the cascades? This work should and I don't have to put in place of the page process to remove lines to join first table... I have it back?

Thanks for the pair of eyes ;-)

Billy

Hello

AFAIK, using the option delete cascade is the method to use (of course, you can do all this "manually" but that shouldn't be necessary). The only thing I can think is that something is executed on the table organization_messages that can interfere with normal sql features - perhaps another page process and/or a trigger on a table?

Andy

Tags: Database

Similar Questions

  • SQL statement error INSERT The conflicted with the FOREIGN KEY constraint

    I recently installed a reporting for vmware vsphere software, but I get a SQL error. I opened a request for assistance with vmware, but so far they have not come up with a solution. The error is caused by: com.microsoft.sqlserver.jdbc.SQLServerException: instruction INSERT The conflicted with the FOREIGN KEY constraint 'FK_CB_VSM_NETWORK_VC_ID '. The conflict occurred in database 'VCChargebackVCC02', table "dbo." " CB_VSM_SERVER', column 'VC_ID '. I don't know a lot about SQL, so I'm lost in the extent of troubleshooting is concerned. If anyone has any ideas I'd love to hear them.

    SQL questions are better posed on Technet.  They are better equipped to manage the

    http://social.technet.Microsoft.com/forums/en-us/categories/

  • integrity of foreign key error

    I had the departments and officials from two tables
    employee table has a foreign key that is a primary key in the departments table
    IE department_id
    every time I try to delete records from the employee table using the department_id IE a foreign key
    then it displays error
    but when I do it through other constraints then the lines are to remove
    so why can't delete lines in the employees table using department_id which is a foreign key in the employees table
    and the primary key for the departments table?

    guys, it's really easy when you really look at the error message:

    The violation is not the FK on employees.department_id. (the name will be EMP_DEPT_FK)
    The violation is against the FK hr.dept_mgr_fk which refers to the column manager_id (employee id) in the departments. When you try to remove all dept 50 employees, you also try to remove the service manager, but which is not allowed due to the FK of departments. Try this:

    update departments set manager_id = null where id = 50;
    delete from employees where department_id = 50;
    

    Bjoern

  • Foreign key Error Message ORA - 01430

    I have a LSU_INTER_RESOURCES_T table name. I would like to add a constraint foreign key with the following command:

    ALTER table lsu_inter_message_t
    Add constraint inter_message_id_fk
    inter_request_id lsu_inter_requests_t (inter_request_id) ON DELETE CASCADE REFERENCES;

    The system returned the error message:
    ORA - 01430: added column already exists.

    If I drop the inter_request_id column I'll lose data, and when I create the constraint it places the column at the end of the table. Data loss is not a problem now because the table has no data, but down the line, I see that there is a real problem.

    I would like to have the foreign key defined in the sequence column, I chose when I designed the tabular presentation. IE I want to all key columns placed at the beginning of the table online.

    Can I move the column after that I have set it and how this is done? Is this a feature of 10g?

    Thank you, Ned

    Try

    alter table lsu_inter_message_t
    add constraint inter_message_id_fk
    foreign key(inter_request_id ) REFERENCES lsu_inter_requests_t(inter_request_id) ON DELETE CASCADE;
    
  • Error during DELETING foreign key violation lasts to self referential FK

    DB version: 10 gr 2

    In the example below, I have a self referencing foreign key mgr. When I DELETE records
    I don't get an error ORA-02292 of self referencing FK.
    create table emp2 
     (
     empno number primary key,
     mgr   number references emp2( empno )
     );
    
    Table created.
    
    
    
    INSERT INTO EMP2 VALUES (2,2);
    
    INSERT INTO EMP2 VALUES(3,NULL);
    
    INSERT INTO EMP2 VALUES (4,3);
    
    COMMIT;
    
    SQL>DELETE FROM EMP2;
    
    3 rows deleted.
    But in one of our tables of Production which has an auto referential FK, I get an error similar to
    ERROR at line 1:
    ORA-02292: integrity constraint (SCOTT.EMP2_FK) violated - child record found
    When I try to delete records. No idea why I get this error?

    Hi Garry,

    Your FK said "all Manager must be an employee."

    If this statement

    DELETE FROM EMP3 WHERE EMPNO<5;
    

    which is a gross violation from the Manager of EMPNO = 6 would not be an employee.

    How do you solve that?

    Expected EMPNO = deleted 6?
    Should EMPNO = 6 I have a new Manager?
    Should EMPNO = 6 has no handler?

    But,

    GarryB wrote:
    Update the child column with null did not make a difference either (I always got the error).

    Not in my book, is not

    SQL> UPDATE EMP3 SET MGR = NULL
    WHERE MGR <5
    4 rows updated.
    SQL> DELETE FROM EMP3 WHERE EMPNO<5
    3 rows deleted.
    SQL> SELECT * FROM EMP3
    
         EMPNO        MGR
    ---------- ----------
             6
    1 row selected.
    

    Concerning
    Peter

  • Update fails because of a foreign key constraint

    Hello.

    I have several tables in my database but 3 are important. One of them is used (Employee_ID, Last_Name and other irrelevant columns name), dentist (employe_id, Qualifications) and Wizard (Employee_ID, Qualifications).
    I am applying in Oracle Application Express and trying to update a row in the Employee table, I get an ORA-20505: error in DML: p_rowid = 96, p_alt_rowid = employe_id, p_rowid2 =, p_alt_rowid2 is. ORA-02292: integrity constraint (DB. Dentist_CON) violated - book of the foundling

    Now, first of all, I had the same problems with the removal of lines, but I've solved that by adding a delete cascade on foreign keys.
    I have key constraints foreign both in my paintings dentist and Assistant in columns Employee_ID and these refer to Employee_ID in the Employee table.

    When I update anything in my Express request form, I've allowed users to do anything of my Employee table primary key (employe_id). Any changes that might occur therefore columns unrelated to the primary key. For example, if I change the name of a particular line column I can't update because I get the above error.

    I don't understand why this is happening.
    If I could get a glimpse, why this is happening or using any I would be very happy.

    Thanks in advance.

    982909 wrote:
    But it is not true. If I'm changing the name of the employee and update this line in employee WITHOUT changing the value of Employee_ID how can I possibly change the daughter line? This is what is confusing in that me and I have no idea on how to solve it.

    the code below shows above is NOT true

    CREATE OR REPLACE TRIGGER "Employee_T1".
    FRONT
    Insert or update on "employee."
    for each line
    Start
    Select employee_sequence.nextval in: double new.employee_id;
    end;
    /

    TRIGGER above changes EMPLOYEE_ID for all training update!

  • How can I make sure that changes in a primary key (in the parent table) would also appear directly in the FOREIGN KEY in the child table?

    Forgive my question. I am very new to Oracle.

    How can I make sure that changes in the key primary supplier_id (concerning the supplier table) would also appear directly in the FOREIGN KEY (supplier_id) in the products table?

    Is that not all the primary key and FOREIGN KEY on?

    My paintings:

    I created 2 tables and connect to apply in the data base referential integrity, as I learned.

    CREATE TABLE - parent provider

    (the numeric (10) of supplier_id not null,)

    supplier_name varchar2 (50) not null,

    Contact_Name varchar2 (50).

    CONSTRAINT supplier_pk PRIMARY KEY (supplier_id)

    );

    CREATE TABLE - child products

    (the numeric (10) of product_id not null,)

    supplier_id numeric (10) not null,

    CONSTRAINT fk_supplier

    FOREIGN KEY (supplier_id)

    REFERENCES beg (supplier_id)

    );

    I inserted the following text:

    INSERT INTO provider

    (supplier_id, supplier_name, contact_name)

    VALUES

    (5000, 'Apple', 'first name');

    I expect that the supplier_id (5000) to the provider of the table also appears in the products table under key supplier_id having the same value which is 5000. But this does not happen.

    How to get there?

    Thanks in advance!

    Hello

    What is a foreign key in Oracle?

    A foreign key is a way to ensure referential integrity in your Oracle database. A foreign key means that the values of a table must appear also in another table.

    Ok!??

    What is now the right way to implement referential integrity in your Oracle database that the values of a table must also be included in another table?

    A foreign key referential integrity indeed enfore in ensuring that the value in the child table must have a corresponding parent key (otherwise you will encounter an error, as evidenced by "SomeoneElse"). However, it will never automatically insert a row in the other table.

    If you are looking for a solution that automatically inserts a record in the other table, maybe you should go for triggers:

    See:

  • Two foreign keys of a table in a single column

    Hi gurus

    I wonder that can we add two foreign keys of a table on a single column, I think the answer is, but what should be the reason behind this?

    Appreciate if someone there explain to me...

    Concerning

    Muzz

    Hello Muzz,

    Perhaps the example of human Chen reveals a design error.
    If a student has a 'teacher_id' "teacher" FK and FK for "emp" becaue each teacher is an EMP, I guess that the correct design would be to have only the FK of 'teacher' and to have another pointing to the 'emp' table in the 'teacher' tabe FK

    But we can imagine comical situations...
    CREATE TABLE PEOPLE (id NUMBER of KEY PRIMARY, name VARCHAR2 (20 CHAR),...);
    CREATE TABLE SCIENTIST (id people KEY PRIMARY NUMBER (id) REFERENCES, discipline VARCHAR2 (20 CHAR),...);
    CREATE TABLE POLICEMAN (id REFERENCES to KEY PRIMARY NUMBER (id), hire_date people DATE,...);

    First table = all.
    2nd: a subset of the first, with people having the profile of 'scientific '...
    3rd: a subset of the first, with people being a policeman.
    It might be people first table and in none of the 2nd and 3rd, 1st and 2nd, 1st and 3rd only or in the 3 tables.

    Then we can have a fourth table of 'something' referring to a person who must be a scientist and a police officer.

    Here is a sqlplus session illustrating; the last piece: I try inserting several lines in xxxx, only the last is accepted.

    SQL > CREATE TABLE PEOPLE (id NUMBER of the PRIMARY KEY, name VARCHAR2 (20 CHAR));
    Table created.

    SQL > CREATE TABLE SCIENTIST (people of REFERENCES of KEY PRIMARY NUMBER id (id), discipline VARCHAR2 (20 CHAR));
    Table created.

    SQL > CREATE TABLE POLICEMAN (people of REFERENCES of KEY PRIMARY NUMBER id (id), DATE hire_date);
    Table created.

    SQL > CREATE TABLE XXXX (id PRIMARY KEY NUMBER, people_id NUMBER, any other VARCHAR2 (30 CHAR));
    Table created.

    SQL > ALTER TABLE ADD CONSTRAiNT fk_xxsci FOREIGN KEY (people_id) scientific xxxx REFERENCES (id);
    Modified table.

    SQL > ALTER TABLE ADD CONSTRAiNT fk_xxpol FOREIGN KEY (people_id) police xxxx REFERENCES (id);
    Modified table.

    SQL > INSERT INTO person VALUES (100, 'John');
    1 line of creation.

    SQL > INSERT INTO person VALUES (120, 'Mary');
    1 line of creation.

    SQL > INSERT INTO person VALUES (103, 'Tom');
    1 line of creation.

    SQL > INSERT INTO person VALUES (123, "Bruno");
    1 line of creation.

    SQL > INSERT INTO VALUES of scientific (120, 'Chemistry');
    1 line of creation.

    SQL > INSERT INTO scientific VALUES (123, 'Mathematics');
    1 line of creation.

    SQL > INSERT INTO VALUES of policeman (103, DATE ' 2001-04-01');
    1 line of creation.

    SQL > INSERT INTO VALUES of policeman (123, DATE ' 1998-07-01');
    1 line of creation.

    SQL > INSERT INTO xxxx VALUES (1, 456, "nothing");
    ERROR on line 1:
    ORA-02291: integrity constraint (SYS. FK_XXPOL) violated - key parent not found

    SQL > INSERT INTO xxxx VALUES (1, 100, "only to people");
    ORA-02291: integrity constraint (SYS. FK_XXPOL) violated - key parent not found

    SQL > INSERT INTO xxxx VALUES (1, 120, "only the learned");
    ORA-02291: integrity constraint (SYS. FK_XXPOL) violated - key parent not found

    SQL > INSERT INTO xxxx VALUES (1, 103, "only police officer");
    ORA-02291: integrity constraint (SYS. FK_XXSCI) violated - key parent not found

    SQL > INSERT INTO xxxx VALUES (1, 123, 'ok');
    1 line of creation.

    Best regards

    Bruno Vroman.

  • Is a foreign key MUST have a UNIQUE or PK column as a reference?

    First I tried, from what I saw Yes it must be Unique or PK. Secondly, I am pretty sure that I read somewhere where there are PK or unique. Thirdly, I checked oradocs and other pages, the thing ends, I owe an answer

    Constraint foreign key (also called a constraint referential integrity) designates a column as a foreign key and establishes a relationship between this foreign key and a primary or unique key specified, called the referenced key.


    This implies, but does not explicitly specify that it MUST be a PK or a SINGLE.


    Basically I want a simple yes/no answer just to give me some peace of mind. I don't want to waste any time, but changes to the oracle from time to time, and I'd rather have a confirmation from someone with more knowledge/experience.


    Thank you!

    Yes.

    This same document you are referencing tells you what are the rules for the creation of a foreign key.

    Data integrity

    Foreign key constraints

    Whenever two tables have one or more common columns, Oracle database can apply the relationship between the two tables with a foreign key, also called a referential integrity constraint constraint. The constraint requires that for each value in the column on which the constraint is defined, the value in the other specified that another table and column must match. An example of a referential integrity rule is that an employee may work for only one Department.

    Table 5-2 lists the terms associated with referential integrity constraints.

    Table 5-2 referential integrity constraint conditions

    Term Definition

    Foreign key

    The column or set of columns included in the constraint definition that refers to a key that is referenced. For example, the department_id column employees is a foreign key that refers to the department_id column of departments .

    Foreign keys can be described as several columns. However, a composite foreign key must refer to a primary or unique key with the same number of columns and the same types of data.

    The value of the foreign keys can be either the primary or unique key value referenced or be null. If any column of a composite foreign key is null, then the portions not null the key do not match any corresponding part of a parent key.

    Referenced key

    The unique key or the primary key of the table referenced by a foreign key. For example, the department_id column departments is the key referenced to the department_id column of employees .

    Table dependent or child

    The table containing the foreign key. This table is based on the values present in the primary or unique key referenced. For example, the employees table is a child of departments .

    Referenced or the parents table

    The table that is referenced by the foreign key of the child table. It is the key to this table reference that determines whether specific inserts or updates are allowed in the child table. For example, the departments table is a parent of employees .

    The first three terms defined in the table EXPLICITLY State references to the 'core' or 'unique' keys to the parent.

    The doc also refers to the Application Developer Guide:

    Maintaining the integrity of the data in Database Applications

    Foreign key references a primary key by default

    If the list of columns is not included in the REFERENCES option when you set a FOREIGN KEY constraint (simple or composite column), then Oracle database assumes that you want to reference the primary key of the specified table. You can also explicitly specify the columns to reference the table parent in parentheses. Oracle database checks automatically to check this list of column refers to a primary or unique to the parent table key. If it isn't, an informative error is returned.

    That the entire paragraph is as explicitly as it gets.

    No list of columns? Oracle then checks for a primary key.

    There is a list of columns? Then Oracle 'control to verify this list of column made reference to a primary or unique key'...

  • Online syntax to create Foreign key with Alter Table statement

    I am a pretty meticulous reader. That being said, from the 4 texts that I read to start to learn SQL, I do not remember and do more that probably not, find a syntax online for the creation of a CF with the statement alter table.

    Just something I thought while I was reading.

    Is there a such syntax?

    And if so someone can give me direction on my code?

    ALTER table emp4 change employee_id key foreign employees of references (employe_id);

    It gives me the option error invalid alter table.

    Any idea would be appreciated.

    Thank you.

    rp0428 wrote:

    A foreign key is a constraint, you must use ADD CONSTRAINT.

    Thare is more than one way to skin a cat:

    SQL > create table tbl (id number, name varchar2 (10))
    2.

    Table created.

    SQL > alter table tbl adds (foreign key references emp (empno))
    2.

    Modified table.

    SQL > select constraint_name,.
    2 constraint_type
    3 from user_constraints
    4 where table_name = 'TBL '.
    5.

    CONSTRAINT_NAME C
    ------------------------------ -
    SYS_C0021920 R

    SQL > drop table tbl purge
    2.

    Deleted table.

    SQL > create table tbl (id number, name varchar2 (10))
    2.

    Table created.

    SQL > alter table tbl change (foreign key references emp (empno))
    2.

    Modified table.

    SQL > select constraint_name,.
    2 constraint_type
    3 from user_constraints
    4 where table_name = 'TBL '.
    5.

    CONSTRAINT_NAME C
    ------------------------------ -
    SYS_C0021921 R

    SQL >

    SY.

  • Schema import Gets the foreign key number

    Hi all;


    Scott has a table named rank-> he has primary key-> different tablespace

    Sharma has a table named emp-> he has foreign key-> different tablespace

    $ imp/System Manager queue = refresh_sharma.dmp log = refresh_sharma_imp.log fromuser = touser = sharma sharma

    Import: Free 11.2.0.1.0 - Production Thursday, may 7, 18:35:03-2015

    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    Export file created by EXPORT: V11.02.00 direct

    import in US7ASCII and AL16UTF16 NCHAR character set

    import server uses WE8MSWIN1252 (possible character set conversion) character set

    Customer export uses the (possible character set conversion) WE8MSWIN1252 character set

    . import of objects in SHARMA SHARMA

    . . import of partition "CONT_EMP": "P1" 4000 imported lines

    . . import of partition "CONT_EMP": "P2" 5000 imported lines

    . . import of partition 'CONT_EMP': 'P3' 5000 imported lines

    . . "DEPT" table import 12 lines imported

    . . import of table 'EMP' 68278 imported lines

    . . importing table "EMP_AUDIT" 4 imported lines

    . . table 'Method' import 68000 lines imported

    . . importing table "EMP_PERS_INFO" 68278 imported lines

    . . importing table "EMP_PROJ_INFO" 68278 imported lines

    . . table 'LOGTAB' import 603 lines imported

    . . table import "PAYROLL" 186282 imported lines

    . . import of table 'of the PROJECT"22 rows imported

    . . importation of "TAB1" 4000000 imported table rows

    . . table import 'TRANSPORT' 0 rows imported

    IMP-00017: statement failed with error ORACLE 1031:

    'ALTER TABLE 'EMP' ADD 'EMP_EMPLEV_C12_FK' OF CONSTRAINT FOREIGN KEY ("EMP_LEVE" '.

    ""L") REFERS TO"SCOTT" CATEGORY"("GRADE_NAME") ENABLE NOVALIDATE.

    IMP-00003: ORACLE error 1031

    ORA-01031: insufficient privileges

    About to activate the constraints...

    IMP-00017: statement failed with error ORACLE 2430:

    ' ALTER TABLE 'EMP' ENABLE CONSTRAINT "EMP_EMPLEV_C12_FK"

    Import completed successfully with warnings.

    30, 31 line number is display error.

    'ALTER TABLE 'EMP' ADD 'EMP_EMPLEV_C12_FK' OF CONSTRAINT FOREIGN KEY ("EMP_LEVE" '.

    ""L") REFERS TO"SCOTT" CATEGORY"("GRADE_NAME") ENABLE NOVALIDATE.

    After the import operation, to recreate the foreign key is the right option. but

    By performing the import operation, how can all I avoid this error dump file or log file?

    I don't want to use constraints = N.


    Thanks in advance


    You gave * of * SCOTT * at * SHARMA.  The grant received by SHARMA not getting exported when you export SHARMA.  So, it is not imported when you import SHARMA.  If you did an export and import of SCOTT before SHARMA, the award of the cross-schema would have also been imported.  (Subsidies granted by a user are exported with the user, the subsidies received by a user are not exported with the user).

    Hemant K Collette

  • ODI is not able to detect the primary/foreign keys to XML - the user has no privilege or object not found

    Hi guys,.

    Im trying to load an XML with the address of two entities and employee as below. The topology of reverse engineering, everything works well. Even able to display the xml data in ODI, but when I try to load the data of these two entities join by the schema of the primary keys and foreign keys which created odi engineering process reverses for xml, im im getting the error below.  IM able to load an entity data, error occurs only when I use the join odi creates internally to identify employees for xml and address components

    XML file:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < EMP >

    < Empsch >

    < employee >

    < EmployeeID 12345 > < / EmployeeID >

    < original > t < / initials >

    John < name > < / LastName >

    DOE < FirstName > < / name >

    < / employee >

    < address >

    < > 12345 as WorkPhone < / as WorkPhone >

    < WorkAddress > test 234 < / WorkAddress >

    < / address >

    < / Empsch >

    < / EMP >

    Topology: jdbc:snps:xml?f=C:/Temp/RR/Empsch.xml & s = Empsch & re = EMP & dod = true & nobu = false

    Error message:

    -5501: 42501: java.sql.SQLException: user has no privilege or object not found: EMPSCH. EMPSCHPK

    java.sql.SQLException: user has no privilege or object not found: EMPSCH. EMPSCHPK

    at org.hsqldb.jdbc.Util.sqlException (unknown Source)

    for org.hsqldb.jdbc.JDBCPreparedStatement. < init >(Unknown Source)

    at org.hsqldb.jdbc.JDBCConnection.prepareStatement (unknown Source)

    at com.sunopsis.jdbc.driver.xml.SnpsXmlConnection.prepareStatement(SnpsXmlConnection.java:1232)

    at sun.reflect.GeneratedMethodAccessor65.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    to oracle.odi.core.datasource.dwgobject.support.OnConnectOnDisconnectDataSourceAdapter$ OnDisconnectCommandExecutionHandler.invoke (OnConnectOnDisconnectDataSourceAdapter.java:200)

    to $Proxy2.prepareStatement (Unknown Source)

    at oracle.odi.runtime.agent.execution.sql.SQLCommand.doInitializeStatement(SQLCommand.java:83)

    at oracle.odi.runtime.agent.execution.sql.SQLCommand.getStatement(SQLCommand.java:117)

    at oracle.odi.runtime.agent.execution.sql.SQLCommand.getStatement(SQLCommand.java:111)

    at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:81)

    at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)

    at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:70)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    Caused by: org.hsqldb.HsqlException: the user has no privilege or object not found: EMPSCH. EMPSCHPK

    at org.hsqldb.error.Error.error (unknown Source)

    at org.hsqldb.ExpressionColumn.checkColumnsResolved (unknown Source)

    at org.hsqldb.QueryExpression.resolve (unknown Source)

    at org.hsqldb.ParserDQL.compileCursorSpecification (unknown Source)

    at org.hsqldb.ParserCommand.compilePart (unknown Source)

    at org.hsqldb.ParserCommand.compileStatement (unknown Source)

    at org.hsqldb.Session.compileStatement (unknown Source)

    at org.hsqldb.StatementManager.compile (unknown Source)

    at org.hsqldb.Session.execute (unknown Source)

    ... more than 27

    Please advice

    Thank you

    Fabien

    It is clear from the content of the xml file, you have given here. In this xml file, you have four type of complex. Two of them are employed and address. However the employee doesnot has nothing to do with the address that you have not added the relationship. That is why its failure. This isn't the fault of the ODI.

    Also I suggest not to use self-generated by ODI dtd that you might face problem in the future. For example, the address of XML type has 8 attributes, and 4 of them are not mandatory. This means that each of your xml file may have attributes between 4 and 8.  That's where ODI auto generated DTD fails.

    ComplexType element XML schema

    Thank you

    Chantal

  • Can we create a foreign key by using built in functions?

    Hi all

    I'm in the need to create a foreign key referring to an expression of a column in another table.

    For example, I try below and I got some errors.

    CREATE TABLE TABLE_A

    (

    student_id VARCHAR2 (30),

    student_name VARCHAR2 (100),

    CONSTRAINT fk_A FOREIGN KEY (student_id) REFERENCES TABLE_B (UPPER (column_name))

    );

    Please suggest if it is possible that a foreign key could be made in an expression or not?

    2761969 wrote:

    Hi all

    I'm in the need to create a foreign key referring to an expression of a column in another table.

    For example, I try below and I got some errors.

    CREATE TABLE TABLE_A

    (

    student_id VARCHAR2 (30),

    student_name VARCHAR2 (100),

    CONSTRAINT fk_A FOREIGN KEY (student_id) REFERENCES TABLE_B (UPPER (column_name))

    );

    Please suggest if it is possible that a foreign key could be made in an expression or not?

    No - it isn't.

    You can, however, create a VIRTUAL column in the parent table, and then create a foreign key that references.

  • Foreign Key ON DELETE RESTRICT

    Hello

    I m doing error when using the foreign key, could you let me know if there is a syntax error.

    Rank of CREATE TABLE (course_no VARCHAR2 (33) NOT NULL,)

    student_id VARCHAR2 (33) NOT NULL,

    grade VARCHAR2 (2),

    CONSTRAINT FK_COURSE

    FOREIGN KEY (course_no) REFERENCES race (course_no) ON DELETE RESTRICT

    );

    Error report:

    SQL error: ORA-00905: lack of keyword

    Thank you

    There is no keyword to remove not limited to Oracle.  Stop the removal of the parent if there is a child is the default unless overridden by a waterfall, or null.  Otherwise, you can never delete a parent in Oracle.

    John

  • missing closing parenthesis when creating foreign key

    Schema1.Table1 ALTER TABLE ADD (CONSTRAINT test_FK

    FOREIGN KEY (test)

    REFERENCES schema1.table2 (test)

    USING INDEX TABLESPACE indextb);

    With the HELP of INDEX TABLESPACE indextb)

    *

    ERROR on line 4:

    ORA-00907: lack of right parenthesis

    Please help, I tried several times. But I still get the same error

    Delete the TABLESPACE of INDEX clause to HELP.  It is not valid here.

    Create a foreign key does not implicitly create an index.  Since there is no index, there is no tablespace to worry.  As a general rule, you don't want to create an index to support the how foreign key constraint there a sense perhaps specify a tablespace.

    Justin

Maybe you are looking for

  • Battery, specifically in the night with ios10

    It happens to me all the time, when the night comes and I don my body with this sweet sleep, it's rough on my iPhone.  Really difficult.  I'll just go on my what happened to my phone last night... I went to bed around 01:30, my phone was 93%.  Here i

  • sound with lg monitor problems

    Recently I bought a LG monitor for mini mac. At the highest level, I can barely hear the sound. Used HDMI for the connection between the monitor and mini. Y at - it something I can do to improve it. Not a problem with the prior monitor. THX, mike

  • Z820 with LSI 2308 sas controller will not publish with intel PCIe SSD installed.

    Z820 with LSI 2308 sas controller will not publish with intel PCIe SSD installed. The system works fine with Sata 600 pro SSD for windows and WD 4 TB Black seagate for storage. When the Intell 900 PCIe SSD drive is installed the system hangs at the L

  • Install Windows 7 on Lenovo G500 with no operating system

    Windows 7 installation of the cd has frozen to extend the files of 0%. The version of windows 7 previos and all partitions have been removed during installation. I can't access bios or menu command start (Fn + F2 or Fn + F12). All I see is black scre

  • graphics compatible with ideapad y510, Windows 7 ultimate 64-bit NVIDIA driver?

    I reinstalled my ideapad with the new windows 7 64 bit. Everything works fine; the requirements for my video or graphics card. I have nVidia graphics (perhaps Geforce 8600 or somethings like that). But after that I got this new win7, older drivers ar