ORA-1779 when updating a view

Hi and thanks in advance !
i am facing a critical situation.
i have two schema & both are same!
the problem which i am facing is during updating a view of one i am facing above error while the same DML is issuing againt that view in other schema and that works fine.
what's the reason..
The major difference between two schema's is i hav different live and test database i migrate my access database to Oracle test database # 1.here i created a new user name deals . ok
i hav done same migration in my another database but a little difference here user deals is already available here and tables and views are also available i drop all the object but forget to purge recyclebin. now whenever i try to issue DML at this schema i am facing above error while the same tables same data and same view is available in above databae where my update statement executed properly. one more thing i like to add here i hav some unwanted trigger 'BIN$##$$%##$# bla bla bla' on different table. i haven't created that .
here is the view for your kind perusal
CREATE OR REPLACE VIEW QRYREUTER AS
SELECT FXdeals.deal_no,
cparty.name,
cparty.city,
FXdeals.brokbill,
FXdeals.deal_date,
FXdeals.mode_id
FROM FXDeals
JOIN cparty
ON FXdeals.cpcode = cparty.cpcode
WHERE ( ( (FXdeals.mode_id) = 3 ) )
Message was edited by:
Fiz Dosani

but i have sample scenario in other schema which replica of this schema so why i haven't got this error there
one more interesting thing when i query select * from user_updateable_columns where table name ='ABC' in Schema # 1 it return i can modify some columns.
but when issue the data dictionary view in schema # 2, where i was facing ORA-1779 , select * from user_updateable_columns where table name ='ABC' in Schema # 2 it return i can not modify any columns.
Tables name are same in both schema.
Data same in both schema.
Constraint Same in both schema.
Indexes same in both schema.
why facing error in one schema not in other.
one more interesting thing, i had faced questionable object error when importing DMP into schema # 2.

Similar Messages

  • ORA-1779 during update on Tabular Form

    Hi,
    I have a view I created based on 4 tables. I have one table with a primary key which will be updated. All information is displayed on the form correctly. When I try to update 1 field it gives me a ora-1779 error which is related to a key preserved table issue.
    Why is this doing this and what can I do to resolve it ? I read something about doing an instead of update trigger. Is that what I really want to do ? I am thinking there should be an easier way to fix this.
    Thank you in advance for your time,
    Anon

    Here is a listing of instead of trigger threads here in the forum..;[http://forums.oracle.com/forums/search.jspa?threadID=&q=instead+of+trigger&objID=f137&dateRange=all&userID=&numResults=15&rankBy=10001]
    I believe your answer should be here..
    Thank you,
    Tony Miller
    Webster, TX

  • Triggers are gone when updates the view they are on?

    I found that when I updated a view, all the triggers on this view were dropped.
    Is this supposed to be or I did something wrong?

    To answer the second part of your question, triggers on tables are not dropped if you modify the tables, unlike when you modify views. However, if you modify the table in such a way that it invalidates the trigger, the trigger becomes invalid, but not dropped. Please see the example below.
    scott@ORA92> create table test_tab
      2    (col1 number)
      3  /
    Table created.
    scott@ORA92> create sequence test_seq
      2  /
    Sequence created.
    scott@ORA92> create or replace trigger test_trig
      2    before insert on test_tab
      3    for each row
      4  begin
      5    select test_seq.nextval into :new.col1 from dual;
      6  end test_trig;
      7  /
    Trigger created.
    scott@ORA92> show errors
    No errors.
    scott@ORA92> insert into test_tab values (null)
      2  /
    1 row created.
    scott@ORA92> select * from test_tab
      2  /
          COL1
             1
    scott@ORA92> commit
      2  /
    Commit complete.
    scott@ORA92> alter table test_tab add col2 number
      2  /
    Table altered.
    scott@ORA92> insert into test_tab (col2) values (10)
      2  /
    1 row created.
    scott@ORA92> select * from test_tab
      2  /
          COL1       COL2
             1
             2         10
    scott@ORA92> commit
      2  /
    Commit complete.
    scott@ORA92> select status from user_triggers where trigger_name = 'TEST_TRIG'
      2  /
    STATUS
    ENABLED
    scott@ORA92> select status from user_objects where object_name = 'TEST_TRIG'
      2  /
    STATUS
    VALID
    scott@ORA92> alter table test_tab drop column col1
      2  /
    Table altered.
    scott@ORA92> select status from user_triggers where trigger_name = 'TEST_TRIG'
      2  /
    STATUS
    ENABLED
    scott@ORA92> select status from user_objects where object_name = 'TEST_TRIG'
      2  /
    STATUS
    INVALID
    scott@ORA92> insert into test_tab (col2) values (20)
      2  /
    insert into test_tab (col2) values (20)
    ERROR at line 1:
    ORA-04098: trigger 'SCOTT.TEST_TRIG' is invalid and failed re-validation
    scott@ORA92> select * from test_tab
      2  /
          COL2
            10

  • ORA-31600 when trying to view SQL DDL for a created public database link

    I created and committed a public database link and I can access the external database.
    When I try to view the DDL of the link, on the SQL tab, I'm getting following error:
    ORA-31600: invalid input value EMIT_SCHEMA for parameter NAME in function SET_TRANSFORM_PARAM
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 3900
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 4048
    ORA-06512: at "SYS.DBMS_METADATA", line 836
    ORA-06512: at line 1
    and
    ORA-31600: invalid input value LONGNAME for parameter NAME in function SET_FILTER
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 1980
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 3665
    ORA-06512: at "SYS.DBMS_METADATA", line 670
    ORA-06512: at "SYS.DBMS_METADATA", line 571
    ORA-06512: at "SYS.DBMS_METADATA", line 1221
    ORA-06512: at line 1
    Is this because of a bug in SqlDeveloper or because the db_link and host parameters have 33 characters?
    I'm using sql developer 1.5.3, build MAIN-5783
    tx,
    Roger Vermeir

    It's probably the length; really all sqldev does is calling:
    select DBMS_METADATA.get_ddl('DB_LINK',:NAME,:OWNER) FROM dual;So if you call it a bug, it's a database bug in the DBMS_METADATA package.
    But if you work with identifiers over 30 chars, I'd say that's a bug on it's own...
    FWIW, I can't reproduce this on our 10g DB; are you on 9i?
    Regards,
    K.

  • ORA-01841 when refreshing materialized view

    Hi,
    I have to upgrade my database from oracle 8.1.7.4 to 9.2.0.1.
    I have tested two ways to do it :
    1) I upgraded my database from 8i to 9i with the u0801070.sql script.
    2) I created an empty 9i database and then I exported the data from the 8i database and imported them to the 9i database.
    The two procedures worked fine.
    But now, when I try to refresh the mateiralized views with DBA Studio on the database upgraded via export/import, I obtain the error : ORA-01841.
    On the database upgraded via u0801070.sql, I don't have the problem.
    Why do I have this error ?
    Regards,
    Rachel TREBUCHET DANJOU

    Error: ORA 1841
    Text: (full) year must be between -4713 and +4713 / +9999
    Cause:
    Action:
    *** Important: The notes below are for experienced users - See Note 22080.1
    Explanation:
         Eg: In a clause like "to_date('XXXX','YYYY')" XXXX is outside of the
         range -4713 and +4713.
         Note that Year 0 is invalid too. See Bug 106242 for an explanation..
         Typically this involves "to_date('00','YYYY')" or similar which is
         invalid. It is probably better to use 'RR' rather than 'YY' which
         prefixes with an appropriate century.
         Eg:
              select to_char(to_date('00','yyyy')) from dual;
              ORA-01841: (full) year must be between -4713 and +4713
              select to_char(to_date('00','rr')) from dual;
              01-MAR-2000
    Year 2000
    ~~~~~~~~~
    You may also see this error if using a TO_DATE() function
    on a date column (or SYSDATE) and your sessions NLS_DATE_FORMAT
    includes a 2 digit year mask (RR or YY).
    eg: alter session set nls_date_format='DD-MON-RR';
    select to_date(sysdate,'DD-MON-YYYY') from dual;
    "ORA-01841: (full) year must be between -4713 and +9999, and not be 0"
    This is because TO_DATE() expects to work on a CHARACTER
    data type and so there is an implicit conversion from
    DATE to CHAR.
    eg: In the above example SYSDATE of 01-JAN-2000 is implictly
    converted to the character string "01-JAN-00", which is
    then converted back to a date using a DD-MON-YYYY date format.
    This gives a year of 0000 which is invalid, hence ORA-1841.
    Note:     From Oracle 7.2 onwards the UPPER bound is +9999 and not +4713
    Regards,
    Reza

  • Ora-04045 when refreshing materialized view

    Can any one help with this error ora-04045 .I get this error when refreshing the materialized view for the first.second time when i refresh the materialized view it gets refreshed.
    My database version is 8.1.7.x

    Yes it is enabled.if you refresh for the 1 time it show object invalid when you refresh again it refreshes and object is valid.i am using dbms_refresh pacakge to do this.one more problem is that i have made a procedure in which i am calling dbms_refresh pakcage 8 times to refresh 8 views.if 1 gets refreshed then 2 will not it will fail.i don't understand this behaviour

  • ORA-01031 when creating a view

    Hi guys,
    I transported a view(custom view ZVIEW) from Development to Production and found that the view was missing the database of the production system.
    When i tried to create the same view usin SE14 am getting a warning
    ORA-01031: insufficient privileges                     
    DDL time(___1): .......119 milliseconds                
    The SQL statement was not executed                     
    Statements for View ZVIEW_STD_TIME could not be executed
    Request for ZVIEW_STD_TIME could not be executed       
    in the system the SAPR3 and OPS$PRDADM has sysdba privilege so i guess SYSCONN need not be implemented.
    Please help.
    Thanks and regards,
    Siddhartha

    Hi Rabi,
    Check below sap notes.
    Note 985607 - ORA-01031 Creating views after upgrade to Oracle 10g
    Note 1028220 - ORA-01031: Insufficient privileges despite SAPCONN role
    Regards
    Ashok

  • Error ORA-01446 when updating a versioned table with SQLDeveloper 1.5.4

    Hi,
    I have been trying out Oracle Workspace Manager to test how versioned tables might work to our advantage. My basic testing process is:
    1. Create a table
    2. Add some data rows
    3. Version enable the table
    4. Create a workspace
    5. Goto the created workspace
    6. Update a row
    7. Commit and I get the following error
    UPDATE "COMSERV"."A_OWM_TEST" SET DESCRIPTION = 'ABCDEFGHIJzzzz' WHERE ROWID = 'AAAThNAAIAAAgwqAAY'
    One error saving changes to table "COMSERV"."A_OWM_TEST":
    Row 10: ORA-01446: cannot select ROWID from view with DISTINCT, GROUP BY, etc.
    The same update works fine from SQLPlus so my question is Does SQL developer support table versioning or have I done something wrong is setting up my versioned tables?
    Any suggestions greatly appreciated.
    Thanks
    Richard Wilkinson

    hye...
    is that any view referring to that table...
    check the code on how u create that view...
    for e.g.
    CREATE OR REPLACE VIEW testview
    (id, name)
    AS
    select * from testing;
    this also will populate that ORA-01446 error.
    just a suggestion cause i also have a similar problem on ORA-01446 and i resolve it by alter the view..
    CREATE OR REPLACE VIEW testview
    (id, name)
    AS
    select id, name from testing;
    correct me if i'm worng...i'm just a newbie..
    thank you...

  • ORA-01747 when updating a remote table

    Hi,
    Here is my table :
    SQL> desc infolig2.pylone_type
    Nom NULL ? Type
    PYL_CODE_PYLONE NOT NULL VARCHAR2(32)
    OPY_CODE NOT NULL VARCHAR2(32)
    NPY_CODE NOT NULL VARCHAR2(32)
    PYL_TENS_CONS VARCHAR2(32)
    PYL_NB_TERNE FLOAT(126)
    PYL_HAUT_TOTAL FLOAT(126)
    PYL_HAUT_SS_CONS FLOAT(126)
    PYL_POIDS FLOAT(126)
    PYL_SURFACE_SOL FLOAT(126)
    PYL_SURFACE_PEINTE FLOAT(126)
    PYL_DATE_CREAT NOT NULL DATE
    PYL_DATE_MODIF DATE
    PYL_TYPE_MODIF VARCHAR2(1)
    PYL_CODE_UTIL VARCHAR2(20)
    PYL_DESIGNATION VARCHAR2(50)
    PYL_ETAT VARCHAR2(15)
    PYL_INDICE_REV VARCHAR2(3)
    I need to update it from a remote database.
    So, I run the following procedure :
    set serveroutput on
    declare
    GET_DESIGNATION VARCHAR2(10) := 'AUVERGNE';
    OIP_PYL_CODE_PYLONE VARCHAR2(32) := 'TEST1';
    OIP_OPY_CODE VARCHAR2(32) := 'ORIG3';
    OIP_NPY_CODE VARCHAR2(32) := 'NATPYL2';
    OIP_PYL_TENS_CONS VARCHAR2(32) := null;
    OIP_PYL_NB_TERNE FLOAT := 1;
    OIP_PYL_HAUT_TOTAL FLOAT := null;
    OIP_PYL_HAUT_SS_CONS FLOAT := null;
    OIP_PYL_POIDS FLOAT := null;
    OIP_PYL_SURFACE_SOL FLOAT := null;
    OIP_PYL_SURFACE_PEINTE FLOAT := null;
    OIP_PYL_DATE_CREAT DATE := SYSDATE;
    OIP_PYL_DATE_MODIF DATE := SYSDATE;
    OIP_PYL_TYPE_MODIF VARCHAR2(1) := 'M';
    OIP_PYL_CODE_UTIL VARCHAR2(20) := 'RTE REFERENCE';
    OIP_PYL_DESIGNATION VARCHAR2(50) := 'TEST 1';
    OIP_PYL_ETAT VARCHAR2(15) := 'interdit';
    OIP_PYL_INDICE_REV VARCHAR2(3) := '23';
    OIP_PYL_CODE_PYLONE_SUBST VARCHAR2(32) := 'CODEPYL5';
    begin
    execute immediate 'UPDATE infolig2.PYLONE_TYPE@'||GET_DESIGNATION||' SET
    PYL_CODE_PYLONE = :1,
    OPY_CODE = :2,
    NPY_CODE = :3,
    PYL_TENS_CONS = :4,
    PYL_NB_TERNE = :5,
    PYL_HAUT_TOTAL = :6,
    PYL_HAUT_SS_CONS = :7,
    PYL_POIDS = :8,
    PYL_SURFACE_SOL = :9,
    PYL_SURFACE_PEINTE = :10,
    PYL_DATE_CREAT = :11,
    PYL_DATE_MODIF = :12,
    PYL_TYPE_MODIF = :13,
    PYL_CODE_UTIL = :14,
    PYL_DESIGNATION = :15,
    PYL_ETAT = :16,
    PYL_INDICE_REV = :17,
    WHERE PYL_CODE_PYLONE = :18'
    USING OIP_PYL_CODE_PYLONE,OIP_OPY_CODE,OIP_NPY_CODE,OIP_PYL_TENS_CONS,OIP_PYL_NB_TERNE,OIP_PYL_HAUT_TOTAL,OIP_PYL_HAUT_SS_CONS,OIP_PYL_POIDS,OIP_PYL_SURFACE_SOL,OIP_PYL_SURFACE_PEINTE,OIP_PYL_DATE_CREAT,OIP_PYL_DATE_MODIF,OIP_PYL_TYPE_MODIF,OIP_PYL_CODE_UTIL,OIP_PYL_DESIGNATION,
    upper(translate(OIP_PYL_ETAT,'éè','ee')),OIP_PYL_INDICE_REV, OIP_PYL_CODE_PYLONE_SUBST;
    exception
    when others then
    dbms_output.put_line('ERREUR ORACLE DETECTEE ***');
    dbms_output.put_line('Message Erreur : '||SUBSTR(SQLERRM,1,245));
    end;
    I receive the error :
    ORA-01747: invalid user.table.column, table.column, or columns specification
    What is the problem ?
    Regards,
    Rachel

    This reply was very useful for me. I have written insert scripts in the package where I had put comma after last_updated_date in the insert statement, I got the error -
    ORA-01747: invalid user.table.column, table.column, or column specification . After removing the comma and adding right parenthesis it worked fine
    INSERT INTO CPT_ACTIVITY_SALES (
    WS_DATE,
    ACTIVITY,
    WS_ITEM_HEAD,
    WS_FLAG,
    CREATED_BY,
    CREATED_DATE,
    LAST_UPDATED_BY,
    LAST_UPDATED_DATE,
    (SELECT a.ws_date,
    b.activity,
    C.WS_ITEM_HEAD,
    'N',
    cUser ,
    SYSDATE,
    cUser,
    SYSDATE
    FROM CPT_SALES_LINES a,cpm_category b,CPM_ACTIVITY C
    WHERE a.COMPANY=nCompany
    AND a.SITE=ln_site
    AND a.WS_DATE=ld_ws_date
    AND a.SALES_HEADER_KEY=ln_Sales_header_key
    and B.company=A.company
    and b.category_id=a.category_id
    AND C.COMPANY=A.COMPANY
    AND C.ACTIVITY=B.ACTIVITY)

  • Ora-21700 when updating xmltype column of a table

    Hello,
    Can somebody explain why the following statement gives ora-21700 (object does not exist or is market for delete):
    update translation_message
    set translationxml = XmlType(
    '<NPSREPLY DOMAIN="SWI" OBJECT="SUBSCRIBER" REQUEST="DELETE" RETURNCODE="0" RETURNTYPE="NONE" STATUS="STORED" xmlns="http://saly.bc/nps/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd">
    <SUBREQUEST SEQUENCE="1">
    <ProfileData>
    <ACTION SUBTYPE="PSTN">DEL_CNA_FREE</ACTION>
    <DN>999999999</DN>
    <RETURNCODE>0</RETURNCODE>
    </ProfileData>
    </SUBREQUEST>
    </NPSREPLY>'
    where id = 1926938
    remark:
    when changing
    xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd
    in
    xsi:schemaLocation="http://saly.bc/nps/NPS_Reply.xsd
    the select is running well.
    I will explain my problem a little bit more:
    The exact oracle error is:
    ora-21700 object does not exist or is marked for delete ORA-06512: at "SYS.XMLTYPE".
    The following peace of xml causes the problem:
    xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd"
    The statement is running fine if you remove the blank after
    "/nps/ NPS_Repy". So if you use this peace of xml xsi:schemaLocation="http://saly.bc/nps/NPS_Reply.xsd", the statement works fine.
    My question: Wy is the blank not allowed in this peace of xml xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd"
    The purpose of the blank is to indicate that 'NPS_Reply.xsd' will be located somewhere in "http://saly.bc/nps/". So it can be that 'NPS_Reply.xsd' is found directly under "http://saly.bc/nps/" or some levels lower. According XML standards, the blank is allowed for this purposes.
    regards, Els

    Hi,
    This schema location is only indicative and not used. The xml is generated by an other application and has to be stored in an xmltype column.
    regards, Els

  • Ora-00904 when creating a view

    Hello everyone,
    I'm trying to create a view based on 6 tables, and I'm getting an ORA-00904: Invalid column name error. I also tried to do a basic select * from table_name and inserted one of the restrictions in my where clause and am getting the same error. I've checked and re-checked the column names in my script.
    Can anything else be causing this error?
    Rose

    CREATE OR REPLACE VIEW GEN_VISTA_VW (PERSON_ID,
    LAST_NAME, MIDDLE_NAME, FIRST_NAME, ADDRESS, LINE2, LINE3, COMMUNITY, POSTAL_CODE, HOME_PHONE, BUS_PHONE, PROVINCE, HOME_SCHOOL_ID, EMPNO, POSITION, REG_NUMB)
    AS (SELECT
              PERSON.PERSON_ID,
              PERSON.LAST_NAME,
              PERSON.MIDDLE_NAME,
              PERSON.FIRST_NAME,
              PERADDR.LINE1,
              PERADDR.LINE2,
              PERADDR.LINE3,
              PERADDR.CITY,
              PERADDR.ZIP,
              PERPHONE.PHONE_NO,
              TBLLOC.PHONE_NO,
              PERADDR.STATE,
              TBLLOC.LOCATION_CODE,
              EMPCOMP.EMPNO,
              TBLPOS.POSITION_TITLE,
              EMPQUAL.REG_NUMB
         FROM
              PERSON,
              PERADDR,
              PERPHONE,
              TBLLOC,
              TBLPOS,
              EMPCOMP,
              EMPQUAL
         WHERE
              person.person_id = tblpos.person_id
    AND person.person_id = perphone.person_id
         AND person.person_id = peraddr.person_id
         AND person.person_id = empqual.person_id
         AND person.person_id = empcomp.person_id
         AND tblpos.location_code = tblloc.location_code)
    Thank you

  • Insert a new row in log table when update on view object

    hi All,
    i have created approval System where i maintain log which is based on table(ApprovalLog) which contain attribute like (Agencycode,approve_status,approved_by,approved_date).
    and i have also create a view object which is based on (AgencyApproval) table. which is also contain field approval_status by default 'N'
    i create a jsf page using this view object and drag drop as adf table now i want when user change approve_status field and click on commit button then
    a new row created on to ApprovalLog table and values of column like (agencycode,approve_status,approved_by) comes from AgencyApproval table.
    How can i do this in ADF.
    Please Reply.
    manish

    hi Timo,
    i have done this as following and it is working.
    please tell me it is right approach or not.
            protected void prepareForDML(int i, TransactionEvent aTransactionEvent)
                if (i != EntityImpl.DML_DELETE)
                         ViewObjectImpl vo = (ViewObjectImpl)this.getDBTransaction().findViewObject("AdAgcrlimitAppLogView3"); // change it to the name of your VO
                           Row row = vo.createRow();
                           // set the values ...
                           row.setAttribute("AppDt",getAppDt() );
                           row.setAttribute("Publ",getPubl() );
                           row.setAttribute("GrpAgcode",getGrpAgcode() );
                           row.setAttribute("GrpAgsubcode",getGrpAgsubcode() );
                           row.setAttribute("StaticCrlimit",getStaticCrlimit() );
                           row.setAttribute("FixCrlimit",getFixCrlimit() );
                           row.setAttribute("VarcrLimit",getVarcrLimit() );
                           row.setAttribute("AdhocLimit",getAdhocLimit() );
                           row.setAttribute("AdhocFr",getAdhocFr() );
                           row.setAttribute("AdhocTo",getAdhocTo() );
                           row.setAttribute("CrAlertLimit",getCrAlertLimit() );
                           row.setAttribute("BillAmt",getBillAmt() );
                           row.setAttribute("AdjAmt",getAdjAmt() );
                           row.setAttribute("DbnAmt",getDbnAmt() );
                           row.setAttribute("PayAmt",getPayAmt() );
                           row.setAttribute("UnbillAmt",getUnbillAmt() );
                           row.setAttribute("Status",getStatus() );
                           row.setAttribute("AlertTag",getAlertTag() );
                        row.setAttribute("CrlimitTag",getCrlimitTag() );
                           row.setAttribute("Confirm",getConfirm() );
                           row.setAttribute("ApproveRemark",getApproveRemark() );
                           row.setAttribute("ApproveBy",getApproveBy() );
                           row.setAttribute("ApproveDt",getApproveDt() );
                           row.setAttribute("ApproveStatus",getApproveStatus() );
                           row.setAttribute("ApproveHier",getApproveHier() );
                           row.setAttribute("Usrname",getUsrname() );
                           row.setAttribute("Usrid",getUsrid() );
                           row.setAttribute("Usrdate",getUsrdate() );
                           row.setAttribute("Cuser",getCuser() );
                           vo.insertRow(row);
                       super.prepareForDML(i, aTransactionEvent);
            }

  • Get error ORA-20505 and ORA-01403 when UPDATING record

    Hi,
    I'm running APEX 3.2.1, on Oracle XE 10.2.0.1, on Sun Ultra20 (Intel-based) running Windows Server 2003.
    I created a small, department database - to keep track of contacts, equipment, etc.
    Initially, I used a NUMBER as the PRIMARY KEY in both the CONTACTS table and EQUIPMENT tables. I created a CONTACTS interactive report and a CONTACT DETAILS form, where the EDIT button on a row in the CONTACTS report brings up the individual record to modify. Same thing for EQUIPMENT - interactive report page and form page.
    This all worked fine!
    Then, I decided to change the PRIMARY KEY for the CONTACTS table to a STRING - with CONTACT_FIRST_NAME and CONTACT_LAST_NAME as the primary key. I figured I this would prevent duplicate entries. After the change, inserts work. Updates work, IF a change is made to ANY field EXCEPT first name or last name.
    UPDATES fail - if user modifies EITHER the first name or last name - in APEX. But, update SUCCEEDS if done in SQL Developer. Obviously, I missing a subtle nuance in APEX, but I can't figure it out.
    I've included DEBUG trace and version information below.
    Thanks,
    Andy
    ORA-20505: Error in DML: p_rowid=Adam1, p_alt_rowid=CONTACT_FIRST_NAME, p_rowid2=Adam, p_alt_rowid2=CONTACT_LAST_NAME. ORA-01403: no data found
    0.02: A C C E P T: Request="SAVE"
    0.02: Metadata: Fetch application definition and shortcuts
    0.02: NLS: wwv_flow.g_flow_language_derived_from=FLOW_PRIMARY_LANGUAGE: wwv_flow.g_browser_language=en-us
    0.02: alter session set nls_language="AMERICAN"
    0.02: alter session set nls_territory="AMERICA"
    0.02: NLS: CSV charset=WE8MSWIN1252
    0.02: ...NLS: Set Decimal separator="."
    0.02: ...NLS: Set NLS Group separator=","
    0.02: ...NLS: Set date format="DD-MON-RR"
    0.02: ...Setting session time_zone to -06:00
    0.02: Setting NLS_DATE_FORMAT to application date format: DD-MON-YYYY
    0.02: ...NLS: Set date format="DD-MON-YYYY"
    0.03: Fetch session state from database
    0.03: ...Check session 1896858759858984 owner
    0.03: Setting NLS_DATE_FORMAT to application date format: DD-MON-YYYY
    0.03: ...NLS: Set date format="DD-MON-YYYY"
    0.03: ...Check for session expiration:
    0.03: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.03: Session: Fetch session header information
    0.03: ...Metadata: Fetch page attributes for application 101, page 21
    0.05: ...Validate item page affinity.
    0.05: ...Validate hidden_protected items.
    0.05: ...Check authorization security schemes
    0.05: Session State: Save form items and p_arg_values
    0.05: ...Session State: Save "P21_CONTACT_FIRST_NAME" - saving same value: "Adam"
    0.06: ...Session State: Saved Item "P21_CONTACT_LAST_NAME" New Value="Adam Jr"
    0.06: ...Session State: Save "P21_CONTACT_COMPANY" - saving same value: "Atempo"
    0.06: ...Session State: Save "P21_CONTACT_JOB_TITLE" - saving same value: "Sr Sw Engr"
    0.06: ...Session State: Save "P21_CONTACT_JOB_ROLE" - saving same value: "Engineering"
    0.06: ...Session State: Save "P21_CONTACT_STATUS" - saving same value: "Active"
    0.06: ...Session State: Save "P21_CONTACT_PRODUCT" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_PHONE" - saving same value: "222-333-4444"
    0.06: ...Session State: Save "P21_CONTACT_MOBILE" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_FAX" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_EMAIL" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_STREET" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_CITY" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_STATE" - saving same value: "CO"
    0.06: ...Session State: Save "P21_CONTACT_ZIP" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_COUNTRY" - saving same value: "United States"
    0.06: ...Session State: Save "P21_CONTACT_NOTES" - saving same value: ""
    0.06: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.06: Branch point: BEFORE_COMPUTATION
    0.06: Computation point: AFTER_SUBMIT
    0.06: Tabs: Perform Branching for Tab Requests
    0.06: Branch point: BEFORE_VALIDATION
    0.06: Perform validations:
    0.08: ...Item in validation equals expression 2: P21_CONTACT_JOB_ROLE
    0.08: ...Item in validation equals expression 2: P21_CONTACT_STATUS
    0.08: ...Item Not Null Validation: P21_CONTACT_PHONE
    0.08: ...Item in validation equals expression 2: P21_CONTACT_STATE
    0.08: ...Item in validation equals expression 2: P21_CONTACT_COUNTRY
    0.08: Branch point: BEFORE_PROCESSING
    0.08: Processing point: AFTER_SUBMIT
    0.08: ...Process "Process Row of ISR_CONTACTS": DML_PROCESS_ROW (AFTER_SUBMIT) #OWNER#:ISR_CONTACTS:P21_CONTACT_FIRST_NAME:CONTACT_FIRST_NAME:P21_CONTACT_LAST_NAME:CONTACT_LAST_NAME|IU
    0.08: Show ERROR page...
    0.08: Performing rollback...
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Database     
    NAME     XE
    CREATED     06/08/2010 05:22:50 PM
    RESETLOGS_TIME     07/09/2010 10:09:59 AM
    PRIOR_RESETLOGS_CHANGE#     193066
    PRIOR_RESETLOGS_TIME     06/08/2010 05:22:52 PM
    LOG_MODE     ARCHIVELOG
    CHECKPOINT_CHANGE#     4436025
    ARCHIVE_CHANGE#     4387159
    OPEN_RESETLOGS     NOT ALLOWED
    VERSION_TIME     07/09/2010 10:08:44 AM
    OPEN_MODE     READ WRITE
    PROTECTION_MODE     MAXIMUM PERFORMANCE
    PROTECTION_LEVEL     MAXIMUM PERFORMANCE
    REMOTE_ARCHIVE     ENABLED
    DATABASE_ROLE     PRIMARY
    ARCHIVELOG_CHANGE#     4458138
    SWITCHOVER_STATUS     SESSIONS ACTIVE
    DATAGUARD_BROKER     DISABLED
    GUARD_STATUS     NONE
    FORCE_LOGGING     NO
    CGI Environment     
    PLSQL_GATEWAY     WebDb
    GATEWAY_IVERSION     2
    SERVER_SOFTWARE     Oracle Embedded PL/SQL Gateway/10.2.0.1.0
    GATEWAY_INTERFACE     CGI/1.1
    SERVER_PORT     8080
    SERVER_NAME     XDB HTTP Server
    REQUEST_METHOD     GET
    QUERY_STRING     p=4500:36:1896858759858984:::::
    PATH_INFO     /f
    SCRIPT_NAME     /apex
    REMOTE_ADDR     10.135.65.180
    SERVER_PROTOCOL     HTTP/1.1
    REQUEST_PROTOCOL     tcp
    REMOTE_USER     ANONYMOUS
    HTTP_USER_AGENT     Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19 (.NET CLR 3.5.30729)
    HTTP_HOST     isr-si-project:8080

    Maybe because you're changing primary key...and then updating record with primary key that doesn't exist.

  • ORA-12899 when recreating materialized view

    Hi All,
    I have a PL/SQL procedure to load data in partitioned base tables and a refreh force meterilized view to compute data from base partition table. I just droped the materialized view and try to recreate it.
    I am facing an issue with Ora-12899 value too large for column "SYS".SNAP$".AUTO_FUN (actual: string 201, maximum: string 200).
    I google and search in Metalink & Oracle forum for couple days but i didnt find a valuable solution.
    Does you guy have some adivces for me to avoid this error.
    Note: Before I can drop and re-create this materialized view without an error. I just faced this issue a few day ago.
    TIA,
    Lux
    Edited by: lux2 on Mar 8, 2010 11:07 PM

    As below result from the query on both client and servier side.
    I see no different between the two.
    At server side:
    PARAMETER     VALUE
    NLS_CALENDAR     GREGORIAN
    NLS_COMP     BINARY
    NLS_CURRENCY     $
    NLS_DATE_FORMAT     DD-MON-RR
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_DUAL_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_LANGUAGE     AMERICAN
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NUMERIC_CHARACTERS     .,
    NLS_SORT     BINARY
    NLS_TERRITORY     AMERICA
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
    at Client side:
    PARAMETER     VALUE
    NLS_CALENDAR     GREGORIAN
    NLS_COMP     BINARY
    NLS_CURRENCY     $
    NLS_DATE_FORMAT     DD-MON-RR
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_DUAL_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_LANGUAGE     AMERICAN
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NUMERIC_CHARACTERS     .,
    NLS_SORT     BINARY
    NLS_TERRITORY     AMERICA
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR

  • ORA-12052 when create materialized view

    I following the sample in Oracle document to create materialized viewCREATE MATERIALIZED VIEW LOG ON sales
       WITH ROWID, SEQUENCE(amount_sold, time_id, prod_id)   INCLUDING NEW VALUES;
    CREATE MATERIALIZED VIEW LOG ON times
       WITH ROWID, SEQUENCE (time_id, calendar_year)  INCLUDING NEW VALUES;
    CREATE MATERIALIZED VIEW LOG ON products
       WITH ROWID, SEQUENCE (prod_id,prod_name)  INCLUDING NEW VALUES;
    CREATE MATERIALIZED VIEW sales_mv
       BUILD IMMEDIATE   REFRESH FAST ON COMMIT
       AS SELECT t.calendar_year, p.prod_id, p.prod_name,
          SUM(s.amount_sold) AS sum_sales
          FROM times t, products p, sales s
          WHERE t.time_id = s.time_id AND p.prod_id = s.prod_id
          GROUP BY t.calendar_year, p.prod_id, p.prod_name; This works. BUt I actually does not want do aggregation. Thus I changed the MV creation statement toCREATE MATERIALIZED VIEW sales_mv
       BUILD IMMEDIATE REFRESH FAST ON COMMIT
       AS SELECT t.calendar_year, p.prod_id, p.prod_name,s.amount_sold
          FROM times t, products p, sales s
          WHERE t.time_id = s.time_id AND p.prod_id = s.prod_id;I got errorSQL Error: ORA-12052: cannot fast refresh materialized view GLU.SALES_MV
    *Cause:    Either ROWIDs of certain tables were missing in the definition or
               the inner table of an outer join did not have UNIQUE constraints on
               join columns.
    *Action:   Specify the FORCE or COMPLETE option. If this error is got
               during creation, the materialized view definition may have be
               changed. Refer to the documentation on materialized views.Please help or point me to the relevant document.
    Thanks

    damorgan, Thank you for you reply.
    the inner table of an outer join did not have UNIQUE constraints on join columns.
    I am not sure how much clearer and explanation can be written.If you look at the query, you will find that there is no outer join in the query.
    sales table does not have unique constraints on prod_id and time_id. If this is the cause of the problem, I cannot change the data but is there a work around. That is way I ask for specific doc. In 11g documents, I only find some info on CREATE MV. That is mainly on syntax but not on requirement.

Maybe you are looking for