(BUG?) Migrating updatable views trouble

I have some simple updatable views created as:
select *
from table
where primary_key in (select ...)
which are working well on database Release1 (10.1.0.3.0 - Linux).
After moving application to Release2 (10.2 - Microsoft Windows, 32-Bit) all these views are no longer updateable.
GB

Hi,
Windows:
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Linux
Connected to Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 Maybe a bug introduced into 10.2.0.1 ?
What I can say is that your test case work fine on my 10.2.0.3 database :
SQL> conn system/demo102a@DEMO102A
Connecté.
SQL> create user user0 identified by user0 default tablespace users;
Utilisateur créé.
SQL> grant connect, resource to user0;
Autorisation de privilèges (GRANT) acceptée.
SQL> grant create any synonym to user0;
Autorisation de privilèges (GRANT) acceptée.
SQL> grant create public synonym to user0;
Autorisation de privilèges (GRANT) acceptée.
SQL> grant drop public synonym to user0;
Autorisation de privilèges (GRANT) acceptée.
SQL> grant create view to user0;
Autorisation de privilèges (GRANT) acceptée.
SQL>
SQL> create user user1 identified by user1 default tablespace users;
Utilisateur créé.
SQL> grant connect, resource to user1;
Autorisation de privilèges (GRANT) acceptée.
SQL> grant create view to user1;
Autorisation de privilèges (GRANT) acceptée.
SQL> conn user0/user0@demo102a
Connecté.
SQL> drop table foreign_table;
drop table foreign_table
ERREUR à la ligne 1 :
ORA-00942: Table ou vue inexistante
SQL> create table foreign_table (
  2  foreign_id varchar2(14),
  3  foreign_name varchar2(250),
  4  foreign_alias varchar2(250),
  5  --
  6  constraint pk_foreign_table primary key (foreign_id)
  7  );
Table créée.
SQL>
SQL> grant references on foreign_table to user1;
Autorisation de privilèges (GRANT) acceptée.
SQL>
SQL> create or replace view foreign_view as
  2  select * from foreign_table;
Vue créée.
SQL>
SQL> drop public synonym foreign_view;
drop public synonym foreign_view
ERREUR à la ligne 1 :
ORA-01432: le synonyme public à supprimer n'existe pas
SQL> create public synonym foreign_view for user0.foreign_view;
Synonyme créé.
SQL> grant select on foreign_view to user1;
Autorisation de privilèges (GRANT) acceptée.
SQL>
SQL> create or replace package pkg as
  2 
  3  function func_1(i_id varchar2)
  4  return varchar2;
  5 
  6  function func_2(i_id varchar2)
  7  return varchar2;
  8  end;
  9  /
Package créé.
SQL>
SQL> create or replace package body pkg as
  2 
  3  rec foreign_table%rowtype;
  4  cursor c is select * from foreign_table;
  5 
  6  function func_1(i_id varchar2)
  7  return varchar2
  8  is
  9  begin
10  return 'SOME_ID';
11  end;
12 
13  function func_2(i_id varchar2)
14  return varchar2
15  is
16  begin
17  return 'Y';
18  end;
19 
20  end;
21  /
Corps de package créé.
SQL>
SQL> drop public synonym pkg;
drop public synonym pkg
ERREUR à la ligne 1 :
ORA-01432: le synonyme public à supprimer n'existe pas
SQL> create public synonym pkg for user0.pkg;
Synonyme créé.
SQL> grant execute on pkg to user1;
Autorisation de privilèges (GRANT) acceptée.
SQL>
SQL> connect user1/user1@demo102a
Connecté.
SQL> create or replace view inner_view as
  2  select
  3  xc.foreign_id foreign_id,
  4  nvl(xc.foreign_name, xc.foreign_alias) foreign_name
  5  from foreign_view xc
  6  where pkg.func_1(foreign_id) = 'SOME_ID'
  7  and pkg.func_2(foreign_id) = 'Y';
Vue créée.
SQL>
SQL>
SQL> drop table base_table;
drop table base_table
ERREUR à la ligne 1 :
ORA-00942: Table ou vue inexistante
SQL> create table base_table (
  2  base_id varchar2(14),
  3  foreign_id varchar2(14),
  4  foreign_text varchar2(250),
  5  --
  6  constraint pk_base_table primary key (base_id)
  7  );
Table créée.
SQL>
SQL> -- Final view
SQL> -- Updatable on Linux, Non-updatable on Windows
SQL> create or replace view final_view as
  2  select m.*,
  3  c.foreign_name r_foreign_name
  4  from base_table m,
  5  inner_view c
  6  where m.foreign_id = c.foreign_id (+);
Vue créée.
SQL>
SQL> select * from final_view for update;
aucune ligne sélectionnée
SQL>
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
SQL> Well, an upgrade to the latest patchset would be well for you.
Nicolas.

Similar Messages

  • (BUG?) Updatable views migration trouble

    I have some simple updatable views created as:
    select *
    from table
    where primary_key in (select ...)
    which are working well on database Release1 (10.1.0.3.0 - Linux).
    After moving application to Release2 (10.2 - Microsoft Windows, 32-Bit) all these views are no longer updateable.
    GB

    I have some simple updatable views created as:
    select *
    from table
    where primary_key in (select ...)
    which are working well on database Release1 (10.1.0.3.0 - Linux).
    After moving application to Release2 (10.2 - Microsoft Windows, 32-Bit) all these views are no longer updateable.
    GB

  • Updating view mapping for atg migration

    Hi experts
    In the migration document they have mentioned about update view mappings. i am not able to understand this?  they also mentioned
    Before you import the new ATG 10.0 view mappings, edit the following files in
    >/home/localconfig/atg/dynamo/service/jdbc
    FakeXADataSource.properties
    FakeXADataSource_production.properties.
    here is my question- why do we need to change FakeXADataSource.properties. is this mandetory? If you are using Oracle (XA datasource) , why do we need to edit fakexadatasource. please help me to understand .
    thanks
    Krish

    Hi Krish,
    yes, it is mandatory. the FakeXADataSource.properties used during initial export and import of data when installing.
    Thanks & Regards
    Suman Vasireddy
    Please mark any update as "Correct Answer" or "Helpful Answer" if that update helps/answers your question, so that others can identify the Correct/helpful update between many updates.

  • Updatable View as data block source - can't get to work

    I have created a simple form with one data block based on an updatable view, but it doesn't work properly after the form executes a query.
    I can use DML on this view using SQL*Plus and it works as it should.
    DML works in the form too, but only until I execute a query, after that I get the "FRM-40602: cannot insert into or update a view" error each time I try an insert, update, or delete.
    This is repeated for each runtime of the form. I have set the "query only" property to yes for the non-DMLable item from the view so that isn't part of the problem. This is an example out of "Developer Advance Forms and Reports (page 112) - Oracle Press" so it should work. There is nothing else (code, triggers, etc...) in this module besides the one data block.
    Any ideas would be appreciated.
    Thanks. Bill Brosnan.

    I have had the same issue and had to go through Oracle Support to get it working.
    First of all make sure that you have a recent patch installed (patch 9 as being the latest one available).
    Second, set in the data block the property key mode to updatable and the property primary key to yes for one item of the data block. (this is bug 1561423)
    Make sure that you only modify those columns that are updateable.
    Quite a large number of bugs have been reported on the concept of updatable views and the installation of a recent patch will most definitely get you working again.
    This functionality does work !
    Goodluck,

  • Issue in Invoking an Updatable View with Instead of Trigger

    Hi,
    I am trying to insert a record using Updatable View with Instead of Trigger. When i try to save the data, i get the below error:
    java.sql.SQLException: ORA-01403: no data found
    ORA-06512: at line 1
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1075)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3887)
    at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:9323)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1508)
    at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:172)
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:432)
    at oracle.jbo.server.EntityImpl.doDMLWithLOBs(EntityImpl.java:8566)
    Can someone help me resolve this issue?
    Also it would be great if you can share Sample codes for Invoking an updatable view with instead of trigger on Save/commit.
    Regards,
    Jeevan

    As a trigger is executed in the db and not in your app it's really hard to help as you did not give any useful information.
    Have you read this blog http://stegemanoracle.blogspot.com/2006/03/using-updatable-views-with-adf.html ?
    Timo
    Edited by: Timo Hahn on 22.09.2011 09:15
    And my friend google also found http://technology.amis.nl/blog/1447/adf-business-components-resfresh-after-insertupdate-and-instead-of-triggers

  • HT1688 I updated my iPhone 5C to the iOS 7.0.1 "bug fixes" update and it has made my phone glitch constantly and has just made it a complete nightmare. How can I go back down to iOS 7?

    basically yeah, I updated my software because it said that iOS 7.0.1 was out as a bug fixes update and now my phone constantly glitches the **** out, its super slow, and it pretty much created more bugs than it did fix them. So how can I go back to iOS 7? because 7.0.1 is an absolute nightmare.

    Try updating to iOS 7.0.2.
    Does your iPhone still have performance issues? Have you tried the basics?

  • ASSERTION FAILED error while migrating update rules

    Hi all,
    We are migrating the 3.x datasource for sd - lo cockpit.
    Migration steps are as follows...
    1. Make a copy of the infosouce. Activate it.
    2. Migrate transfer rules. Activate it.
    3. Migrate datasource.
    4. Migrate Update rules for the respective info providers.
          But while migrating update rules  ASSERTION_FAILED runtime error occurs.
           the assert condition was violated.
           CL_RSTRAN_TEMPLATE========CP or CL_RSTRAN_TEMPLATE======CM003
    Please help i tried all the means to rectify but none succeds.
    It is occuring for each datasource .
    Thanks in advance.
    aravind

    Hello
    Assertion statement is like a conditional break point in ABAP. When you are trying to migrate the update rules,it is failing with Assertion statement it means there is some error with your update rules. Either the mapping is wrong or the the target to which it is mapped is in inactive state. Please check these and retry your migration.
    Regards,
    Krishna Tangudu

  • Update View SM30

    Hallo Guru,
    have you ever had this problem:
    I have created an update view, but when I try to update data via SM30... well, even if I save, no data is really saved...

    No, no events...
    I have:
    1. Created a Z table
    2. Created an update view for the table
    3. Created a maintainance view for the view.
    3. goto transaction SM30
    4. I make modifications, but no data is saved...

  • Update view ( view is based on 3 tables)

    i have view based on 3 tables.
    create view view_master
    select '1' as no , name , no from a
    union all
    select '2' as no , name , no from b
    union
    select '3' as no , name , no from c
    actually i wanted to update view base table, Can i update a view view_master ?
    My question here is does oracle support view update ( view is based on 3 tables)
    Please advise ,,,

    Apart from Instead of trigger any other work around? The best way to answer that question is if you let us know:
    - your database version ( select * from v$version; )
    - give us a narrowed down example of the 'begin-situation' and the desired 'final situation'.\
    See:
    {message:id=9360002} for more details.
    MY ORACLE DBA hates tiggers .He's not the only one ;)

  • Is this a bug? create view lost a comma and succeeded

    Is this a bug? create view lost a comma and succeeded.
    oracle 10.2.0.1.0
    try the following sql.
    create table test
    id int,
    dataa varchar2(20),
    datab varchar2(20)
    insert into test values(1,'a1','a2');
    insert into test values(2,'b1','b2');
    insert into test values(3,'c1','c2');
    create view vtest
    as
    select id,dataa
    datab
    from test;
    --it should be error but successed
    select * from vtest;
    --and dataa gone!
    drop view vtest;
    drop table test purge;

    No it's not a bug, Oracle will treat "datab" as alias to "dataa" if comma left out.
    Doesn't your view has two columns id and datab, but datab column showing dataa data?

  • Updatable view and Read only view

    Jdev version 11.1.1.6
    1. Can we use an updatable view instead of readonly view for LOVs?
    2. In my use case, I am having a panel-tabbed component. I create Region in the first tab & create Countries in the second tab. If I use a LOV for Regions based on the read-only view, then the data created & COMMITTED in the first tab is not getting reflected in the LOV in the second tab. But, if I use an updatable view for the Region field's LOV, then the LOV works fine. But, want to know if it is fine to use an updatable view for LOVs.

    Quotation from the developer guide
    >
    Best Practice: When you need to create a read-only view object for
    data lookup, you should use the entity-based view object and deselect
    the Updatable option in the Entity Objects page of the view object
    overview editor.
    >
    >
    View objects can either be related to underlying entity objects or not. When a view
    object is related to one or more underlying entity objects the default behavior supports
    creating new rows and modifying or removing queried rows. However, the update
    feature can be disabled by deselecting Updatable in the overview editor for the
    entity-based view object
    >
    So the answer for your first question is Yes

  • Creative Cloud App - Bug Fix Updates

    Hi
    I installed a number of CC Apps, including Photoshop CC, Indesign CC, Dreamweaver, Illustrator CC, Premiere Pro CC. the following day each of the CC Apps had a "Bug Fix" Update. Althoughthe updates will download and the installation process will run it DOES NOT complete ie the Update Failed Errors encountered during installation U44M1P7
    I have looked at the log but I can't make head or tail of what it says - so I have no idea what is causing the update error.
    So has anybody any suggestions?
    Many thanks in advance
    Kind regards
    Steve

    Hi,
    Please follow this KB also provide the logs of the error.
    http://helpx.adobe.com/creative-suite/kb/error-u44m1p7-installing-updates-ccm.html
    Regards,
    Abhijit

  • Premiere Pro CC Bug Fix Update (7.2.2)

    Hi,
    Today a bug fix update was released for Premeire Pro CC. Check out this link for full details: http://blogs.adobe.com/premierepro/2014/04/premiere-pro-cc-7-2-2.html?scid=social21455164
    Thanks,
    Kevin

    Hi Richard,
    rnaphoto wrote:
    Hi Kevin-
    I see on another thread that lots of folks are having this issue. Since a Plural Eyes workflow if very common, I would expect that your testers would check that out pretty thouroughly.
    We have beta testers and QE engineering constantly testing out common workflows, including with third party applications like PluralEyes.
    Regarding this issue: we tried to test those problems with PluralEyes in house after we heard about them, but have not been able to reproduce the problem. That's why we're collecting media and project files from users.
    rnaphoto wrote:
    In the meantime, is there any way that folks can go back to 7.2.1? I think it would be good if Adobe would give us the option to go back when things go wrong.
    Sure, I wrote a blog post about that: http://blogs.adobe.com/kevinmonahan/2014/01/29/revert-to-a-previous-version-of-premiere-pr o-cc-or-any-creative-cloud-application/
    Hope that helps you.
    rnaphoto wrote:
    One really gets tired of dealing with these issues since they seem to be happening much more now that the CC allows fairly constant updates. Although constant updates may seem like a good idea to some, for many of us it seems like a lot of risk for not much gain since we are usually under the gun to get stuff done...
    Sorry you feel that way, and not sure what other problems you were having, but most folks are enjoying the updates and not experiencing issues like that. FWIW, you never have to update if you don't want to.
    rnaphoto wrote:
    But I can't emphasize enough that part of the updating MUST include extensive testing using common workflows. I could have told you you had a problem within 15 minutes of installing this update...
    I'm sorry, Richard. Unfortunately, it's not that easy. We could not even reproduce the issue in-house. So, there must be something different with your system, media, workflow, that we have not found yet. We are investigating the issue thoroughly, and hope to have a fix as soon as we can.
    Thanks for understanding,
    Kevin

  • Updating Views in sql server

    Hi,
    I am trying to update a view but the result is 0 row(s) updated
    ALTER VIEW vw_AuthorizedStationeries
    AS
    SELECT StationeryID,
    CreatedOn,
    StationeryName
    FROM dbo.Stationeries
    WHERE Authorized = 1
    GO
    -----------------Update Views-------------------
    UPDATE vw_AuthorizedStationeries
    SET
    CreatedOn = GETDATE()
    WHERE
    StationeryName = 'StationThree'
    GO
    What am I doing wrong?
    I am trying to update the column 'CreatedOn' with todays date where the row is 'StationThree'.
    Is it even possible to what I am trying to do using Views?
    Thanks!

    Its possible so far as view retrieves a record which satisfies your specified condition ie 
    StationeryName = 'StationThree'
    You can check if there are records satisfying condition using below query
    SELECT COUNT(*)
    FROM dbo.Stationeries
    WHERE Authorized = 1
    AND StationeryName = 'StationThree'
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Updatable view vs Bulk Collect

    Hi friends.
    I need to know what is more fast....
    1. SELECT RO.NR_ORDEM BULK COLLECT INTO R
    FROM REP_ORD RO, REP_TRAB RT
    WHERE RO.NR_ORDEM = RT.NR_ORDEM ;
    FORALL I IN 1..R.COUNT
    DELETE REP_ORD WHERE NR_ORDEM = R(I);
    FORALL I IN 1..R.COUNT
    DELETE REP_TRAB WHERE NR_ORDEM = R(I);
    or
    2. To create an updatable view using something like the above select. After that, to delete data from view.
    Thank you for your patient.
    Message was edited by:
    Paulinha

    I think the bulk collect approach would be certainly be easier to implement. As someone pointed out, you can't delete from a view that has a table join - directly. However, you can create an "instead of" trigger to run a short PL/SQL program instead of deleting from the view, though, in chich you would then put your delete statements. The net effect of this would be that you were back where you started with the overhead of using a view as well (though this would probably not add too much extra processing).
    Getting back to your original question, I'd guess the bulk collects would be faster provided you don't have too many items in your collections. The only way to be certain would be to do it both ways and time it.

Maybe you are looking for

  • I Tunes download to Flashdrive problem

    Hi Guys...Im trying to transfer songs from my ITunes library onto a flash drive to play in my car...but to play in the car they have to be encoded in MP3. So I need to change the format from AAC to MP3 before I export them to the flash drive...Anyone

  • Add field in output list in ZRFUMSV00

    Hi: I am facing a problem with Z version of RFUMSV00 program. I have created a variant with a new output list, bur I need to add some new fields in output list, but I only can add the some fields in a list, but I don´t know how to add different field

  • For Assistance: IDocs in Status 02

    Dear SAP Peeps, We have some issues on an existing HR interface. Approximately 2 to 3 idocs per two weeks use to end after their generation in PGH. They end up in status 02-Error passing data to port. Error description is "codepage of receiver system

  • Export Layers to Files includes an additional layer in each file

    I'm using the CS4 Export Layers to Files (to PNG with transparency), and with this particular PSD, there's one layer that gets exported on its own, and then it's included in each of the other layers when they're exported.  If I run it a second time b

  • If I uninstall & reinstall will I lose all my data?

    I'm tired of this crap of not being able to import my cds with getting the song info, so want to try a reinstall, but will I lose the 8 plus gigs of songs and video I have already imported and converted? Is there a way I can save them with out losing