ORA-00904 After modifying table

I have a versioned table named cnstrnt. Due to the number of existing constraints, I was unable to unversion it, but had to add a column (note: bad idea #1). I ran the command "exec dbms_wm.beginddl('cnstrnt'); alter table cnstrnt_lts add (cnstrnt_num number(1) not null); " When I tried to commit, I received an error. Another error was received when rolling back. I then forced the commit using the ignore_last_error=>true (bad idea #2); I then decided that I had no choice but to unversion it (wish that I had come to this conclusion earlier); I received an error that it had a problem with the my new column. In my infinate wisdom, I tried to roll back the DB to a point in time before I started messing with the table. I did not go back far enough, and because it was open with "resetlogs", no longer have the datafiles. I was able to do a beginddl on the table, and removed the column. It commited without a problem. Now that I am trying to do a new ddl on the table (new constraint to an existing versioned table), I am receiving the ORA-00904 error stating that the cnstrnt_num column is an invalid qualifier. I see everywhere that I went wrong. Any help on getting me out of this mess?

We support all of the conditions that you list. When you need to perform DDL on a table that contains a foreign key, you need to be sure to call beginDDL and commitDDL on the tables in the appropriate order, which is outlined in the user guide. Also note that workspaces are not created for a specific table. Once a workspace is created it can be used by any user that has the necessary privileges, and any table can be modified within it.
I think the issue here is that ignore_last_error was set to true, and the statement that was ultimately skipped, was required for normal functionality. This parameter should only be used when it is safe to do so, and you know how to recover from skipping the statement.
If you do end up filing a TAR, all of this can be addressed further using your specific case/example.
Regards,
Ben

Similar Messages

  • ORA-00604 & ORA-30512 CANNOT MODIFY TABLE MORE THAN ONCE IN A TRANSACTION

    We have a requirement where two tables should be in sync at any given point
    in time with respect to the structure of the tables.
    Any change on table/column via ALTER (MODIFY, ADD, RENAME COLUMN, DROP
    COLUMN) on the parent table should be replicated to the replica table.
    I created a DDL_TRIGGER on the schema and the desired result is achieved but
    for the following one scenario for which its failing.
    The issue is, if we try to reduce the width of the column (via ALTER ..
    MODIFY) it fails with the following error
    ORA-00604: error occurred at recursive SQL level 1
    ORA-30512: cannot modify DEVTESTF_OIM.REPLICA_ABC more than once in a
    transaction
    Please follow the steps to reproduce the issue (the issue is across the DB
    version checked on 10.2, 11.1 and 11.2 DB version)
    -- Step1 Create Parent Table
    CREATE TABLE abc (col1 VARCHAR2(10))
    -- Step2 Create Replica Table
    CREATE TABLE replica_abc (col1 VARCHAR2(10))
    -- Step3 Create DDL Trigger
    CREATE OR REPLACE TRIGGER ddl_trigger
    AFTER ALTER ON SCHEMA
    DECLARE
    operation VARCHAR2(30);
    object_name VARCHAR2(30);
    l_sqltext VARCHAR2(100);
    i PLS_INTEGER;
    l_count NUMBER:=0;
    sql_text dbms_standard.ora_name_list_t;
    BEGIN
    i := dbms_standard.sql_txt(sql_text);
    SELECT ora_sysevent, ora_dict_obj_name, UPPER(sql_text(i))
    INTO operation, object_name, l_sqltext
    FROM dual;
    IF ora_dict_obj_name = 'ABC' THEN
    l_count := INSTR(l_sqltext,'ADD CONSTRAINT',1,1);
    l_count := l_count + INSTR(l_sqltext,'DISABLE',1,1);
    l_count := l_count + INSTR(l_sqltext,'DROP CONSTRAINT',1,1);
    l_count := l_count + INSTR(l_sqltext,'PRIMARY KEY',1,1);
    l_count := l_count + INSTR(l_sqltext,'ADD CHECK',1,1);
    IF (l_count = 0) THEN
    l_count := INSTR(l_sqltext,'ADD',1,1);
    l_count := l_count + INSTR(l_sqltext,'MODIFY',1,1);
    l_count := l_count + INSTR(l_sqltext,'DROP COLUMN',1,1);
    l_count := l_count + INSTR(l_sqltext,'RENAME
    COLUMN',1,1);
    IF (l_count >0) THEN
    l_sqltext := REPLACE(l_sqltext,'TABLE ABC','TABLE REPLICA_ABC');
    execute immediate l_sqltext;
    END IF;
    END IF;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE ;
    END;
    -- Step 4 Issue the following ALTER command on the Parent table 'ABC'
    ALTER TABLE ABC MODIFY COL1 VARCHAR2(9);
    will show the following
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-30512: cannot modify DEVTESTF_OIM.REPLICA_ABC more than once in a
    transaction
    ORA-06512: at line 34
    whereas the following commands works fine
    ALTER TABLE ABC MODIFY COL1 VARCHAR2(11);
    and also the rest of the operations
    ALTER TABLE ABC ADD COL2 VARCHAR2(20);
    ALTER TABLE ABC RENAME COLUMN COL2 TO COL3;
    ALTER TABLE ABC DROP COLUMN COL3;
    The issue is while reducing the size of VARCHAR2 columns, while the rest of
    option works fine.
    Any suggestion or workaround please.

    It looks like a bug to me. The failing statement from the SQL trace is
    PARSE ERROR #12:len=77 dep=3 uid=0 oct=3 lid=0 tim=1263332549608656 err=30512
    select /*+ first_rows */ 1 from "TIM"."REPLICA_ABC" where LENGTHB("COL1") > 9and exception cannot explain it.

  • ORA-00904 on CREATE TABLE with virtual column based on XMLTYPE content

    Hello,
    this is another one for the syntax gurus...
    Trying the following, fails with ORA-00904: "MESSAGE"."GETROOTELEMENT": invalid identifier
    CREATE TABLE XML_TEST_VIRT
       MSG_TYPE         GENERATED ALWAYS AS (MESSAGE.GETROOTELEMENT()) VIRTUAL,
       MESSAGE  XMLTYPE             NOT     NULL,
       IE906    XMLTYPE             DEFAULT NULL
       XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
       XMLTYPE COLUMN IE906   STORE AS SECUREFILE BINARY XML
    /while this one succeeds
    CREATE TABLE XML_TEST_VIRT
       MSG_TYPE         GENERATED ALWAYS AS (EXTRACT(MESSAGE, '/*').GETROOTELEMENT()) VIRTUAL,
       MESSAGE  XMLTYPE             NOT     NULL,
       IE906    XMLTYPE             DEFAULT NULL
       XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
       XMLTYPE COLUMN IE906   STORE AS SECUREFILE BINARY XML
    /The GETROOTELEMENT member function of SYS.XMLTYPE is declared as "DETERMINISTIC PARALLEL_ENABLE" so the method getting called is not the problem as the 2nd case proves.
    Using the column MESSAGE which is of type XMLTYPE directly seems to be the problem. But the question is "why". The EXTRACT function result is of type XMLTYPE and calling its member works, the column is also of type XMLTYPE yet calling its member fails...
    Thanks in advance for any insights on this.
    Best Regards
    Philip

    Hmmmm ... I don't know if I should smile or frown with the implication that I am an OO guy :D :D
    Most of my colleagues when I started working as a software engineer, treated me as too low-level because of my C background (started doing C in 1985).
    In my last job, my colleagues hated my guts because I was asking them to squeeze every bit of performance out of C++ by using STL which is definitely not OO (although C++ is).
    My current colleagues treat me as a DB guru (which I most definitely am not) and they overlook/forget the fact that most of them use Java libraries in their projects, that I wrote for them !
    I am inclined to believe that I do not fall into any category in the end...
    The only thing I am for sure - and I am proud of it - is inquisitive. I want to know everything there is about the tools I use, and so I end up spending hours and hours investigating... (Microsoft found that out the hard way when I filed 16 bug reports in 8 days when Visual C++ 6 came out ! Not that it hurt them though...)
    This is where my confession ends (and my working on the XML validator starts...)
    Καληνύχτα Marco
    Philip (Φίλιππος in Greek)
    PS: I did not follow the last solution anyway. I just wanted to verify its operability ;)

  • ORA-00904 after Transport

    hi,
    when i transport a request to the production system i get ora-00904 error. i check with developers and everything seems ok from side.
    same request when transported to QA does not complaint
    help will be appreciated
    regards
    aijaz

    hi,
    - the error ORA-904 means:
    ORA-904 %s: invalid identifier / invalid column name
    This means that, from SAP a command is sent to the oracle database indicating a wrong column.
    What wou have to do is to identify
    - The command with the wrong column.
    - where this command is comming from
    - why it has a wrong column.
    There is not much we can do from a forum with the lack of informqtion provided.
    In the developer trace you should see the error and the command ( usually a query )
    Then you know the table. Compare the columns in the table, perhaps the table is different from the developer system.

  • ORA-00904 on create table with xmltype column

    Hi,
    I am trying to create a table with syntax
    CREATE TABLE ss_test(docid integer primary key, content varchar2(4000),acl XMLType)
    XMLType column acl store as object relational
    XMLSchema "acl.xsd" element "acl"
    varray xmldata."ace" store as table ace_tab;
    and getting ORA-00904.
    acl.xsd is registered as
    begin
    dbms_xmlschema.registerschema('acl.xsd',
    ' <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb">
    <xs:element name="acl" xdb:SQLType="ACL_TYPE">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ace" maxOccurs="100">
    <xs:complexType>
    <xs:attribute name="id" type="xs:integer"/>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>',true,true,false,false);
    end;
    Couldnt figure out whats wrong with the syntax. Any pointers ?
    Thanks,
    Rakesh

    Hmmmm ... I don't know if I should smile or frown with the implication that I am an OO guy :D :D
    Most of my colleagues when I started working as a software engineer, treated me as too low-level because of my C background (started doing C in 1985).
    In my last job, my colleagues hated my guts because I was asking them to squeeze every bit of performance out of C++ by using STL which is definitely not OO (although C++ is).
    My current colleagues treat me as a DB guru (which I most definitely am not) and they overlook/forget the fact that most of them use Java libraries in their projects, that I wrote for them !
    I am inclined to believe that I do not fall into any category in the end...
    The only thing I am for sure - and I am proud of it - is inquisitive. I want to know everything there is about the tools I use, and so I end up spending hours and hours investigating... (Microsoft found that out the hard way when I filed 16 bug reports in 8 days when Visual C++ 6 came out ! Not that it hurt them though...)
    This is where my confession ends (and my working on the XML validator starts...)
    Καληνύχτα Marco
    Philip (Φίλιππος in Greek)
    PS: I did not follow the last solution anyway. I just wanted to verify its operability ;)

  • Updating metadata in OWB after modifying tables in the database

    Hi All,
    In our data warehouse, one key field will suffer a change in data precision, from number(4) to number(5). This field exists in several tables across the database and I have created a procedure to alter all related tables in Oracle (10g). Is there a way to create a similar procedure or script to modify the metadata in OWB in order to reflect the changes in the altered tables from the database? I think the script should refresh the tables in the metadata but I'm not sure if it would be necessary to sincronize or validate the related mappings.
    I'm newbie in OWB so I'm not sure whether this is achievable or not.
    Thanks in advance for your guidance.
    Regards,
    Mauricio
    Edited by: mcruz on 21/03/2010 17:07

    Below is a OMBPlus tcl script to set the precision and scale of a specific column name in all tables of the current oracle module
    Prerequisite is that you have made the connection to the OWB repository in OMBPlus (OMBCONNECT) and have set the context to the right oracle module (OMBCC and set OMBPROMPT ON, the latter to display your current context in the prompt)
    Happy scripting.
    proc set_nbr_len {p_objtyp p_col_name p_scale p_precision} {
       set tbls [OMBLIST ${p_objtyp}S]
       foreach tbl $tbls {
          set cols [OMBRETRIEVE $p_objtyp '$tbl' GET COLUMNS '$p_col_name']
          foreach col $cols {
           set dattyp [OMBRETRIEVE $p_objtyp '$tbl' COLUMN '$col' \
                         GET PROPERTIES (DATATYPE)]
           if { [string first "NUMBER" $dattyp] != -1 } {
                puts "Column $col scale & precision reset in $p_objtyp $tbl"
                    OMBALTER $p_objtyp '$tbl' MODIFY COLUMN '$col' SET PROPERTIES \
                         (SCALE, PRECISION) VALUES \
                   ('$p_scale', '$p_precision')
       OMBCOMMIT
    set_nbr_len TABLE <your column name> <your precision> <your scale>

  • Problem in updating fa_additions SQL Error: ORA-01779: cannot modify a column which maps to a non key-preserved table

    Hi,
    After using sql loader to import informations in the table fa_mass_additions and after the functionnal uses a treatment to imputate this assets, it asks me to do an update on the table fa_additions to change the value of attribute1 but i get an error
    Error report:
    ORA-01779: cannot modify a column which maps to a non key-preserved table
    ORA-06512: at line 11
    01779. 00000 -  "cannot modify a column which maps to a non key-preserved table"
    *Cause:    An attempt was made to insert or update columns of a join view which
               map to a non-key-preserved table.
    *Action:   Modify the underlying base tables directly.
    please how can i do this update?

    Hi,
    The "fa_additions" is a view, not a table.
    You should update the base table "fa_additions_b".
    Regards,
    Bashar

  • ORA-00904 coming because of  table JOIN

    I have this query which works fine, how everwhen I attempt to join the pubsched table based on schedules.areaid = pubsched.areaid it comes up with ORA-00904
    telling me that the area id is invalid.
    Try commenting out line 8 of the query which joins the pubsched table and it will work fine.
    Line 8 uncommented blows it up.
    pubsched is used to determine if a schedule is published or not. Joining pubsched is being done to eliminate non published schedules from the query results.
    Just for clarification, need help making the join work.
    Any help is much appreciated.
    Thanks,
    George
    SELECT
    empid,
    areaid,
    startpp + day_number - 1 AS startdate,NULL AS starttime,NULL AS endtime,
    8 AS hours,
    0 AS minutes FROM schedules s
    JOIN payperiods pp ON pp.periodid = s.periodid
    JOIN pubsched ps on ps.periodid = s.periodid and ps.areaid=s.areaid
    UNPIVOT ( v
        FOR day_number IN (day1 AS 1,
                           day2 AS 2,
                           day3 AS 3,
                           day4 AS 4,
                           day5 AS 5,
                           day6 AS 6,
                           day7 AS 7,
                           day8 AS 8,
                           day9 AS 9,
                           day10 AS 10,
                           day11 AS 11,
                           day12 AS 12,
                           day13 AS 13,
                           day14 AS 14
    WHERE UPPER(SUBSTR (v, 1, 4)) = 'SHFT';
    select * from pubsched where areaid=2003 and periodid='092013';
    CREATE TABLE SCHEDULES
    SCHEDULEID NUMBER(12) NOT NULL,
    EMPID NUMBER(12) NOT NULL,
    PERIODID VARCHAR2(6 BYTE) NOT NULL,
    AREAID NUMBER(12) NOT NULL,
    DAY1 VARCHAR2(50 BYTE),
    DAY2 VARCHAR2(50 BYTE),
    DAY3 VARCHAR2(50 BYTE),
    DAY4 VARCHAR2(50 BYTE),
    DAY5 VARCHAR2(50 BYTE),
    DAY6 VARCHAR2(50 BYTE),
    DAY7 VARCHAR2(50 BYTE),
    DAY8 VARCHAR2(50 BYTE),
    DAY9 VARCHAR2(50 BYTE),
    DAY10 VARCHAR2(50 BYTE),
    DAY11 VARCHAR2(50 BYTE),
    DAY12 VARCHAR2(50 BYTE),
    DAY13 VARCHAR2(50 BYTE),
    DAY14 VARCHAR2(50 BYTE),
    NOPTIND1 INTEGER DEFAULT 0,
    NOPTIND2 INTEGER DEFAULT 0,
    NOPTIND3 INTEGER DEFAULT 0,
    NOPTIND4 INTEGER DEFAULT 0,
    NOPTIND5 INTEGER DEFAULT 0,
    NOPTIND6 INTEGER DEFAULT 0,
    NOPTIND7 INTEGER DEFAULT 0,
    NOPTIND8 INTEGER DEFAULT 0,
    NOPTIND9 INTEGER DEFAULT 0,
    NOPTIND10 INTEGER DEFAULT 0,
    NOPTIND11 INTEGER DEFAULT 0,
    NOPTIND12 INTEGER DEFAULT 0,
    NOPTIND13 INTEGER DEFAULT 0,
    NOPTIND14 INTEGER DEFAULT 0
    CREATE TABLE PAYPERIODS
    PERIODID VARCHAR2(6 BYTE) NOT NULL,
    STARTPP DATE,
    ENDPP DATE
    CREATE TABLE PUBSCHED
      PUBSCHEDID   NUMBER(12)                       NOT NULL,
      PERIODID     VARCHAR2(6 BYTE)                 NOT NULL,
      PUPDATE      DATE,
      PUBTHRU      DATE,
      AREAID       NUMBER(12)                       NOT NULL,
      PUBLISHEDBY  NUMBER(12)
    Insert into SCHEDULES
    (SCHEDULEID, EMPID, PERIODID, AREAID, DAY1,
    DAY2, DAY3, DAY4, DAY5, DAY6,
    DAY7, DAY8, DAY9, DAY10, DAY11,
    DAY12, DAY13, DAY14, NOPTIND1, NOPTIND2,
    NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
    NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
    NOPTIND13, NOPTIND14)
    Values
    (3693744, 753738, '092013', 2003, 'X',
    'SHFT<1530>', 'SHFT<1530>', '1530', '1530', '1530',
    'X', 'X', '1530', '1530', 'SHFT',
    '1530', '1530', 'X', 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0);
    Insert into SCHEDULES
    (SCHEDULEID, EMPID, PERIODID, AREAID, DAY1,
    DAY2, DAY3, DAY4, DAY5, DAY6,
    DAY7, DAY8, DAY9, DAY10, DAY11,
    DAY12, DAY13, DAY14, NOPTIND1, NOPTIND2,
    NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
    NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
    NOPTIND13, NOPTIND14)
    Values
    (3693745, 753740, '092013', 2003, 'X',
    'SHFT<1530>', 'SHFT<1530>', '1530', 'SHFT', '1530',
    'X', 'X', '1530', '1530', '1530',
    '1530', '1530', 'X', 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0);
    Insert into SCHEDULES
    (SCHEDULEID, EMPID, PERIODID, AREAID, DAY1,
    DAY2, DAY3, DAY4, DAY5, DAY6,
    DAY7, DAY8, DAY9, DAY10, DAY11,
    DAY12, DAY13, DAY14, NOPTIND1, NOPTIND2,
    NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
    NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
    NOPTIND13, NOPTIND14)
    Values
    (3693746, 753748, '082013', 2003, 'X',
    'SHFT<1530>', '1530', '1530', '1530', '1530',
    'X', 'X', 'SHFT<1530>', '1530', 'SHFT',
    '1530', '1530', 'X', 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0);
    COMMIT;
    Insert into PAYPERIODS
    (PERIODID, STARTPP)
    Values
    ('092013', TO_DATE('04/7/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    COMMIT;
    Insert into WMTSCHEDULER.PUBSCHED
       (PUBSCHEDID, PERIODID, PUPDATE, PUBTHRU, AREAID,
        PUBLISHEDBY)
    Values
       (51372, '092013', TO_DATE('03/07/2013 11:59:17', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('04/20/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 2003,
        752910);
    COMMIT;
    Expected Output
    EMPID,AREAID,STARTDATE,STARTTIME,ENDTIME,HOURS,MINUTES
    753738,2003,4/18/2013,,,8,0
    753738,2003,4/9/2013,,,8,0
    753738,2003,4/8/2013,,,8,0
    753740,2003,4/11/2013,,,8,0
    753740,2003,4/9/2013,,,8,0
    753740,2003,4/8/2013,,,8,0Edited by: George H on Apr 18, 2013 8:41 AM
    Edited by: George H on Apr 18, 2013 9:09 AM
    Edited by: George H on Apr 18, 2013 9:10 AM
    Edited by: George H on Apr 18, 2013 9:20 AM
    Edited by: George H on Apr 18, 2013 9:42 AM
    Edited by: George H on Apr 18, 2013 11:25 AM

    Hi, George,
    George H wrote:
    I have this query which works fine, how everwhen I attempt to join the pubsched table based on schedules.areaid = pubsched.areaid it comes up with ORA-00904
    telling me that the area id is invalid.
    Try commenting out line 8 of the query which joins the pubsched table and it will work fine.If I comment out the line
    JOIN pubsched ps on ps.periodid = s.periodid and ps.areaid=s.areaid then I don;'t get the error; I get "no rows selected". That's not what you want, is it?
    Are you sure the sample data is correct? What are the results you want from the sample data?
    SELECT
    empid,
    areaid,
    startpp + day_number - 1 AS startdate,NULL AS starttime,NULL AS endtime,
    8 AS hours,
    0 AS minutes FROM schedules s
    JOIN payperiods pp ON pp.periodid = s.periodid
    JOIN pubsched ps on ps.periodid = s.periodid and ps.areaid=s.areaid
    UNPIVOT ( v
    FOR day_number IN (day1 AS 1,
    day2 AS 2,
    day3 AS 3,
    ...You may have noticed that this site normally doesn't display multiple spaces in a row.
    Whenever you post formatted text (such as query results) on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    Thanks for posting the CREATE TABLE and INSERT statements, and your query; that's very helpful.
    Don't forget to post the desired results given that sample data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • OWB Issue|| ORA-12838: cannot read/modify an object after modifying it in

    Hi
    I am not able to enter the data into the staging table .
    it is also not throwing any error ,only giving warnings.
    so as a next step i just took the intermediate result generation and try to run it
    but it is giving me an error in that
    ORA-12838: cannot read/modify an object after modifying it in parallel
    Can you please help me in tthis case.
    Thanks

    Hello,
    The error ORA-12838 occurs if you try to issue SELECT/DML immediately after completing parallel DML, within one transaction - it's not permitted.
    Start another transaction - issue Commit or Rollback first.

  • ORA-12839: cannot modify an object in parallel after modifying it

    Hi,
    I am facing a Problem when I am trying to Update a Table:
    ORA-12839: cannot modify an object in parallel after modifying it
    How to rectify it?
    Any help will be highly needful
    Thanks and Regards

    Or if it needs to be the same transaction leave away any parallelization part as e.g. an append hint:
    SQL> create table emp2 as select * from emp where 1=2
    Table created.
    SQL> insert /*+ append */ into emp2 select * from emp
    14 rows created.
    SQL> update emp2 set sal=200 where empno=7788
    Error at line 11
    ORA-12838: cannot read/modify an object after modifying it in parallel

  • ORA-12838: cannot read/modify an object after modifying it in parallel

    I am getting the above error when i hit this part in my load ....
    can somebody suggest me why it could be in this case ?
    MERGE INTO PART1 H
    USING (SELECT PA1,                              PART1,                                   CON1,                                   GEO1,                                   COUN1,                                   KIT1                          FROM W1 ) WH ON
                                       (H.PART1=WH.PART1)                                   --on PK darshan 01-03-2006
         WHEN MATCHED THEN
    UPDATE SET                                   H.CON1     =WH.CON1,                         H.GEO1     = FN_GETGEOCODE ( WH.GEO1 ),               H.COUN1     =WH.COUN1,                         H.KIT1     =WH.KIT1,                    H.DT1     =TO_NUMBER(TO_CHAR(FN_GETGMTDATE(SYSDATE),'YYYYMMDD')),                              H.DT_LAST1          = FN_GETGMTDATE(SYSDATE)
              WHEN NOT MATCHED THEN
         INSERT     (H.PART1,                                   H.PART2,                                   H.CON1,                                   H.GEO1,                                   H.COUN1,                                   H.KITD1,                                   H.DT1,                                   H.DT_1,                                   H.DT_LAST_1)
              VALUES(CASE FN_MERGE_COUNTER(gpi_inserting)
                   WHEN 0 THEN     WH.PART1 END,                         WH.PARTN1,                              WH.CON1,                              FN_GETGEOCODE ( WH.GEO1),                    WH.COUNT1,                              WH.KIT1,
              TO_NUMBER(TO_CHAR(FN_GETGMTDATE(SYSDATE),'YYYYMMDD')),                                   PKG_COMMONACTIVITIES.FN_GETGMTDATE(SYSDATE),                                        PKG_COMMONACTIVITIES.FN_GETGMTDATE(SYSDATE)
                                            );

    does this give you a clue?
    SQL> CREATE TABLE t AS
      2  SELECT owner, object_name FROM all_objects
      3  WHERE 1=0;
    Table created.
    SQL> INSERT /*+ APPEND */ INTO t
      2  SELECT owner, object_name
      3  FROM all_objects;
    8982 rows created.
    SQL> SELECT * FROM t;
    SELECT * FROM t
    ERROR at line 1:
    ORA-12838: cannot read/modify an object after modifying it in parallelI bet that you need a commit after loading w1.
    John

  • ORA-01776: cannot modify more than one base table through a join view

    I have created EO based on a database view than consists of two tables, and only one is updateable.
    When I try to update a row using EO, I got a following message: "ORA-01776-cannot modify more than one base table through a join view"
    In Forms, this issue is resolved by setting "Query Only" property of non-updateable items to "True".
    Is it possible to do something like that in ADF BC?
    Thanks

    Thanks for answer.
    When I set "updateable" property to "Never", that attribute is protected from any change.
    I'm sorry for incomplete usecase.
    I have set up a list of value on that attribute, because it is a lookup field for another table and I need to get an ID from that table.
    Basically, I need that attribute to be updateble for BC, but not for database.
    Edited by: MarioK on Oct 13, 2011 9:28 AM

  • Oracle query on dblinked SQL Server tables returns ORA-00904 error

    Hi,
    I have created a dblink to a SQL Server database from Oracle using Generic Connectivity.
    The following query returns ORA-00904 Invalid Identifier error in the WHERE clause (tblEmp.Empno)
    SELECT "EmpNo","EmpName", "DeptName"
    FROM tblEmp@sqlserver,
    tblDept@sqlserver
    WHERE tblDept.DeptNo = tblEmp.Empno
    I had to enclose the column names in double quotes due to case sensitivitiy of the columns, but I can't do the
    same for the WHERE clause.
    1) So, how do I fix this error ?
    2) Also how do I include Deptno column with table alias in the columns list?
    (Deptno is ambiguous in Emp and Dept tables)
    Regards,
    Sam

    Alex
    Because using the aliases all the time can become annoying and lead to disparate standards when used by multiple developers. For a one-off query I would go with aliases in the query but if the linked tables are going to be interrogated extensively I would prefer to create vanilla views of the underlying tables so that the aliases aren't necessary.
    Just my opinion, it feels a bit cleaner to do it this way - you only do the work once in creating the view and then you don't need to worry about the case sensitivity of the linked database. You can also refer to the source in the name of the view so you don't have to think about different source databases with the same table names.
    Cheers
    Ben

  • ORA-00604 ORA-00904 When query partitioned table with partitioned indexes

    Got ORA-00604 ORA-00904 When query partitioned table with partitioned indexes in the data warehouse environment.
    Query runs fine when query the partitioned table without partitioned indexes.
    Here is the query.
    SELECT al2.vdc_name, al7.model_series_name, COUNT (DISTINCT (al1.vin)),
    al27.accessory_code
    FROM vlc.veh_vdc_accessorization_fact al1,
    vlc.vdc_dim al2,
    vlc.model_attribute_dim al7,
    vlc.ppo_list_dim al18,
    vlc.ppo_list_indiv_type_dim al23,
    vlc.accy_type_dim al27
    WHERE ( al2.vdc_id = al1.vdc_location_id
    AND al7.model_attribute_id = al1.model_attribute_id
    AND al18.mydppolist_id = al1.ppo_list_id
    AND al23.mydppolist_id = al18.mydppolist_id
    AND al23.mydaccytyp_id = al27.mydaccytyp_id
    AND ( al7.model_series_name IN ('SCION TC', 'SCION XA', 'SCION XB')
    AND al2.vdc_name IN
    ('PORT OF BALTIMORE',
    'PORT OF JACKSONVILLE - LEXUS',
    'PORT OF LONG BEACH',
    'PORT OF NEWARK',
    'PORT OF PORTLAND'
    AND al27.accessory_code IN ('42', '43', '44', '45')
    GROUP BY al2.vdc_name, al7.model_series_name, al27.accessory_code

    I would recommend that you post this at the following OTN forum:
    Database - General
    General Database Discussions
    and perhaps at:
    Oracle Warehouse Builder
    Warehouse Builder
    The Oracle OLAP forum typically does not cover general data warehousing topics.

  • ORA-01779: cannot modify a column which maps to a non key-preserved table

    define cusname='GEORGE';
    INSERT INTO (select s.prd_id, s.cus_id, s.qty_sold, s.price from sales s, customers c where s.cus_id=c.cus_id)
    VALUES (102,(select cus_id from customers where upper(c_name) like '%GEORGE%'),14,(select price from product where prd_id = 102)*14)
    I am getting the following error when I am trying to run the above query.
    SQL Error: ORA-01779: cannot modify a column which maps to a non key-preserved table
    01779. 00000 -  "cannot modify a column which maps to a non key-preserved table"
    *Cause:    An attempt was made to insert or update columns of a join view which map to a non-key-preserved table.
    *Action:   Modify the underlying base tables directly.
    CUSTOMERS TABLE
    Name   
    Null   
    Type        
    CUS_ID 
    NOT NULL
    NUMBER      
    C_NAME         
    VARCHAR2(50)
    C_LIMIT         
    NUMBER      
    CITY           
    VARCHAR2(20)
    PRODUCT TABLE
    Name 
    Null   
    Type        
    PRD_ID
    NOT NULL
    NUMBER      
    PRICE         
    NUMBER      
    COST           
    NUMBER      
    SALES TABLE
    Name   
    Null   
    Type  
    PRD_ID 
    NOT NULL
    NUMBER
    CUS_ID 
    NOT NULL
    NUMBER
    QTY_SOLD         
    NUMBER
    PRICE             
    NUMBER

    Hi,
    As the error message sugggested, INSERT directly into the sales table.  You can get the values from a sub-query that joins whatever tables are needed, including sales itself.  MERGE might be simpler and more efficient than INSERT.
    I hope this answers your question.
    If not, post  a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    If you're asking about a DML statement, such as INSERT, the sample data will be the contents of the table(s) before the DML, and the results will be state of the changed table(s) when everything is finished.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

Maybe you are looking for