"An autonomous transaction does not see any changes made by main transact"

Hi,
I'm trying to reproduce the "An autonomous transaction does not see any changes made by main transaction" reffered on :
Oracle® Database Application Developer's Guide - Fundamentals
10g Release 2 (10.2)
Part Number B14251-01
chapter 2 SQL Processing for Application Developers
Paragraph : Autonomous TransactionsI set up a simple case...
create table emp_ as select * from emp
begin
  update emp_ set hiredate=hiredate+100 where empno=7934;
end;
create or replace trigger trg_emp_
after insert or update on emp_
for each row
declare
    pragma autonomous_transaction;
    emp_var emp.hiredate%type;
  begin
    select hiredate
      into emp_var
      from emp_
    where empno=:new.empno;
    dbms_output.put_line('empno: '||:new.empno);
    dbms_output.put_line('old hiredate: '||:old.hiredate);
    dbms_output.put_line('new hiredate: '||:new.hiredate);
  end;Prior to any change...
SQL> select empno,hiredate from emp_;
EMPNO HIREDATE
5498 21/4/1982
5499 11/10/1981
5411 10/10/1981
5410 10/10/1982
7369 17/12/1980
7499 20/2/1981
7521 22/2/1981
7566 2/4/1981
7654 28/9/1981
7698 1/5/1981
7782 9/6/1981
7788 19/4/1987
7839 17/11/1981
7844 8/9/1981
7876 23/5/1987
7900 3/12/1981
7902 3/12/1981
7934 23/1/1982After the change...
SQL> begin
  2    update emp_ set hiredate=hiredate+100 where empno=7934;
  3  end;
  4  /
empno: 7934
old hiredate: 23/01/82
new hiredate: 03/05/82
PL/SQL procedure successfully completedAccording to the Oracle doc the select of the autonomous transaction should not see the change made to the hiredate column of the table in the main transaction(in the anonymous block)....
What may i do wrong..????
Thank you,
Sim

Simon:
As Tubby pointed out, your dbms_output commands do not display the value you selected in the trigger. Your trigger based demonstration needs to be more like:
SQL> SELECT * FROM t;
        ID DT
         1 05-SEP-2009
         2 17-JUL-2009
SQL> CREATE TRIGGER t_ai
  2     AFTER INSERT OR UPDATE ON t
  3     FOR EACH ROW
  4  DECLARE
  5     PRAGMA AUTONOMOUS_TRANSACTION;
  6     l_dt t.dt%TYPE;
  7  BEGIN
  8     SELECT dt INTO l_dt
  9     FROM t
10     WHERE id = :new.id;
11     DBMS_OUTPUT.Put_Line ('ID: '||:new.id);
12     DBMS_OUTPUT.Put_Line ('Old dt: '||:old.dt);
13     DBMS_OUTPUT.Put_Line ('New dt: '||:new.dt);
14     DBMS_OUTPUT.Put_Line ('Aut dt: '||l_dt);
15  END;
16  /
Trigger created.
SQL> UPDATE t SET dt = sysdate WHERE id = 2;
ID: 2
Old dt: 17-JUL-2009
New dt: 25-OCT-2009
Aut dt: 17-JUL-2009
1 row updated.So, the automomous transaction select did not see the changed value of dt.
I know you are just trying to understand automomous transactions here and would never do sometihg like this in production right? :-)
Your trigger, as written, has some interesting side effects because of the automomous transaction. For example:
SQL> INSERT INTO t VALUES(3, sysdate - 25);
INSERT INTO t VALUES(3, sysdate - 25)
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "OPS$ORACLE.T_AI", line 5
ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'
SQL> UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy');
UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy')
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "OPS$ORACLE.T_AI", line 5
ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'John

Similar Messages

  • IPhoto does not see any changes after editing a photo in Camera Raw

    Hello everyone ,
    I have some small problem with my iPhoto. I have set up Camer Raw in iPhoto as  External Editor, so when I click on edit in IPhoto,
    automatically opens my JPG in Camera Raw. After editing in Camera Raw I'm clicking on ,,Save image" then destination is ,,Save in same location" When I go back to iPhoto to the same photo, iPhoto does not show any changes I have made in Camera Raw. 
    What could it be or should I set something in iPhoto or in Camera Raw?
    Is there a chance in order to deal with this?
    I will be grateful for any assistance and
    I'm waiting for advice
    Dawid

    Any time a RAW file is edited in any 3rd party editor from within iPhoto it MUST be saved to the Desktop and imported as a new file. There's no other way to do it.  So the photos you've edited and saved are somewhere in the iPhoto Library folder system but cannot be recognized and used by iPhoto.
    The following is geared for Photoshop and Photoshop Elements but might have some info relevant for you:
    Using Photoshop CS3 or Photoshop Elements 9 as Your Editor of Choice in iPhoto.
    1 - select Photoshop as your editor of choice in iPhoto's Advanced Preference Section's under the "Edit photo:" menu.
    Click to view full size
    2 - double click on the thumbnail in iPhoto to open it in Photoshop.  When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done. 
    3 - however, if you get the navigation window
    Click to view full size
    that indicates that  PS wants to save it as a PS formatted file.  You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..
    NOTE: With Photoshop Elements 9 the Saving File preferences should be configured as shown:
    Click to view full size
    s  I also suggest the Maximize PSD File Compatabilty be set to Always.  In PSE’s General preference pane set the Color Picker to Apple as shown:
    Click to view full size
    NOTE: If you want to use both iPhoto's editing mode and PS/PSE without having to go back and forth to the Preference pane, once you've selected PS as your editor of choice, reset the Preferences back to "Open in iPhoto".  That will let you either edit in iPhoto using the Edit button or Control-clicking on the thumbnail and selecting "Edit in iPhoto" or in PS/PSE by Control-clicking on the thumbnail and selecting "Edit in External Editor" in the Contextual menu.
    Click to view full size
    This way you get the best of both worlds.
    OT

  • Why iTunes does not synchronize any changes made ​​to photos in iPhoto library 11?

    I cut out some photos of my library, but on the iPad, although Ihave synchronized after the changes, it always displays the oldversions of my images (those not changed).

    Simon:
    As Tubby pointed out, your dbms_output commands do not display the value you selected in the trigger. Your trigger based demonstration needs to be more like:
    SQL> SELECT * FROM t;
            ID DT
             1 05-SEP-2009
             2 17-JUL-2009
    SQL> CREATE TRIGGER t_ai
      2     AFTER INSERT OR UPDATE ON t
      3     FOR EACH ROW
      4  DECLARE
      5     PRAGMA AUTONOMOUS_TRANSACTION;
      6     l_dt t.dt%TYPE;
      7  BEGIN
      8     SELECT dt INTO l_dt
      9     FROM t
    10     WHERE id = :new.id;
    11     DBMS_OUTPUT.Put_Line ('ID: '||:new.id);
    12     DBMS_OUTPUT.Put_Line ('Old dt: '||:old.dt);
    13     DBMS_OUTPUT.Put_Line ('New dt: '||:new.dt);
    14     DBMS_OUTPUT.Put_Line ('Aut dt: '||l_dt);
    15  END;
    16  /
    Trigger created.
    SQL> UPDATE t SET dt = sysdate WHERE id = 2;
    ID: 2
    Old dt: 17-JUL-2009
    New dt: 25-OCT-2009
    Aut dt: 17-JUL-2009
    1 row updated.So, the automomous transaction select did not see the changed value of dt.
    I know you are just trying to understand automomous transactions here and would never do sometihg like this in production right? :-)
    Your trigger, as written, has some interesting side effects because of the automomous transaction. For example:
    SQL> INSERT INTO t VALUES(3, sysdate - 25);
    INSERT INTO t VALUES(3, sysdate - 25)
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "OPS$ORACLE.T_AI", line 5
    ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'
    SQL> UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy');
    UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy')
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "OPS$ORACLE.T_AI", line 5
    ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'John

  • For one Urgent Change during performing the Approval(chnging the status to 'To be Tested') system does not recognize any changes using the CTS WBS BOM in the development system. The transaction is therefore incorrect or the status was reset by the system.

    For one Urgent Change while performing the one of the Approval before changing the status to 'To Be Tested'
    We are getting below error.
    The system does not recognize any changes using the CTS WBS BOM in the development system. The transaction is therefore incorrect or the status was reset by the system.
    COuld anyone please help us to know, How it can be resolved?
    We also have this below error.
    System Response
    If the PPF action is a condition check, the condition is initially considered as not met, and leads to another warning, an error message, or status reset, depending on the configuration.
    If the PPF action is the execution of a task in the task list, and the exception is critical, there is another error message in the document.
    Procedure
    The condition cannot be met until the cause is removed. Analyze all messages in the transaction application log.
    Procedure for System Administration
    Analyze any other messages in the task list application log, and the entries for the object /TMWFLOW/CMSCV
    Additional Information:
    System cancel RFC destination SM_UK4CLNT005_TRUSTED, Call TR_READ_COMM:
    No authorization to log on as a trusted system (Tr usted RC=0).
    /TMWFLOW/TU_GET_REQUEST_REMOTE:E:/TMWFLOW/TRACK_N:107
    For above error Table /TMWFLOW/REP_DATA_FLOWwas refreshed as well but still the same error.

    If you are in Test System, you can use function module AA_AFABER_DELETE to totally delete the depreciation area (tcode SE37, specify chart of depreciation and depreciation area), After that recreate your depreciation area and run AFBN. But before you do that, have you created a retirement transaction type that limits the posting on your new depreciation area? If not create one.
    Hope this helps.
    Thanks!
    Jhero

  • TS1398 my ipone 4s does not see any wifi networks my ipad works ok tried all of the above resetting network etc still does not see wifi ?

    my ipone 4s does not see any wifi networks my ipad works ok tried all of the above resetting network etc still does not see wifi ?

    If no change after restoring the iPhone with iTunes as a new iPhone or not from the backup, the iPhone has a hardware problem with the wireless card or with something else.

  • TS1538 itunes does not see any of my devices.

    itunes does not see any of my devices.  It used to. But not any more. Why. They show up in Windows. But not itunes.
    <Edited by Host>

    Try
    iOS: Device not recognized in iTunes for Windows
    I would start with               
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or               
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    New cable and different USB port?
    Runs this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Try on another computer to help determine if computer or iPod problem

  • View Object Editor in JHS 10.1.2 does not save any changes....

    Hi,
    When I did exactly as the JHeadstart Tutorial says, I noticed that
    in JHeadstart 10.1.2 with JDeveloper 10.1.2
    JHeadstart does not save any changes I make in the View Object Editor
    of the Application Structure File Editor !!!
    For instance when I change the Width property of an Attribute from 60 to 5
    it changes to 5, but when close the View Object Editor
    and reopen it again, the Width is back to 60...
    Even when I click the button "Validate the Application Structure File" before
    closing the VO Editor....
    What do I do ??? Is the only solution to edit the XML file
    or something like that without using the VO Editor ?
    Or is there a better solution ?
    Does it maybe work in an older version of JHeadstart ?
    If so, where is the older version available for download ?
    Thanks,
    Eric Joosse

    Eric,
    How did you leave the JHeadstart VO editor?
    The changes should be saved when you click the OK button in the VO editor itself, but they are not saved if you click Cancel, or the little cross in the upper right corner, or leave it open while going back to the Application Structure File editor. That's because it's a standalone editor (you can also find it when right-mouse-clicking the VO in the Model project). The icon in the Application Structure File editor is just a quick way to get to it.
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • IBook G4 Airport Extreme does not see any SSID

    Hi,
    My iBook 1,2 Ghz has been working great for several years now.
    I am working with Mac OS X Tiger (10.4.11) for quite some time
    and it never let me down. I connect to the internet using an Airport Express
    connected to a speedtouch router.
    The Airport Express Card in my iBook always found 6 or 7 SSID's of other
    Wireless Networks in my neighbourhood and it used to login automatically on
    my Airport Express wireless wetwork station.
    Last week it suddenly stopped working correctly.
    After starting OS X on my laptop the little Airport icon in the upper bar faded out grey.
    When I click it it says it can't find any networks.
    I checked all my settings, downgraded my Airport Extensions
    and even installed a spare (refurbished) Airport Extreme Card.
    Even with another Airport Extreme Card it does not see any wireless networks.
    My other macs, a unibody MacBook Pro and white MacBook work fine with the Airport Express.
    What could be wrong? Am I overlooking something here? Can somebody help me out?
    How can i get my Airport Express/iBook G4 connected to my wireless network again?

    Hi Elko,
    Thanks for the reply.
    I re-installed the original Airport Extreme card into the slot again.
    But now i pushed it harder than the first time. (just like you said)
    I noticed the second click, but that doesn't seem to be the problem.
    Both Airport Cards (the original and the new) were installed correctly.
    I also checked the antenna connection but that is seated o.k. too.
    After re-installing the card, i booted into Mac OS X Tiger and checked the ASP.
    It says a Airport Extreme Card is installed with firmware version 405.1 (3.90.34.0.p.18)
    and the langauge version is international/worldwide. So far, so good.
    Nevertheless the airport card does still not find any wireless networks or SSID's after
    scanning multiple times. (Location on automatic)
    I am planning an upgrade to Leopard today. Maybe that's gonna help, since there were some Airport Extreme updates in Leopard. If that's not the solution, I will stay with your other suggestion and buy me a nice USB dongle.
    Do you have any idea what type of dongles work best with Leopard? I have seen some different models, but a lot of dongles require third-party software to make it work and are not automatically recognized by OS X.

  • Satelite A30 does not see any other network devices in WLan

    I recently bought a Toshiba Wireless LAN Mini PCI Card, i've installed it and managed to get it to recognise my broadband but it does not see any other network devices. I was not supplied with any drivers or software to operate the card (I bought it from a proper dealer). Can you recommend downloads that would run this card?
    I have a Satelite A30 laptop 1gb ram 60GB HDD.
    Also large files sometimes stop transfering (hangs)when using my USB connection. The usb controller is using microsoft driver 5.1.2600.0 dated 1 june 2002.
    Is this a driver problem?

    Hi
    If the WLan card is properly installed so you have only not configured you settings.
    I dont know which devices in the broadband you mean but usually if you want to communicate or transfer files between notebooks through the WLan so all computers must be in the same domain or workgroup.
    I cannot give you a proper answer but only a suggestion. I have red that sometimes a lower power could be responsible for such issue. Try to disable the option Power safe in the USB root hub properties in the device manager.
    Hi
    If the WLan card is properly installed so you have only not configured you settings.
    I dont know which devices in the broadband you mean but usually if you want to communicate or transfer files between notebooks through the WLan so all computer must be in the same domain or workgroup.
    I cannot give you a proper answer but only a suggestion. I have red that sometimes a lower power could be responsible for such issue. Try to disable the option Power safe in the USB root hub properties in the device manager.

  • Mac Pro early 2008 2 x 2.8GHz Quad Core 10.7.5, replaced 4 x 500ghds with 4 x 3Tb and Raid card Raid5 them OK but can not load time machine back up as it does not see any of the 4 drives, neither does disc utilities, any thoughts?

    On my Mac Pro, early 2008 2 x 2.8GHz Quad Core 10.7.5, replaced 4 x 500ghds with 4 x 3Tb. The Raid card Raid 5ed them OK but can not load time machine back up as it does not see any of the 4 drives, neither does disc utilities, any thoughts?

    You don't see drives when using a hardware RAID only the volumes.
    WD Green are not suitable for hardware RAID (or software RAID for that matter).
    USB2 and TimeMachine are a disaster waiting to happen. I've used SATA (internal) and eSATA (using SATA PCIe cards) trouble-free.
    I can't say I begin to understand your use or "choosing the install drive for the backup"
    Install what?
    You don't load TimeMachine. Maybe seems minor but that is not how to describe the behavior of software.
    You read FAQ and How To http://www.apple.com/support/timemachine
    Time Machine’s Gory Details:
    https://www.apple.com/support/timemachine/
    TimeMachine 101
    https://support.apple.com/kb/HT1427
    Lion Recovry & TimeMachine
    http://www.apple.com/support/lion/installrecovery/
    http://www.apple.com/support/lion/
    How To Restore Your System
    http://pondini.org/TM/14.htmlMac OS X v10.7 Lion
    Pondini's Blog: Time Machine - Troubleshooting -- B5.  Would you like to inherit (or re-use) the backup . . . ?

  • How does one do a two way contacts sync between an iphone and outlook? Most of the community has answered as this to be "always so", but it does not work! Changes made on outlook get done in my iPhone, but it does not work the other way around!

    How does one do a two way contacts sync between an iphone and outlook? Most of the community has answered as this to be "always so", but it does not work! Changes made on outlook get done in my iPhone, but it does not work the other way around!

    Close the tab the web page is loaded in (command - W).

  • Muse overwrites any SEO title Tag or Description changes made in Business Catlayst. Is there a work aorund to this? The sites do NOT merge or Muse does not detect the changes made.

    Please advise if there is a work around. If not, Adobe really should fix this issue.

    As you've noticed, Muse will clobber any changes made to the pages Muse works with that have been done outside Muse*. Are the page title features provided not enough for your purposes? Does the information in this thread help at all: Re: How do I add Meta tags to pages?
    * Excepting changes made through 'In-Browser Editing'.

  • MAX 5.0.0 does not see any NI software

    I am upgrading a very old test system to a new motherboard. I am loading a hard drive from scratch since the old system used a PATA drive and the new system uses a SATA drive. Since this system has been in use for over a decade I also thought loading from scratch would be a good idea.
    I load everything up in this order:
    Windows XP (with updates to SP3)
    MAX 5.0.0
    NI-DAQmx 8.6.1
    NI-VISA 5.0.3
    Traditional NI-DAQ 7.4.4 (Legacy)
    NI-488.2 v2.8.0
    NI-845x 1.1.4
    NI-XNET 1.1
    NI-CAN 2.7
    CANopen LabVIEW Library 1.1.3
    When I am done MAX does not list any software. My hardware shows up fine. (PCI-6013, PCI-6025E, PCI-8512, PCI-GPIB)
    Note: My system includes an 8 port serial card and while the ports do list under the MAX hardware section (COM3-COM10) it seems like my software can only access COM1 and COM2. If from within MAX I try "Tools" -> "NI-VISA" -> "VISA Options" nothing happens. I take this as a sign that not seeing software within MAX is at the root of my problem.
    Also, the "Tools" -> "Reset Configuration Data" option is not there although it is supposed to be in MAX 5.0
    As far as I can tell everything I am using is compatible. I don't have many other options since some of my software uses Traditional NI-DAQ.
    What are my options?
    Try something else to get MAX 5.0 working? Install MAX 5.1?

    Good point - I should have mentioned that I did do that before installing any of the NI software.
    BTW: Installing MAX 5.1 did fix the MAX not seeing software issue (still not sure why though) but did not help my COM port problem.
    My programs that use COM1 or COM2 work fine but my programs that use COM3-COM10 do not. If I transmit data on COM3 within MAX using a test panel the data gets sent but when one of my programs sends on COM3 it does not. Really not sure what is going on.

  • Had to reinstall adobe and it does not see any scanner/printer

    Had to reinstall adobe and now it does not see my printer/scanner.  Help?

    Traviss98901234 what Adobe software or service is your inquiry in reference to?

  • LCM does not recognize the changes made in Currency dimension

    Good day all,
    We are doing a Planning application migration from Prod to QA environment. Yesterday, the target planning application's currency dimension was set to Multiple currency. Then earlier today, my colleague updated the target application's currency dimension to single currency. Now, every time we perform the migration, LCM says that:
    "Data storage cannot be stored to Label Only, Dynamic Calc, or Dynamic calc and store for entity versions, currencies and user defined dimension in multi currency dimensions".
    Does this mean that LCM still sees the currency dimension of the target application as multicurrency? May we know how to fix this?
    Thanks in advance.

    As you've noticed, Muse will clobber any changes made to the pages Muse works with that have been done outside Muse*. Are the page title features provided not enough for your purposes? Does the information in this thread help at all: Re: How do I add Meta tags to pages?
    * Excepting changes made through 'In-Browser Editing'.

Maybe you are looking for

  • Not able to login after installing htmldb 1.6

    I've got Oracle 10g 10.1.0.3 installed and a database up on Redhat AS 3.0. I installed htmldb 1.6 per the otn instructions, but it never actually allowed me to login, every time I hit the submit button on the login page, I got nothing. Tried it from

  • Payment Term in PO

    Hi All, Scenario: Payment term in vendor master(Purchasing &accounting view) is P124 while POs which are getting created for this vendor via batch jobs are having a payment term P125. Requirement is that Paymnt term in PO should come from Vendor mast

  • EXCEL attachment as EMAIL to USER - When USER executes REPORT in BACKGROUND

    Hi Friends, I have 10 records in Internal Table. In BACK GROUND execution, I have to send this 10 records as EXCEL attachment through EMAIL to the USER who executed in background. How to do this? Thanks in advance. Regards, Viji.

  • Problem in Import of RFC and IDoc interfaces

    hi, i am a beginner in XI. now am following the link given below. https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e07dcaa0-a92b-2a10-3a96-b3d942bd1539 Topic: A Step-by-Step Guide on IDoc-to-File Using Business Service in the XI In

  • Validation On Tabular Form

    How to implement validation such on TABULAR FORM select case when lead (IHL_PDATE) over (order by IHL_PDATE) > IHL_PDATE OR lead (IHL_PDATE) over (order by IHL_PDATE) is null 'Ok' else 'Not Ok' end after or before submitting form?* I implement it on