you lose in the output settings after an exception?

BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE     11.2.0.2.0     Production
TNS for HPUX: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
CREATE OR REPLACE PACKAGE mypackage
AS
   PROCEDURE myproc;
END;

CREATE OR REPLACE PACKAGE BODY mypackage
AS
   PROCEDURE myproc3 (lastSqlStatement   IN OUT VARCHAR2,
                      backtrace          IN OUT VARCHAR2)
   IS
      myvalue   VARCHAR2 (10);
   BEGIN
      lastSqlStatement := 'select ''z'' into myvalue from dual where 1 = 0;';

      SELECT 'z'
        INTO myvalue
        FROM DUAL
       WHERE 1 = 0;
   EXCEPTION
      WHEN OTHERS
      THEN
         backtrace := backtrace || DBMS_UTILITY.format_error_backtrace ();
         RAISE;
   END;



   PROCEDURE myproc2 (lastSqlStatement   IN OUT VARCHAR2,
                      backtrace          IN OUT VARCHAR2)
   IS
      myvalue   VARCHAR2 (10);
   BEGIN
      lastSqlStatement := 'select ''y'' into myvalue from dual;';

      SELECT 'y' INTO myvalue FROM DUAL;

      myproc3 (lastSqlStatement => lastSqlStatement, backtrace => backtrace);
   EXCEPTION
      WHEN OTHERS
      THEN
         backtrace := backtrace || DBMS_UTILITY.format_error_backtrace ();
         RAISE;
   END;



   PROCEDURE myproc
   IS
      lastSqlStatement   VARCHAR2 (3200);
      backtrace          VARCHAR2 (3200);
      myvalue            VARCHAR2 (10);
   BEGIN
      backtrace := NULL;
      lastSqlStatement := NULL;
      lastSqlStatement := 'select ''x'' into myvalue from dual;';

      SELECT 'x' INTO myvalue FROM DUAL;

      myproc2 (lastSqlStatement => lastSqlStatement, backtrace => backtrace);
   EXCEPTION
      WHEN OTHERS
      THEN
         backtrace := backtrace || DBMS_UTILITY.format_error_backtrace ();
         DBMS_OUTPUT.put_line ('backtrace: ' || backtrace);
         DBMS_OUTPUT.put_line ('lastSqlStatement: ' || lastSqlStatement);
   END;
END;
exec mypackage.myproc;
backtrace: ORA-06512: at "DSAMSCONV.MYPACKAGE", line 27
ORA-06512: at "DSAMSCONV.MYPACKAGE", line 44

lastSqlStatement: select 'x' into myvalue from dual;
I thought that I should have received

backtrace: from proc3
and saying lastsqlstatement ' select 'z' in myvalue double where 1 = 0;

you lose your settings output when an exception occurs?

Hello

Pollywog wrote:
...

backtrace: ORA-06512: at "DSAMSCONV.MYPACKAGE", line 27
ORA-06512: at "DSAMSCONV.MYPACKAGE", line 44

Are you sure that you are using what you've posted? I cut and pasted your code, errors get on line 37 and 54, as if I had added 10 lines on the package body. Errors are basically what you've posted, however.

you lose your settings output when an exception occurs?

You lose the new values.

IN OUT arguments (without NOCOPY) are copied when you call the procedure. When you exit the noramlly procedure, the modified values are copied to the calling procedure. But if you leave the procedure through an unhandled exception, then the changed values are not copied back.

So if myproc2 called myproc3 and myproc3 has an unhandled exception, when the control is returned to myproc2, IN OUT arguments he spent at myproc3 will always the values they had when you called myproc3.
Similarly, if myproc name myproc2 and myproc2 is an unhandled exception, then, back in myproc, IN OUT arguments will have to the values they had when myproc2 was called.

It is documented in the Manual of PL/SQL

If you exit a subprogram successfully, PL/SQL assigns values to the actual parameters. If you come out with an unhandled exception, PL/SQL assigns values to the actual parameters.

I thought that I should have received

backtrace: from proc3

You mean you were expecting something backtrace referring at the beginning of the package (lines 3-19 you posted) containing the proc3 code?

and saying lastsqlstatement ' select 'z' in myvalue double where 1 = 0;

This is what lastsqlstatement will be if you use NOCOPY, for example:

PROCEDURE myproc2 (lastSqlStatement   IN OUT  NOCOPY  VARCHAR2,
                   backtrace          IN OUT  NOCOPY  VARCHAR2)

If you find it unusual or confusing, you have plenty of company.

Tags: Database

Similar Questions

  • CS6 Illustrator - How can I change the output settings?

    Hi, its really annoying that I can not change the output settings when I save for the web, something. I just mean Illustrator I want to create a new folder images whenever I have save something, and I don't want to add a _N at the end of the file name...

    Is there a way to change this?, I couldn't find it.

    Thank you.

    This feature has been removed from CS6:

    Quoted from this employee Adobe blog post on the new CS6 save for Web feature:

    The output, used parameters dialog box for formatting HTML file control, naming slice and manipulation of background image, has been removed.

    I didn't chance to find a workaround, but I'll keep poking around.

  • How to reset the network settings after an international trip

    I got an iPhone 6 overseas and had to do a manual network setting to use my phone.  now that I'm back in the USA, I need to know how to make it back to my home carrier for network settings.

    Hello

    GoTo settings reset network settings after reset entered your key wireless router.

    Also check the time settings ensure its self on.

    See you soon

    Brian

  • Satellite A500 - how to restore the factory settings after upgrading to Windows 7?

    Hello

    Since I have updated my OS to Windows 7, I have a few problems. In general, I noticed my laptop would ' t work as well as it was running Vista 32 bit. Especially with games online (souch as counter strike 1.6).

    The problem is that I have for my backup DVD because my DVD burner work not at all :/ Now I just wonder how could I return for win Vista without the DVD. Is it still possible? I also do not have small jets CD I bought my laptop. So, what should I do?

    null

    Hi stab them.

    I think that I n the new good t for you: restore factory settings without Toshiba recovery disc isn t possible in your case! :(

    First of all I think it's normal to s no recovery disk is delivered with the laptop as you will need to create them yourself using the Toshiba recovery disc creator. That is why it s recommended using high quality as Verbatim DVD-R media.

    I think that the only option to recover to factory settings is to order a new Toshiba recovery disc.
    https://backupmedia.Toshiba.EU/landing.aspx

    I put t understand why you didn't create this disk, because after the first boot, if you shut down the computer area, you get the following message:
    + Important INFORMATION +.

    + your system is equipped with a hard drive recovery system. If you need repair.
    + your computer in the restaurant to original factory State, you can do it directly.
    + HDD (press F8 when you start your computer, choose "Repair your computer" +)
    + and follow the instructions in the menu) or create a media drive bootable recovery to that end. +.

    + Toshiba recommends you create recovery disk medium uses the "Toshiba Recovery Disc Creator' to ensure the +.
    + Hat you are able to restore your computer to the State of origin, installed at the factory, even if your computer +.
    + Gets severely damaged.

  • Read the output values after each step runs in the User Interface of LabVIEW

    Hi all

    Development environment: TestStand 2010 SP1 and LabVIEW 2010 SP1

    Problem: is there a way to run the following steps programmatically and get values out of each of them?

    I have already extended a bit a complete interface IO for TestStand load any sequence, choose among the measures and execute step by step (something as an alternative to the steps run selected). What I'm trying to do is to add some actions between each step and do in the UI (I can't change the sequence!), so I start the NewExecution with some previously configured InteractiveArgsParam and option breakAtFirstStep set to true. Eventually I do just something like step over when debugging the sequence and it works well, but I didn't do well a way yet to read the output values of the place...

    So, if I wait before the end of the run I can read my results by treating the ResultObject, but it works only after the completion of the test sequence. Because I wanted to stop after each step, read the values, do some actions and continue to the next step, I've tried to register a running Trace event reminder View Manager. I see that after each step is executed, this event is fired, but when I try to read that a ResultObject returned in the event data it is not filled with values (ResultList seems to be empty?). Is this a correct behavior or maybe I'm reading the wrong way? (It's the same VI regarding the reading of the ResultObjects after the sequence ends and there it works very well for tables, containers and other types of data).

    As I mentioned I can't change Test sequences, I can not add a UImessages.

    What are my options? If the trace event returns output all the values from each steps or is it just used to check the status? Or maybe there's a completely different approach to this issue?

    Thanks in advance for your suggestions,

    Best regards.

    When you manipulate the UIMessage trace (you need this before the return of the event or you will present the race conditions), download myuimessage. Thread. Then call Thread.GetSequenceContext (0, & Iplease).

    And then on the context of the sequence, either go to PreviousStep.Result if it exists, or watch Locals.ResultList.

    Trace events occur between the steps executed step the more recently is the previous step, but it is also a trace event to the beginning before any measure have run at this time, there will be a previous step.

    Hope this helps,

    -Doug

  • NH-1005 ver 2.2 hub allows you to restore the default settings

    OK, I have a worm hub 2.2 NH 1005 that I used a little more than six months, and I need your advice on restoring the default settings.

    the web-based configuration page can be accessed through 192.168.2.1 on IE, but my step son was trying to fix the nat definition for its xbox 360 (not so hard to do...) and changed the settings under remote management to turn off. now, it is not possible to connect to access based on the Internet web page.

    is there another way? Is there a restore defaults button in the web page, but no button or other basis on the hub itself. any advice, other than to get rid of it and replace?

    So in this case you should check the settings of your DSL modem. Like most of the DSL modem has a built-in DHCP server. Then maybe you lose connectivity to your modem DSL itself.

    As your HUB is a dumm device and it dosent have any parameters, or you can reset your HUB. Only, you can make a normal feeding cycle and which will not solve the problem.

  • This folder is located in the windows folder: $NtUninstallKB36574$ It is not available and you cannot change the security settings.

    This folder is located in the windows folder: $NtUninstallKB36574$
    It is not accessible.  I can't change the security settings.
    It is the remains of an outbreak of the virus.
    I saw that on 2 client computers this course last 6 months.
    So, how is it possible for an inaccessible folder to administrators?
    How can I change the security settings to remove.
    After you run several virus cleaners, I'm pretty sure that the virus has disappeared.
    Ideas?

    You should be able to remove it from the command prompt in Windows Repair Mode.

  • Changing the unexpected settings after update

    HI - George here in Rhode Island.

    I have Windows 7 Ultimate 64 bit and whenever I do a "reboot" or (I think) an update causes a reboot; my 'games' (hearts + Spider Solitaire) revert to the default settings. The "Display-bubble" option is checked and all the names of the other players return to the "North-South and West. No other user profile settings are changed.

    I know that this is a trivial question, but it's driving me crazy! I found a reference to this line that suggested Roxio Creator may be the cause, but removal of Roxio did not fix the issue. I tried to reinstall the operating system without success. The only thing I found which may relate is an error in Event Viewer

    -
    -
    7000
    0
    2
    0
    0
    0 x 8080000000000000
    27991
    System
    GW - PC

    -
    SessionLauncher
    %%d Ko

    Links on the error '0 x 8080000000000000' do not seem to help.

    Any help or information would be appreciated.

    Thank you

    Hello
    Method 1:
    Perform the clean boot and check.
    To help resolve the error and other messages, you can start Windows Vista or Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    Note: See the section step 7 above to start the computer by using normal startup after you have performed the steps in troubleshooting.
    Method 2:
    Method 2:
    Scan a file system (CFS) checker on your computer and see if that fixes the problem.
    SFC tool scans system files and replaces incorrect versions of system files by using the correct versions.
    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833
    Method 3:
    I suggest to create a new user account and see if the problem still occurs, follow the link:
    Step 1: Create a new user account.

    http://Windows.Microsoft.com/en-us/Windows7/create-a-user-account

    Step 2: If the problem does not persist in the new user account, try and fix the damaged user account following the link:

    Difficulty of a damaged user profile

    http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile

    I hope this helps.

  • You cannot change the output type and format in the page requests system - PeopleSoft process

    Hi all

    When I navigate to the PeopleSoft process scheduler page and try to run a process I see the output type and format web and txt only. I am unable to change the output type and format. All formats and types of output are marked as active in the system settings page. I'm super user of the system as well. I have as well the role of Admin ProcessScheduler. I would like to know if someone has already faced similar problems.

    Thank you

    Vimal

    Run the following SQL query to your OPRID:

    SELECT A.CLASSID, PSPRCSPRFL A.OVRDOUTDEST, PSOPRDEFN B WHERE B.PRCSPRFLCLS = A.CLASSID AND B.OPRID = '';

    Make sure that OVRDOUTDEST = 1.

    If it's 0 then you have to fix your configuration profile of the process as follows:

    -Main menu > PeopleTools > Security > list permission > CLASSID research (white list) back to top query

    -Go to the process tab

    -Click on "process the profile permissions

    S ' ensure that 'substitute an output Destination' is checked. Click OK, and then save.

    This should solve your problem.

  • Change the kernel settings after 10g Software Installation

    Hello world

    I need to install Oracle 10 g 2 in a box of HP - UX Itanium for an upgrade of Database 9i and 10g and some have recommended prerequisites of the kernel are not defined as requested for the installation program. Kernell settings have been changed in order to fulfill the preconditions but the can´t server be rebooted now because it is a production environment, it will be restartedb in two weeks, but I want to start right now with the installation software.

    My question is: safetly can I install the software, and after restarting the server, perform the upgrade of my database?

    The kernel parameters that failed were:
    Verification of the maxdsiz_64bit = 2147483648;      found maxdsiz_64bit = 1073741824.     Failure of < < < <
    Verification of the maxswapchunks = 16384;           no entry found.                         Failure of < < < <
    Checking the semmap = 4098;                no entry found.                         Failure of < < < <


    I'll appreciate your help... Thanks in advance!

    Alvaro Uribe

    Edited by: 865814 01-Aug-2011 13:47

    Hi Alvaro;

    I belive that you can go to to ignore this message on your installation. But after installation you need to restart your server coz if you keep working like this probably will hit you on your db errors

    Respect of
    HELIOS

  • Size - allows you to restore the default settings

    original title: size...

    How can I change my settings back to the default settings. The way it is right now I can't view the entire page

    I can only * guess * you're talking about screen resolution?
    http://Windows.Microsoft.com/en-us/Windows-Vista/change-screen-resolution

    If this isn't the case - please come back with more information.

    (Whatever it is, come back and let everyone know how proven things.)

  • Change the output settings &gt; compatibility of SaveForWeb file via the script name?

    I'm having a problem with one of my scripts adding hyphens instead of spaces to the files saved by export > SaveForWeb-feature. I realize it's because of the "unit of compatibility file name >"-box under output settings, but I can't find any info on how to disable this thing. The ExportOptionsSaveForWeb object does not seem to cover this particular setting.

    The temporary file name must not have spaces, for example "tempSWF.jpg".

    EDIT: just saw that it was PNG so use something like "tempSFW.png".

    If the tempname had spaces or other strange characters when recording file name could be different!

  • You cannot change the output folder

    I use Adobe Acrobat 8 installed on a Windows 7 system.

    I'm editing Adobe PDF output folder by using the following steps:

    • Open Control Panel.
    • Go to devices and printers.
    • Right click 'Adobe PDF' and select 'Printing Preferences '.
    • Change "folder of output Adobe PDF' by clicking on 'Browse' then selecting folder on the local drive.
    • Click OK.

    Whenever I have change the output folder then reopen the PDF Adobe Print Options dialog box, the default output folder setting is back.

    Please notify.

    Thank you

    Chris

    Hey Chris,

    Please try and find a similar folder under "HKLM\SOFTWARE" or check all the folders it contains, where you can find "Adobe" & then follow the same steps.

    Kind regards

    Nicos

  • What do you do with the source file after editing and export

    Hello

    I wounder what people do with the file source after publishing, they take a lot of space on my computer. I can hardly bring myself to delete, but can't I save because of the space on the hard disk. thought, only export those clip that you used in your timeline, uncompressed?

    Take a look at the project manager on the file menu. This gives you many options to compress your files used.

  • How to reset the wifi settings after a move and a new service?

    I moved and set up the new wifi service. How to get this printer (4620) back on wireless capabilities? I use Mac OS x 10.10.3

    Thank you people

    Hi @LaNita1950,

    I can help you set up the printer to your network!

    You have a USB cable, you can use to connect the printer to the Mac? If so, please connect the devices, then open the Applications folder and find the HP folder. In the HP, search for peripheral Utilities folder and open the HP installation wizard.

    In the Setup Wizard, you will see the option to configure the printer to the network via the USB port.

    Please let me know if this resolves your request. Thank you.

Maybe you are looking for