AutoCommit after DBMS_DATAPUMP.open

Hi, is there any way to avoid autocommit after DBMS_DATAPUMP.open? I want to rollback changes if export fails, but after DBMS_DATAPUMP.open (even if export fails) changes are commited...
plsql code:
INSERT INTO courier(courier_id, fname) VALUES (1001, 'myname');
v_handle := DBMS_DATAPUMP.open(
operation => 'EXPORT',
job_mode => 'TABLE',
remote_link => NULL,
job_name => v_jobname,
version => 'COMPATIBLE');
rollback;
This is not the code i am using, just easiest way to invoke the problem.
oracle version: Oracle Database 10g Release 10.2.0.1.0

You need autonomous transactions, see http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_sqlproc.htm#sthref306
>
At times, you may want to commit or roll back some changes to a table independently of a primary transaction's final outcome. For example, in a stock purchase transaction, you may want to commit a customer's information regardless of whether the overall stock purchase actually goes through. Or, while running that same transaction, you may want to log error messages to a debug table even if the overall transaction rolls back. Autonomous transactions allow you to do such tasks.
An autonomous transaction (AT) is an independent transaction started by another transaction, the main transaction (MT). It lets you suspend the main transaction, do SQL operations, commit or roll back those operations, then resume the main transaction.
>
HTH
Enrique

Similar Messages

  • DBMS_DATAPUMP.OPEN

    Hi,
    I am a newbie in PL/SQL & DATAPUMP !
    I tried to generate (OPEN) a IMPORT-JOB with:
    CREATE OR REPLACE PROCEDURE XX IS
    BEGIN
      BEGIN
        DECLARE
          HANDLE1 NUMBER;
        BEGIN
          HANDLE1 := DBMS_DATAPUMP.OPEN(OPERATION   => 'IMPORT',
                                        JOB_MODE    => 'SCHEMA',
                                        REMOTE_LINK => 'STRM');
          DBMS_OUTPUT.PUT_LINE('HANDLE1 :' || HANDLE1);
        EXCEPTION
          WHEN OTHERS THEN
            DBMS_OUTPUT.PUT_LINE('EX_HANDLE1 :' || HANDLE1);
            DBMS_OUTPUT.PUT_LINE('Import Error 1 :' || SQLERRM(SQLCODE));
        END;
      END;
    END XX;and got always the following error after the execution:
    SQL> execute xx;
    EX_HANDLE1 :
    Import Error 1 :ORA-31626: Job ist nicht vorhanden
    PL/SQL procedure successfully completed
    SQL>
    And the handle-Variable is blank !!
    What did I wrong?
    Please, help !
    hqt200475
    Edited by: hqt200475 on Mar 29, 2011 3:16 AM

    Hi Saubhik,
    I create the code like this once more:
    CREATE OR REPLACE PROCEDURE XX IS
    BEGIN
      BEGIN
        DECLARE
          HANDLE1 NUMBER;
        BEGIN
          HANDLE1 := DBMS_DATAPUMP.OPEN(OPERATION   => 'IMPORT',
                                        JOB_MODE    => 'SCHEMA',
                                        REMOTE_LINK => 'STRM');
          DBMS_OUTPUT.PUT_LINE('HANDLE1 :' || HANDLE1);
          DBMS_OUTPUT.PUT_LINE('something stupid ');
        EXCEPTION
          WHEN OTHERS THEN
            DBMS_OUTPUT.PUT_LINE('EX_HANDLE1 :' || HANDLE1);
            DBMS_OUTPUT.PUT_LINE('Import Error 1 :' || SQLERRM(SQLCODE));
        END;
      END;
    END XX;It works on sqlplus :
    SQL> execute strmadmin_tgt.xx;
    HANDLE1 :7
    something stupid
    PL/SQL procedure successfully completed.
    SQL>but in PL/SQL-Developer the following output:
    SQL> set serveroutput on;
    SQL> execute strmadmin_tgt.xx;
    EX_HANDLE1 :
    Import Error 1 :ORA-31626: Job ist nicht vorhanden
    PL/SQL procedure successfully completed
    SQL> I think that's a PL/SQL-Developer-Problem.
    Thanks and regards
    hqt200475
    Edited by: hqt200475 on Mar 29, 2011 4:11 AM

  • Voice memo screen disappears right after I open it.

    Voice memo screen disappears right after I open it. The last voice memos I recorded seem to have disappeared.
    iPhone 4 iOS 6.1.3

    have you tried the general cure for most issues?
    http://www.apple.com/support/iphone/assistant/phone/#section_1

  • Firefox 4 freezes after i open it (keeps loading the page non-stop and i cant click or do anything

    firefox 4 freezes after i open it (keeps loading the page non-stop and i cant click or do anything, plus there is no option to report an error so i cant even get this checked and this seems to be the case on 3 different computers i use all have windows 7 32bit.

    Hello,
    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!
    Thank you.

  • IPhoto keeps shutting down a few seconds after I open it. What is wrong?

    My iPhoto shuts down a few seconds after I open it. It sys there's problems to repair, then it repairs the problen, then a few seconds later it shuts down. What can I do?

    Post the first 50 lines only of the crash report
    Regards
    TD

  • My safari keeps closing 5 seconds after i open it, what should i do?

    My safari keeps closing about 5 seconds after i open it and i have already reported it but i really need it right now, what can i do?

    Copy and paste the crash report in your reply. The entire report.

  • After I open itune i then try to access either the itune store or the app store i get a message saying "ITunes has stopped working"

    After I open ITunes if I try to connect to the ITunes store or the App Store i get an error message.
    It reads
    "ITunes Has Stopped Working"
    "A problem caused the priogram to stop workin correctly. Windows will close the program and notify if a solution is available"
    I have rebooted, made sure I am up to date with itunes version and windows but it still wont work. My internet connection is fine
    How do I reestablish contact with the ITunes store?

    Hello. Have you tried using Safe Mode yet? For PC hold F8 on startup and select Safe Mode from Advanced Boot options screen. Also try reinstalling iTunes. Also open up the error console (wherever that might be; I'm a Mac person) and post the error that is causing it to quit. Hope it works!

  • Illustrator CC 2014 closes immediately after it opens (Windows 8.1)

    Not only the Illustrator CC 2014 but other CC 2014 Apps as well closes after it opens.
    It doesn't show any error message or something like that. It's more like if I have clicked at the "close window".
    The Illustrator load itself, opens and before I can do something it immediately closes.
    I saw an error in the forum with some Wacom tablets but I've tested it with a single mouse and the error persists.
    I've just installed the CC 2014 update and now I can't run any Adobe App.
    I'm using Windows 8.1, but didn't find any topic about error occurring that way.
    Please help me.
    Thanks
    Felippe Silveira

    Hi Felippe,
    If it is Illustrator CC 2014.1(18.1.0) and you are using Extensis Suitecase Fusion then please try following solution given in the article.
    http://helpx.adobe.com/illustrator/kb/illustrator-cc-20141-crash-launch.html
    Here is the Extensions Suitcase 5 update which I believe will solve the issue.
    http://www.extensis.com/support/product-support/suitcase-fusion-5/
    Hope this helps.
    Please let me know if this is not the case.
    Regards,
    Sumit Singh

  • Photoshop CC 2014/Portuguese crashes right after it opens

    I installed Photoshop CC 2014/Portuguese on my noteebook Sony Vaio Core i5/2.5GHz/6Gb RAM/64bit OS/Windows 8 Pro/NVIDIA GeForce GT 640M LE, and right after I open it, it shows the following message: "Adobe Photoshop CC 2014 stopped working. A problem cause the program to stop working correctly. Windows will close the program and will notify you if there is an available solution." I have searched for solutions and have already done thee hints showed on this forum with no success:https://forums.adobe.com/thread/1499775. So I come here to ask for help because nothing has made it work. Thank you!

    The crash report:

  • Just upgraded to OSX mavericks on macbook pro mid 2011 version. Having a big issue here that whenever my mac comes back from sleep, i.e after I open the lid, the screen flickers and there is an error of Finder not opening properly. Any fix to this?

    Just upgraded to OSX 10.9 mavericks on macbook pro mid 2011 version. Having a big issue here that whenever my mac comes back from sleep, i.e after I open the lid, the screen flickers and there is an error of Finder not opening properly. Any fix to this?

    My daughter has had her Razr for about 9 months now.  About two weeks ago she picked up her phone in the morning on her way to school when she noticed two cracks, both starting at the camera lens. One goes completely to the bottom and the other goes sharply to the side. She has never dropped it and me and my husband went over it with a fine tooth comb. We looked under a magnifying glass and could no find any reason for the glass to crack. Not one ding, scratch or bang. Our daughter really takes good care of her stuff, but we still wanted to make sure before we sent it in for repairs. Well we did and we got a reply from Motorola with a picture of the cracks saying this was customer abuse and that it is not covered under warranty. Even though they did not find any physical damage to back it up. Well I e-mailed them back and told them I did a little research and found pages of people having the same problems. Well I did not hear from them until I received a notice from Fed Ex that they were sending the phone back. NOT FIXED!!! I went to look up why and guess what there is no case open any more for the phone. It has been wiped clean. I put in the RMA # it comes back not found, I put in the ID #, the SN# and all comes back not found. Yet a day earlier all the info was there. I know there is a lot more people like me and all of you, but they just don't want to be bothered so they pay to have it fix, just to have it do it again. Unless they have found the problem and only fixing it on a customer pay only set up. I am furious and will not be recommending this phone to anyone. And to think I was considering this phone for my next up grade! NOT!!!!

  • ORA-39001: invalid argument value dbms_datapump.open

    Hello,
    I'm trying to import objects in a tablespace from a remote database.
    The link source.de is working, but the dbms_datapump.open statements fails with below errors
    SQL> var h number;
    SQL> exec :h := dbms_datapump.open (operation => 'IMPORT',job_mode => 'TABLESPACE', remote_link => 'source.de');
    BEGIN :h := dbms_datapump.open (operation => 'IMPORT',job_mode => 'TABLESPACE', remote_link => 'source.de'); END;
    ERROR at line 1:
    ORA-39001: invalid argument value
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 2953
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 4603
    ORA-06512: at line 1
    When I describe dbms_datapump.open:
    FUNCTION OPEN RETURNS NUMBER
    Argument Name Type In/Out Default?
    OPERATION VARCHAR2 IN
    JOB_MODE VARCHAR2 IN
    REMOTE_LINK VARCHAR2 IN DEFAULT
    JOB_NAME VARCHAR2 IN DEFAULT
    VERSION VARCHAR2 IN DEFAULT
    COMPRESSION NUMBER IN DEFAULT
    Anyone familier with this problem?
    Regards,
    Tim

    ORA-39001: invalid argument value, could be because of the db_link (is not seen by the owner of the code, by the schema which has the rights to run the code).
    You can take a look at:
    <p>
    http://www.oracle-home.ro/Oracle_Database/10g_New_Features/Schema_refresh_DP.html</p>

  • HT1692 After I open a calendar event and click on the address so that it pulls it up in maps, the appointment disappears from my calendar completely. What do I do to fix this?

    After I open up an appointment on the calendar on my IPhone, I click on the address to pull up the directions. After I do that the appointment no longer shows on my calendar. This just started happening but it happened three times today. What do I do to fix this?

    Hey beka.hicks,
    To start off your troubleshooting, first, I would reset the device you're trying to download it on:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    from: iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    And if that doesn't resolve the issue then I would report the issue:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBooks Store purchase
    http://support.apple.com/kb/HT1933
    Welcome to Apple Support Communities!
    Cheers,
    Delgadoh

  • My iPhoto keeps quitting on me about 30 seconds after I open it. Anyone know what's going on?

    My iPhoto keeps quitting on me about 30 seconds after I open it. Anyone know what's going on?

    Kern Portection Failure is usually related to data.   Apply the two fixes below in order as needed: 
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start with Option #3, followed by #4 and then #1 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • After I open and read an email how do I get back to email.  I am closing the open email then having to go back to the home screen and then reopen the mail app.  There has to be a better way.

    After I open and read an email using my mail app, how do I get back to the email app to open an read others.  I am closing the email open, going back to the home screen and reopening the mail app every time.  There's got to be a better way to do this.

    If you are using the iPad in portrait mode, swipe from left to right in order to bring up the preview window of your emails again.

  • After ITunes opens an error pops up

    I downloaded the newest version of ITunes 7.0.1 and now right after it opens a window pops up saying that itunes encountered a problem and needs to close. Then when i hit dont send or send error report itunes shuts down

    ..."curses" doesn't sound good.....
    sorry, didn't mean to alarm you. it was my frustration speaking. (i've gone from having a 100% reliable troubleshooting technique for this one, to having to work out precisely what we should do when the QT standalone installer isn't as current as the version that comes with itunes.)
    okay, let's see if we can convince the itunes repair install to drop a fresh QT in there if we manually remove existing QT program files and folders first.
    1. On the Start menu, click My Computer (or double-click My Computer on the Desktop).
    2. In My Computer, open Local Disk.
    3. Open Program Files.
    4. Right-click on the QuickTime folder and click Delete from the shortcut menu.
    5. Navigate to C:\Windows\system32\.
    6. Remove the files QuickTime.qts and QuicktimeVR.qtx.
    7. Restart your computer.
    after the PC restarts, let's try the repair install again (taking the same precautions as we did the previous time).
    any better success with that approach?

Maybe you are looking for

  • Calling SQL Loader from ColdFusion Web Server

    We are trying to Load Data files into Oracle through a Cold Fusion Web Application. Users will browse to a local file on their computers, click a button, and our application will use SQL Loader to load the data into oracle. The ColdFusion web server

  • Accounting document posting enhancement

    Dear All,      I am having requirement of exchange gain/loss should go only loss g/l account. since it is client level setting i cannot change this & it is required only for 1 of the group companies. other cos follow std process it gain/loss based on

  • 11.1.5 can't resize window

    In short, the window resize 'grabber' on the lower right of the iTunes window is no longer available. (And dragging the corner doesn't resize it either.) See below. 11.1.5 (5)

  • Enhancement request: ADF BC property sets

    Hi JDev team "Yeehaw" on the property sets feature. Very Oracle Designer like. To make them even more powerful can you: 1) In the App Navigator provide "analyze dependencies" option on the right mouse sub-menu. 2) In the ADF BC EO/VO attr document vi

  • Flash Video Broken In 2.0.0.7111?

    I had this problem with .6149 but was hoping it would be fixed with .7111. When I try to watch a video on youtube or vimeo I am able to watch the first video which will load perfectly fine. However, once I try to play another video, the browser freez