pl sql - how to set Oracle concurrent Request Status = error

I registered a custom as a competitor to Oracle pl sql block. I would like to raise an EXCEPTION that will be the end of employment in an error state if a condition is met. How can I do this? Here is a snippet of code that I have:
       WHEN v_nodata THEN
                <what command can I put here?  I want the concurrent request job to error so that the next pl sql block doesn't get executed.>
      when OTHERS THEN NULL;
Thank you!

You can use RAISE; (when you are already within an exception block and want to raise the same error) or

RAISE_APPLICATION_ERROR(-20000, 'My error message goes here');

Replace - 20000 for any negative number between - 20000 and-20999 your error code.

If you are talking about registration of an error code to a name, you must use the PRAGMA EXCEPTION INIT.

  deadlock_detected EXCEPTION;
  PRAGMA EXCEPTION_INIT(deadlock_detected, -60);
  NULL; -- Some operation that causes an ORA-00060 error
  WHEN deadlock_detected THEN
    NULL; -- handle the error

Published by: fsitja on December 10, 2009 16:18

Tags: Database

Similar Questions

  • How to set the simultaneous request completed with warning?

    Hi all:
    How to set the simultaneous request completed with warning in oracle 11.5.9?

    For example:

    I completed an application with "Completed" 'Normal '.
    After I put a condition similar to when xxx > 0 then
    It will complete a request indicates 'Complete' 'warning '.

    My environment is: oracle 11.5.9 and operating system is Linux Redhat 4.0




    Note: 866194.1 - is there a method to return a 'Warning' to host Language simultaneous program status?

    The Oracle Applications Developer's Guide


    Thank you

  • Oracle concurrent requests to calc and drive using Essbase support

    Hi all, we have currently have a process in which the shot of a control to see if users are online (maxl), logoff users if necessary (maxl), run with maxl essbase calculation, run eis job if necessary, assess if there is an error, and report the error. We want to pass this so that it is automated using Manager competitor Oracle via Oracle concurrent requests. Does anyone know if this is possible and if so usually the best approach?

    Several simultaneous requests, Oracle looks like it will run host scripts for example shell scripts /... so it shouldn't be a problem to integrate your processes with batch. If you plan them from one server other than your Essbase server, you must install the Essbase client on this machine and make sure that use you the startmaxl.ksh or update paths if necessary.

    I have not run into people using this before however, it isn't always the DBA Oracle s who run Essbase.

    Kind regards

    John A. Booth

  • How to Set Digital i/o status of Watlow EZ - Zone RM on 'ON' in LabVIEW?

    I have an EZ - box RM Watlow controller and here is the driver: (R)

    I have 16 e / s digital connected to the CRDD and I need to use to trigger the SSR.

    so here's my question

    How to Set Digital i/o status of Watlow EZ - Zone RM on 'ON' in LabVIEW?

    What ID setting should I use to replace the OFF state (62) (63)?

    First I thought that I can write "63" in the ID parameter "6007", and it does not work because it is a read only parameter. Is it supposed to be a way I can just simple it switched off to change on?

    Thank you for answering my question.

    The OID cannot be set directly. First a block Variable must be digital and connected to the block of DIO mode. Then changing the numeric status can be changed (63) to off (62).

  • How to set the concurrent autorun program

    Hi friends

    I am new to oracle applications...

    I need to know how we can define a competitor program runs automatically.
    From now we organize a simultaneous program manually at some point .but now we want to execute the concurrent program automatically.
    Short description: what to stop the manual work and change automation

    Suggest how possible, it's possible... plaese provide me with no link or doc please refer

    Your suggesstion will be significant

    Thank you

    Here, the option of some begin to:

    That at 14:00

    End at:

    Keep this vacuum.

    Re-run each

    1 day (s).

    Apply intervels "from the start of the previous race", "the completion of a preliminary"

    At the beginning of the previous race

    For my needs I have to specify?

    Save this schedule.

    Thank you

  • How to set serial number not found error

    I replaced the motherboard on my compaq mini 110 now it does not start and says the number of series not found in red and I can't enter bios how can I fix this problem or do I too let hp do?


    You need to take your laptop to an HP authorized repair center, so they can "tattoo" the BIOS with the model number and the serial number with the DMI tool.

    This tool is not available to the public.


  • XML editor - validation, concurrent program Status Error value parameters?

    I'm working on a XML Publisher report and I want to validate the parameters passed through simultaneous program before you run all report queries.  If the parameters are invalid, stop execution and complete the simultaneous program with an error and the reason the newspaper to print.

    So far, I have created a package that I use to validate the settings, it is called in the data model in the first query, while if the program competitor to stop error.  I call her

    SELECT package_name.validate_parameters(:p1, :p2)
      FROM dual

    If I get the invalid parameters when submitting the request, simultaneous program ends in error, but the newspaper lists just the reason for the oracle.jdbc.driver.DatabaseError.throwSqlException(

    My package/function has the following exception that I raise, but the messages do not appear in the output log:

      WHEN range_invalid THEN
        fnd_file.put_line(fnd_file.output, c_range_invalid_msg);
        fnd_file.put_line(fnd_file.log, c_range_invalid_msg);

    Any ideas?

    Nevermind, solved using beforeReport relaxation with TRUE/FALSE return values

  • How to submit a concurrent application of the Scout report.

    I would like to know if anyone has tried submitting a concurrent application of discoverer report? _

    This is no dumb question, but our team here finally decided with a solution to our long-term issues with little discoverer pending report. To go further, we would like to know, how to submit a concurrent request of the discoverer report?

    We are looking for the appellant a package from the admin of Disco passing parameters to the disco to 6i report.

    All help us in this matter is highly appreciated.

    Kindly help us in the same!

    Thank you


    If you need a table before running a report there are an other few mechanisms that you can use. You can use a trigger to session, the political function or table VPD to execute some PL/SQL, before the main report is run.

    You should try to use a mechanism that will allow the report to be run at the same time by two users. Difficulty using a concurrent request is that the request is not related to the session of the user, so that if two users run the report, or the same user runs the report, once again, you will get two concurrent requests running. Your report will also have to wait for the completion of the concurrent request.

    Ideally, you need to use a temporary table and PL/SQL that runs in the session to fill the table so that when the session ends you don't need to reset the table. Also users can run the report at the same time because the contents of the temporary table is visible only by the session that inserted records.

    Rod West

  • How to set the value of QUERY using PL/SQL process?


    I use APEX 4.2...
    How to set the value of the REQUEST using process of PL/SQL which lies before the header - where the value of the REQUEST should appear on the URL?

    Kind regards

    You cannot set a value of demand in a PL/SQL block. You can run a PL/SQL block on a request which is the id of a button for example.

    Denes Kubicek

  • How to set default cell format 'text' instead of 'general' sheet in excel using pl/sql code?

    Can someone please help me on how to generate excel file using pl/sql? I have generated csv files successfully, but now I need to generate a excel. I changed the code generation of the csv file, but the file gives me error when opening:

    "The file you are trying to open,"XXXX.xls", is in a different format than specified by the file extension. Do you want to open it now? »

    If I choose Yes then open the excel file, but it excludes the leading 0 in the front for one my column. How do I configure excel type default column as text rather than General, when you create the files? I also tried to generate excel file using xml. But I do not know how to set the type of column there, too. I'm using Oracle and APEX I'll call all these codes apex.

    Code1 is used:


    output_header varchar2 (4000);

    fichier_en_sortie VARCHAR2 (255);

    Varchar2 (2) EOL: = Chr (13) | Chr (10);


    output_header: = 'tls_tracking_id ' | Chr (9) | ' fnn_ext' | Chr (9) | "path_id' | EOL;

    fichier_en_sortie: = 'report_excel' |'. XLS;

    owa_util.mime_header ("application/octet ', false");

    HTP.p ('Content-Disposition: attachment; filename = "" | ") fichier_en_sortie |' « ') ;


    HTP. PRN (output_header);

    for r in)

    Select tls_tracking_id, fnn_ext, DWD_DTOV_OUT_VW path_id

    where nbn_loc_id = 'LOC000138413115. '

    The order of tls_tracking_id LOOP)

    HTP. PRN (r.tls_tracking_id

    || Chr (9) | r.fnn_ext

    || Chr (9) | r.path_id

    || EOL




    Code2 used :

    create or replace PACKAGE BODY IS pkg_excel_export

    PROCEDURE excel_open (l_xml_body IN OUT NOCOPY CLOB) IS


    l_xml_body: = ' <? XML version = "1.0" encoding = "ISO-8859-9"? > ' | Chr (10) |

    "< workbook xmlns =" "urn: schemas-microsoft - com:office:spreadsheet" ' | "

    Chr (10) |

    ""xmlns:o ="urn: schemas-microsoft-com ' ' |

    Chr (10) |

    "xmlns: x =" "urn: schemas-microsoft-com: excel" ' | "

    Chr (10) |

    ""xmlns:ss ="urn: schemas-microsoft - com:office:spreadsheet" ' |

    Chr (10) |

                            'xmlns:html=" ">' ||

    Chr (10) |

    ' < ExcelWorkbook xmlns = "urn: schemas-microsoft-com: excel" > ' |

    Chr (10) | ' < WindowHeight > 8580 < / WindowHeight > ' |

    Chr (10) | ' < WindowWidth > 15180 < / WindowWidth > ' | Chr (10) |

    ' < WindowTopX > 120 < / WindowTopX > ' | Chr (10) |

    ' < WindowTopY > 45 < / WindowTopY > ' | Chr (10) |

    ' < ProtectStructure > false < / ProtectStructure > ' | Chr (10) |

    ' < ProtectWindows > false < / ProtectWindows > ' | Chr (10) |

    ' < / ExcelWorkbook > ' | Chr (10) | "< Styles > | Chr (10) |

    '< ss:ID of style = 'Default' ss:Name 'Normal' = >' | Chr (10) |

    "< ss:Vertical alignment = 'Bottom' / >" | " Chr (10) |

    ' < borders / > '. Chr (10) | ' < police / > '. Chr (10) |

    ' < Interior / > '. Chr (10) | ' < NumberFormat / > '. Chr (10) |

    ' < protection / > '. Chr (10) | "< / style > | Chr (10) |

    '< ss:ID of style 's22' = >' | Chr (10) |

    "< x: font family = ss"Swiss":"BOLD"="1"ss:Underline ="Single"/ >" | "

    Chr (10) | "< / style > | Chr (10) | "< / style >";

    END excel_open;

    PROCEDURE excel_close (l_xml_body IN OUT NOCOPY CLOB) IS


    l_xml_body: = l_xml_body | ' < / workbook > ';

    END excel_close;

    / * Opens a worksheet in the Excel file. , You can open multiple worksheets. **/

    PROCEDURE worksheet_open


    l_xml_body IN OUT NOCOPY CLOB,

    p_worksheetname in VARCHAR2

    ) IS



    -Create the worksheet


    l_xml_body: = l_xml_body | "' < worksheet ss:Name = ' ' | p_worksheetname |

    "" > < table > ";"

    END worksheet_open;

    / *Farm the worksheet in the Excel file.   **/

    PROCEDURE worksheet_close (l_xml_body IN OUT NOCOPY CLOB) IS


    l_xml_body: = l_xml_body | ' < / table > < / worksheet > ';

    END worksheet_close;

    / *Opens the tag line * /

    PROCEDURE row_open (l_xml_body IN OUT NOCOPY CLOB) IS


    l_xml_body: = l_xml_body | "< row >."

    END row_open;

    / *Farm the tag line * /.

    PROCEDURE row_close (l_xml_body IN OUT NOCOPY CLOB) IS


    l_xml_body: = l_xml_body | "< / row > | Chr (10);

    END row_close;

    / *After the opening of the line, we can write something the first cell* /

    PROCEDURE cell_write


    l_xml_body IN OUT NOCOPY CLOB,

    p_content in VARCHAR2

    ) IS


    l_xml_body: = l_xml_body | ' < cell > < data ss:Type = "String" > ' |

    p_content | ' < / data > < / cell > ';

    END cell_write;

    / * If you use this package of APEX, you get to download the excel file. **/

    PROCEDURE excel_get


    l_xml_body IN OUT NOCOPY CLOB,

    p_filename in VARCHAR2

    ) IS

    XX BLOB;

    make the NUMBER;

    This NUMBER;



    w NUMBER;



    make: = 1;

    so: = 1;

    BC: = dbms_lob.default_csid;

    LC: = dbms_lob.default_lang_ctx;

    w: = dbms_lob.no_warning;

    DBMS_LOB.converttoblob (xx,





    British Colombia,



    owa_util.mime_header ("application/octet ', FALSE");

    -set the size so that the browser knows how to download

    HTP.p ("Content-length: ' |") DBMS_LOB.GetLength (xx));

    -the name of the file will be used by the browser if users only one save as

    HTP.p ('Content-Disposition: attachment; filename = "" | ") p_filename |

    '.xls ' | '"');

    -close the headers


    -Download the BLOB

    wpg_docload.download_file (XX);

    END excel_get;

    END pkg_excel_export;

    I know it's a bit long code, but to better understand please consider...

    Thank you.

    I did worked putting just one extra line in my l_xml_body in the XML (Code 2 used). Now my excel generates with cells type 'Text' and there are no left falling to zero. Also the columns display not scientific format as 2.3D + 12. Current recording shows without default formatting.


  • How to set the attribute in the request of adf defalut search form

    I use the default search engine in Jdeveloper with Table query.

    I followed this blog to replace the query by default:

    Question is how to set the value of an attribute in the request. The user will add what ever he wants those who are caught queryEvent I want to add to the value of an attribute that is not displayed to the user and the search engine and it is necessary for the application to run correctly.


    If you went on the blog that I posted, you could get the ViewCriteriaRow of the queryEvent and then you can add the attribute that you want to the ViewCriteriaRow, and then run the query accordingly.


  • Planning of a concurrent request and by recalculating setting each Run


    A regular competitor request can be addressed to re - run a function every time it is run?

    We want to schedule a concurrent request seeded with a custom query set. Overall demand, we want to default the setting to create a string of file name, like this,

    SELECT "/ path/some directory file name_" | TO_CHAR (SYSDATE - 1, 'YYYYMMDD') | ".dat" TO double.

    It works fine the first time's term, but then the file name string gets hard coded in each subsequent meeting and shall remain the same for every day.

    I tried the option for setting date of increment in the Scheduler, but it does not work because this isn't a date parameter.

    I created a database function to create the string of file name and default setting like that.

    Select applications. XX_DATAFILE_NAME double.

    Again, this works the first time, but then the file name becomes hard coded in each subsequent session and remains the same for every day.

    The Planner, please recalculate the parameter each time that it executes the query?

    Thank you

    I don't know if you can force it to recalculate. However, if you can't you can create your own PL/SQL concurrent request that determines the path, then made a FND_Request.submit_request that calls the program seeded and passes in the calculated parameter.


  • How to set options to generate as Postgresql SQL Analytics

    Q: I need to know how to set options in web analytics or the driver BI so that web analytics will be limited to the Postgresql type commands.

    Environment: Web analytical running in Windows Exporer. Driver of BI of Oracle running on Windows XP. Tunneling via PuTTY on our own server non-Oracle database.

    I heard that somewhere in Oracle BI there is the possibility to activate and disable several features SQL so that Oracle users can capture their SQL generating tools (such as web analytics) to match other DB standards.

    Can someone tell me if this is true? If Yes, where can I access these options?


    I'm sorry if I could not you, but I understand that you would like to BI Server to build queries depending on the your DB traits.

    If this is the case, you can then follow the steps below

    1. open .rpd

    2. navigate to the physical layer

    3. among the different databases, choose the one you want to resolve.

    4. right click, choose Properties-> features.

    5. here, you can see a number of features of DB that you could try to turn it OFF / ON.

    6. you can also perform a DBMS for "query" that will interview your DB.

    Hope this is what you are looking for.

    Thank you

  • How to set the default print orientation in oracle reports 6i

    Can someone help please how to set the orientation of the printing default reports Oracle 6i? Currently the document is printed in Portrait orientation, but I need to print in landscape orientation. Is this possible?

    It is now resolved. Go to page-> main Section layout model, press F4. In the palette property, select the Orientation that should be selected when printing is taken for this report.

  • How to set schema running information in Oracle forms


    Please tell me, how to set schema running information in Oracle forms.

    Thank you and best regards,

    What exactly do you want? Your question is not very clear.


Maybe you are looking for