FORALL and EXCEPTION

Hello Everyone,
I have gone through the document also.
I am using dblink to get data in to table FORALL,
sometimes the database connection is lost from dblink. , i want to stop the process. and exit the loop, i am handeling the error. it raised three errors
ORA-02068
ORA-02063
ORA-02048
i read the desciption of the error, i am not sure which one is the correct to hadle. I want to handle this as special error in exception, how can i hadle this excepton.
i looks like that once the db connection is lost forall stops execution. is that correct? please correct if if i am wrong.
Please help me.
thank you in advance

You will want to map these exceptions using PRAGMA EXCEPTION_INIT and capture them as a user defined exception. You will find an example of doing this here:
http://www.psoug.org/reference/exception_handling.html

Similar Messages

  • Hi, my MacBook Pro cannot open Safari. nexpectedly while using the librooksbas.dylib plug-in" the report details the exception code as 'EXC_BAD_ACCESS (SIGSEGV)' and exception codes as: 'KERN_INVALID_ADDRESS at 0x0000000920

    Hi, my MacBook Pro cannot open Safari. It crashes and gives the message, ' Safari quit unexpectedly while using the librooksbas.dylib plug-in" the report details the exception code as 'EXC_BAD_ACCESS (SIGSEGV)' and exception codes as: 'KERN_INVALID_ADDRESS at 0x0000000920

    Remove "Rapport" by following the instructions on this page.
    Back up all data before making any changes.

  • How to use the validations and exceptions  in BPEL

    Hi,
    How to use the validations and exceptions in BPEL.
    pls provide one sample example to give the exceptions and validations in BPEL

    Hi,
    For example you can create a simple BPEL Process and you can throw an error during running process. If input data is not valid and format is not correct you can throw error using throw activity and using catch activity you can catch particular error. The catch-all will handle all the error occurred with the scope.
    you can also refer faulthandling section in the link for more information related to exception handling.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/faults.htm#sthref1188
    Regards,
    Deepa

  • Error in checking FORALL and FOR performance in PL/SQL.!

    I am using FORALL and FOR construct' comparison in term of times taken by them(performance).
    This is whats my problem:
    SQL> SET SERVEROUTPUT ON;
    SQL> CREATE TABLE T1(C1 VARCHAR2(100));
    Table created.
    SQL> declare
    2 t1 number;
    3 t2 number;
    4 t3 number;
    5 begin
    6 for i in 1..10
    7 loop
    8 t1:=dbms_utility.get_time;
    9 insert into t1 values('RAVIKANTH');
    10 end loop;
    11 t2:=dbms_utility.get_time;
    12 forall i in 1..10
    13 insert into t1 values('RAVIKANTH');
    14 t3:=dbms_utility.get_time;
    15 dbms_output.put_line('Time taken for FOR'||TO_CHAR((t2-t1)/100));
    16 dbms_output.put_line('Time taken for FORALL'||TO_CHAR((t3-t1)/100));
    17 end;
    18 /
    declare
    ERROR at line 1:
    ORA-06550: line 13, column 1:
    PLS-00435: DML statement without BULK In-BIND cannot be used inside FORALL
    ... dear friends, please help me out in resolving this.
    Thanks in advance,
    Ravikanth K.

    Forall works with sets of data, like index-by tables. Here's an example:
    declare
       t1 number;
       t2 number;
       t3 number;
       type r_tt is table of t%rowtype
          index by binary_integer;
       tt r_tt;
    begin
       for i in 1..10
       loop
          t1:=dbms_utility.get_time; -- <----- this one should be outside the loop
          insert into t values('RAVIKANTH');
       end loop;
       t2:=dbms_utility.get_time;
       -- Load the index-by Table
       for i in 1..10
       loop
          tt (i).c1  := 'RAVIKANTH';
       end loop;
       -- Use this index-by Table to perform the Bulk Operation
       forall i in 1..10
          insert into t values tt (i);
       t3:=dbms_utility.get_time;
       dbms_output.put_line('Time taken for FOR'||TO_CHAR((t2-t1)/100));
       dbms_output.put_line('Time taken for FORALL'||TO_CHAR((t3-t1)/100));
    end;You probably won't see much difference in elapsed time. You testing a single insert again a bulk operation.
    btw: You have a local variable with the same name as your table

  • Web service hangs without any errors and exceptions

    hi all,
    We have a ejb application web service that is binded with shedular bc to trigger for every 2 hours
    and it runs for one and half hours making continous transactions with database..
    In the web service a outer for loop will be iterated by fetching list of data from database. And this list will be iterated in the inner for loop.
    This logic works fine for sometime, but suddenly after some random period of time without any errors and exceptions the outer for loop gets no list from database
    and the inner for loop is never executed and the web service completes processing.
    This i can able to see form my log files.
    i dont understand why the list is not fetched from the database, is the problem with hibernate or it lost the connection with database,
    either case it has to throw exception but the service is not.
    otherwise does this is garbage collector issue.
    Thanks in advance,
    Bye

    Without any code to see what's going on we'd be flying blind trying to answer this one.

  • Constant Selections and Exception Aggregation

    Hi,
    Can You please tell me
    1) what is constant selections?
    2) what is Exception Aggregations?
    Thanks and Regards.
    Naresh.

    Hi,
    example for the use of standard aggregation and exception aggregation for a key figure is a key figure for the non-cumulative value
    with non-cumulative values such as warehouse stock, you want to total up the warehouse stock for various articles and warehouses (standard aggregation), but for the month you want to determine the ending inventory (LAST aggregation) (exception aggregation in regard to the time characteristic Calendar Month)
    for more info go through the below link
    http://help.sap.com/saphelp_nw04/helpdata/EN/d2/e0173f5ff48443e10000000a114084/content.htm
    For constant selection go through the belwo link
    http://help.sap.com/saphelp_nw70/helpdata/EN/46/91f0f090ea13e8e10000000a155369/content.htm
    Regards,
    Marasa.

  • Client/server RMI app using Command pattern: return values and exceptions

    I'm developing a client/server java app via RMI. Actually I'm using the cajo framework overtop RMI (any cajo devs/users here?). Anyways, there is a lot of functionality the server needs to expose, all of which is split and encapsulated in manager-type classes that the server has access to. I get the feeling though that bad things will happen to me in my sleep if I just expose instances of the managers, and I really don't like the idea of writing 24682763845 methods that the server needs to individually expose, so instead I'm using the Command pattern (writing 24682763845 individual MyCommand classes is only slightly better). I haven't used the command pattern since school, so maybe I'm missing something, but I'm finding it to be messy. Here's the setup: I've got a public abstract Command which holds information about which user is attempting to execute the command, and when, and lots of public MyCommands extending Command, each with a mandatory execute() method which does the actual dirty work of talking to the model-functionality managers. The server has a command invoker executeCommand(Command cmd) which checks the authenticity of the user prior to executing the command.
    What I'm interested in is return values and exceptions. I'm not sure if these things really fit in with a true command pattern in general, but it sure would be nice to have return values and exceptions, even if only for the sake of error detection.
    First, return values. I'd like each Command to return a result, even if it's just boolean true if nothing went wrong, so in my Command class I have a private Object result with a protected setter, public getter. The idea is, in the execute() method, after doing what needs to be done, setResult(someResult) is called. The invoker on the server, after running acommand.execute() eventually returns acommand.getResult(), which of course is casted by the client into whatever it should be. I don't see a way to do this using generics though, because I don't see a way to have the invoker's return value as anything other than Object. Suggestions? All this means is, if the client were sending a GetUserCommand cmd I'd have to cast like User user = (User)server.executeCommand(cmd), or sending an AssignWidgetToGroup cmd I'd have to cast like Boolean result = (Boolean)server.executeCommand(cmd). I guess that's not too bad, but can this be done better?
    Second, exceptions. I can have the Command's execute() method throw Exception, and the server's invoker method can in turn throw that Exception. Problem is, with a try/catch on the client side, using RMI (or is this just a product of cajo?) ensures that any exception thrown by a remote method will come back as a java.lang.reflect.InvocationTargetException. So for example, if in MyCommand.execute() I throw new MySpecialException, the server's command invoker method will in turn throw the same exception, however the try/catch on the client side will catch InvocationTargetException e. If I do e.getCause().printStackTrace(), THERE be my precious MySpecialException. But how do I catch it? Can it be caught? Nested try/catch won't work, because I can't re-throw the cause of the original exception. For now, instead of throwing exceptions the server is simply returning null if things don't go as planned, meaning on the client side I would do something like if ((result = server.executeCommand(cmd)) == null) { /* deal with it */ } else { /* process result, continue normally */ }.
    So using the command pattern, although doing neat things for me like centralizing access to the server via one command-invoking method which avoids exposing a billion others, and making it easy to log who's running what and when, causes me null-checks, casting, and no obvious way of error-catching. I'd be grateful if anyone can share their thoughts/experiences on what I'm trying to do. I'll post some of my code tomorrow to give things more tangible perspective.

    First of all, thanks for taking the time to read, I know it's long.
    Secondly, pardon me, but I don't see how you've understood that I wasn't going to or didn't want to use exceptions, considering half my post is regarding how I can use exceptions in my situation. My love for exception handling transcends time and space, I assure you, that's why I made this thread.
    Also, you've essentially told me "use exceptions", "use exceptions", and "you can't really use exceptions". Having a nested try/catch anytime I want to catch the real exception does indeed sound terribly weak. Just so I'm on the same page though, how can I catch an exception, and throw the cause?
    try {
    catch (Exception e) {
         Throwable t = e.getCause();
         // now what?
    }Actually, nested try/catches everywhere is not happening, which means I'm probably going to ditch cajo unless there's some way to really throw the proper exception. I must say however that cajo has done everything I've needed up until now.
    Anyways, what I'd like to know is...what's really The Right Way (tm) of putting together this kind of client/server app? I've been thinking that perhaps RMI is not the way to go, and I'm wondering if I should be looking into more of a cross-language RPC solution. I definitely do want to neatly decouple the client from server, and the command pattern did seem to do that, but maybe it's not the best solution.
    Thanks again for your response, ejp, and as always any comments and/or suggestions would be greatly appreciated.

  • FORALL and FOR when to use

    Hi,
    I am just confusing..what is the difference between FORALL and FOR.

    Why it works?
    declare
    var1 varchar2(500);
    type varray_type is table of varchar2(50);
    v_varray varray_type;
    begin
    v_varray := varray_type('smith', 'king', 'jones');
    for i in 1 .. 3 loop
    var1 := var1 || ',' || v_varray(i);
    end loop;
    dbms_output.put_line(var1);
    end;
    OUTPUT: ,smith,king,jones
    And why it is not..
    declare
    var1 varchar2(500);
    type varray_type is table of varchar2(50);
    v_varray varray_type;
    begin
    v_varray := varray_type('smith', 'king', 'jones');
    forall i in varray.first .. varray.last
    var1 := var1 || ',' || v_varray(i);
    end loop;
    dbms_output.put_line(var1);
    end;
    I am still confusing..can't we assign values to variable in FORALL?
    please suggest me.

  • Runtimr error OBJECTS_OBJREF_NOT_ASSIGNED and Exception  CX_SY_REF_IS_INITI

    Hi All
    when I schedule any BDC pgm in Background by giving job name in SM36 .
    It is giving an runtimr error OBJECTS_OBJREF_NOT_ASSIGNED and Exception  CX_SY_REF_IS_INITIAL .
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
         caught in
        procedure "C14T_LISTTOOL_CALL_ALV_GRID" "(FUNCTION)", nor was it propagated by
         a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        You attempted to use a 'NULL' object reference (points to 'nothing')
        access a component (variable: "GRID1").
        An object reference must point to an object (an instance of a class)
        before it can be used to access components.
        Either the reference was never set or it was set to 'NULL' using the
        CLEAR statement.
    But it is working fine when i running with options 'N' & 'A' in call transaction. when i execute  I'm searching for sap note but not able to find it,
    If any one can solve this issue please ... its very urgent requirement
    Thanks in Advance

    I believe the better forum to post yorr query to, will be [ABAP, General|ABAP Development;.
    From the header of that forum:
    General questions about the ABAP language and language implementations.
    This is not a forum for application specific questions. Web Dynpro , BSP , CRM
    development, ... have their own forums.
    - Ludek

  • Creating Fault Handling and Exception in Oracle BPEL

    I am following BPELtutorial-Orderbooking.pdf and have successfully reached chapter 6 i.e. Creating Fault Handling and Exception in Oracle BPEL. Everything went fine except this one... i.e. after implementing the Fault Handling and Exception in Oracle BPEL when I execute my process and enter CustId that begins with 0.... the invokeCR generates error message as follows as expected:
    <NegativeCredit xmlns="http://services.otn.com">
    <part name="payload">
    <error xmlns="http://services.otn.com">Bankruptcy Report</error>
    </part>
    </NegativeCredit>
    However, the execution proceeds ahead instead of terminating. The tutorial states that the BPEL process should terminate as the SSN is invalid, can anyone please tell me whats going wrong.. ?

    Well not exactly.... but when click on the 'Audit' sheet under BPEL Console for this instance, I can see the following:
    invokeCR (faulted)
    [2006/03/20 10:35:07] "{http://services.otn.com}NegativeCredit" has been thrown. less
    <NegativeCredit xmlns="http://services.otn.com">
    <part name="payload">
    <error xmlns="http://services.otn.com">Bankruptcy Report</error>
    </part>
    </NegativeCredit>
    The above is exactly what the tutorial states will be the output, so I presumed that the exception must have fired !

  • How do I enable cookies in 3.6.6? Privacy menu in Tools - Options do not have Remember History and Enable Cookies and Exception button. Again, verison is 3.6.6.

    How do I enable cookies in 3.6.6? Privacy menu in Tools - Options do not have Remember History and Enable Cookies and Exception button. Again, verison is 3.6.6.

    To see all the History and Cookie options, select: Tools > Options > Privacy > History: Firefox will: "Use custom settings for history"
    See [[Options window - Privacy panel]] and [[Cookies]]

  • Runtime Error and Exceptions

    Hi,
    Could you please tell me "What is difference between  Runtime Error and Exceptions"
    Thanks & Regards,
    Krushna Biswal

    If you would like to handle and navigate based on the exception type, this code would help you. btw I'm not familiar with portlet though.
    http://sourceforge.net/projects/optionzero
    http://sourceforge.net/forum/forum.php?forum_id=666191
    You can declare exception type and navigation in faces-config.xml in declarative manner like Struts global exception notion.
    Please let me know it's useful or not.
    thanks,

  • Difference Between Errors and Exception?

    I want to know what is the difference between Error and Exception?

    Everything is sadly enough catchable as Throwable but
    you should never catch Errors. They are an indication
    that something has gone wrong in the JVM and they are
    not recoverable.Although it is clear that Sun recommends against catching Errors (".. indicates
    serious problems that a reasonable application should not try to catch.. etc.."), sometimes, it makes sense to catch some type of Errors.
    There was that Java editor (I forgot the name) which would catch OutOfMemoryErrors when the user would try to open a file that was too large.
    So instead of crashing, the application would recover from the Error, and I personnally thought that was an interesting feature. At least, a better alternative than the whole application failing.

  • Difference between Error and Exception

    Can anyone tell me the difference between error and exception
    Thanz

    Errors and Exceptions, in a Nutshell
    Errors and exceptions both inherit from Throwable, but they differ in these ways:
    Exceptions
    Can be checked or unchecked
    Indicate an error caused by the programmer
    Should be handled at the application level
    Errors
    Are always unchecked
    Usually indicate a system error or a problem with a low-level resource
    Should be handled at the system level, if possible
    pretty much exceptions cause abnormal flow of the program, errors stop it, least thats my idea, it can get pretty complicated, below is a really good link for htat, also, Google it.
    http://www.fawcette.com/javapro/2002_09/online/errors_jstreet_09_13_02/
    really good site
    -brian

  • Workload Analysis and Exception Analysys   Overview data n/a

    Hello,
    About Root cause analysis.
    In Workload Analysis and Exception Analysys, the KPI data, in right pane of overview tab,
    is always n/a.
    In the other tab, e.g.  ABAP and Java instance tab, the data is diplayed.
    So I think data could be properly stored in BI.
    Please give me some advice what setup is missing.
    Regards

    SAPNote1032461

Maybe you are looking for