Finding an errorneous statement in sqlplus

Hi All,
I have a file with set of sql statements in it .
Normally i am running it with sqlplus .
Suppose in run time say second statement is failing ..before i process the next statement is there a way to check whether previous statement was successfull in sqlplus . ??
oracle version : 10g R2 .
Thanks in advance

am_73798 wrote:
i am not looking for WHENEVER SQLERROR SQL* Plus .. I just need to find last statement is successfull and i need to proceed .Use PL/SQL as already suggested. It is a proper language that provides full support for conditional processing and exception handling.
SQL*Plus is a very primitive client with a very sparse command vocabulary and not suited when needing either conditional processing or error management.

Similar Messages

  • How to find the current state in web dynpro

    Hi,
       Can any one tell me how to find the current state of system (idle /not idle).
    Thanks,
    Krishna..

    Please explain further.  I don't understand how you are expecting to test for idle.  If ABAP code is being executed, then you know that the application is not idle. Only a server event could trigger code execution. Only a timedTrigger would be able to tell you that a certain amount of time has passed without activitity - although the event of the timer itself will be a server event that constitutes activity.

  • How could I find the SQL statement who get this message ?

    ORA-01555 caused by SQL statement below (Query Duration=11191 sec, SCN: 0x0854.723b9c32)
    ... How could I find the SQL statement who got this message ?
    Thanks, Paul

    ORA-01555 means that the UNDO/ROLLBACK space is not large enough.
    This occurs because the SELECT statement is attempting to read the UNDO, but the UNDO has been released (transactions have committed or rolled back) and reused.
    The following are SOME of the reasons I have seen this to occur:
    1) Updates in a loop, with commits happening in the same loop
    - this will mark the UNDO available quickly and quickly reuse it. Then when the SELECT wants to rebuild a block, the UNDO used to rebuild the block has been reused (solution, make the UNDO bigger)
    2) A SELECT cursor used to control a loop in which updates are performed, and a 'done' flag is marked against the current cursor record, and commits are performed at the end of each loop, prior to fetching the next record
    - same problem as above, but it hits the current process. Same solution
    3) A 'month end' activity spike occurs, and all sorts of transactions create updates. There is a report that reports the activity - amusingly it needs to start at the beginning of all the work and updates periodically by doing a huge SELECT up front. This is then used to drive a loop which attempts to get information from the various transactions that have been updated and committed. After a while, the SELECT gets an ORA-01555
    - same problem as above and same solution. Get a bigger UNDO segment.
    You say this only happens once a month. That should give a hint.
    I wouldn't bother with which SELECT statement, as much as which APPLICATIONs are being run when it happens.
    One way around this - use 10g and set the guaranteed retention period. All sorts of other things will break, by no more 1555. <g>

  • Where can i find apples mission statement, values and vision on their website?

    where can i find apples mission statement, value and vision on their website?

    Don't know if this helps you get what you wish - http://investor.apple.com/faq.cfm?FaqSetID=6
    Not every company has such things in explicit public statements or records (there is certainly no requirement for such things).

  • Need to find our current time from sqlplus

    I need to find out current time from sqlplus.

    select sysdate from dual;
    Hmmm ... time to hit the manuals?!?!

  • Javascript for finding city and state base on zipcode using an oracle table

    Does anyone know if there is Javascript already written to find city and state based on zipcode?

    Eventually yes. However, you could do it yourself as well. Have a look at my demo (once
    the apex.oracle.com is back) and you can use it to create your own:
    http://htmldb.oracle.com/pls/otn/f?p=31517:9
    http://htmldb.oracle.com/pls/otn/f?p=31517:80
    What you will need is an application process to get the data queried and then
    returned into your items (region).
    Denes Kubicek

  • How to find what sql statement is currently running by scheduler job?

    Hi
    I scheduled a stored procedure to run every 5 minutes using dbms_scheduler.
    The stored procedure internally call serveral other stored procedures.
    The scheduled job is in running state and right now I want to find out what is the sql statement the job executing.
    Is there any sql query to find out what is sql query the schedular job is running?? Please help me.
    Thanks in Advance.

    The previous sql id is null in this case.
    I already quoted as I am running a pl/sql block in my scheduler job.
    begin
    usp_test('praram');
    end;
    I am using the pl/sql block as above in my scheduler job. The USP_TEST inturn calls some other stored procedures and each stored procedure has several inserts and update statements.
    The scheduler job is still running. I know the sid of the running scheduler job.
    I want to know the job is at which stored procedure and at which insert/update statement.
    Please let me know is there any query to fulfil my requirement?
    I greatly appreciate your help
    Thanks

  • How to find that a statement is used in which programs

    Hi Experts,
    Is it possible to find the statement "gi_tline-tdformat = ‘>*’ " is present in which programs?.
    Please reply.Its urgent.TIA
    Regds
    Abhishek

    Another option is SE38->Utilities->Find in source code->enter string into "Find" field -> Programs to Be Included: e.g., 'In Program" select options-> enter Search range (e.g., Z*)->select all.
    Kind Regards

  • Query to find SQL_ID of statement which causes ORA-1555

    Could you please sent a query to find which SQL_ID/sql stament causes ORA-1555 error.
    Hari

    Look in an AWR report spanning the time frame when it occurred. Number of executions may be blank but the elapsed time will be high.
    You can also find part of the statement and then trace it back.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:1480055079538858::::P11_QUESTION_ID:40115659055475

  • Monitor database job-find out current statement and bind values

    Hi all,
    we have a job running on one of our databases which sometimes runs for a very long time.
    Sometimes it it is necessary to kill that job because it is blocking normal work.
    Therefore it is important to find out the current statements the job is processing in order to avoid too much trouble after killing.
    Job processing is a chain of several procedures that insert, update, delete from different tables dependant on initital user input.
    Database is 10203 on solaris 10. Job was created with dbms_job (no em job).
    Is there any way to find out the job's current statement and relevant bind values?
    FJH

    http://www.orafaq.com/wiki/SQL_Trace

  • Can't find the geturl Statement HELP PLEASE

    Ok I've been using for 3 years now flash, and of
    course sometimes I have to modify the work of others. So far when I
    intended to modify the target URL for a button I select the button,
    and modify the getURL statement.
    Then I changed to CS3, and I got a menu I need to change...
    actionscript window is no longer where it used to be, but no
    problem, I just clicked F9 locate the button and see the
    actionscript right? WRONG.
    All I see is the stop() and the gotoAndPlay statements but
    not a single gotoURL in all the AS window. I can't seem to find how
    to locate that instruction or even if there is another way to make
    a button go to a URL without the gotoURL instruction, that i'm sure
    has to be there... any idea how to locate the instruction?
    Any help will be highly appreciated.
    Elliot J. Balanza

    Ok here is how they did it, and i must say it was pretty
    clever.
    they created a layer called hit, and put the button there,
    BUT on the layer hit on the first frame they just put a carriage
    return (in the frame)
    Now when you click on the button, they put the normal stuff,
    on release etc. THEN they hide the hit layer and locked it.
    End result, if you tried to see through AS the code, you just
    saw a carriage return, even when the code was in that same frame
    but on the button instance... further more even in the AS pane, you
    only see a carriage return UNTIL you unlock the layer, make it
    visible, and select the button, other wise you just see the
    carriage return...
    Thanks for your feeback dzedward you are the best.

  • How to find scrollLock key state

    How to find the scrollLock key state in actionacript3.0.
    Like Caps Lock and num Lock on/off state.

    am I right, that you don't want to know, that the KEY-COMMIT or KEY-DELREC or something else is pressed,
    what you want is : which trigger can be used, so that in the trigger-code can be detected, which KEY has fired. And the answer should then be "F10" and not "KEY-COMMIT"
    it that your question ?
    Gerd

  • How to find out resultset,statements and connections are not closed

    Hello,
    In Jdeveloper 10.1.2 how can I find out that in my code,
    I have resultset,statements and connections are not being closed.
    Any help is highly appreciable.
    Thanks

    Hello Vijay,
    On MSSQL truncation of transaction log does not shrink the size of the transaction log. It simply removes the content within the transaction log and writes it to the backup.
    Meaning the free percentage within the transaction log will increase.
    If you want to Resize the transaction log size, you need to do something else.
    The shrinking procedure is given here:
    http://support.microsoft.com/kb/907511
    Regards,
    Siddhesh

  • How to find out Database version from SQLplus ?

    Which command do I have to type in sqlplus in order to get the underlying database version?

    SQL> conn /as sysdba
    Connected.
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
    PL/SQL Release 9.2.0.4.0 - Production
    CORE 9.2.0.3.0 Production
    TNS for IBM/AIX RISC System/6000: Version 9.2.0.4.0 - Production
    NLSRTL Version 9.2.0.4.0 - Production
    SQL> select version from v$instance;
    VERSION
    9.2.0.4.0
    Regards,
    Sabdar Syed.
    null

  • How to find the select statement has written all selected values into text

    Hi,
    I am using form6i. i am selecting a set of values from database tables based upon some user parameters and writing into the text file using Text_io.put_line . In this case how we can make sure that the text fille contains all the data what we are selected from selected statement. somebody told that there might be chances of aborting of data while writing into the text file. is there any way to fild out the selected statements has written all the selected fields and corresponding output into the .txt file.
    Please suggest me.

    somebody told that there might be chances of aborting of data while writing into the text fileWhat kind of "chance" does that somebody refer to?
    If you want to verify if the number of records (lines) in the file matches the number of records from the cursor, you could re-open the written file in read-mode and count the number of lines by reading one by one, then compare the number of lines with the number of records from the cursor.

Maybe you are looking for