Sqlloader return code for unix..

Hi sir,
i need to know the sqlloader load successfully or not,
i have check this link http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_params.htm#i1005781
but this not help me much because,when its has error like unique constraint or its not full fill when clause then its returning '2' which is EX_WARN for unix,i only want thoose which have error like unique constraint ,how i know there is error
please help me

Try out this shell script..
#! /usr/bin/sh
sqlldr / control=/home/temp/prod.ctl log=/home/temp/prod.log BAD=/home/temp/prod.bad DISCARD=/home/temp/prod.dsc SILENT=HEADER DIRECT=TRUE PARALLEL=TRUE
RC2=${?}
if [ ${RC2} -ne 0 ]
then
  echo " \n \
    Return code = ${RC2}, sql loader failed for the table $TABLE_NAME \n \n \
    Data file   : /home/temp/prod.dat       \n \
    Control file: /home/temp/prod.ctl       \n \
    Log file    : /home/temp/prod.log       \n \
    Bad file    : /home/temp/prod.bad       \n \
    Discard file: /home/temp/prod.dsc "
else
  echo " \n \
    File loaded successfully            \n \
    Data file   : /home/temp/prod.dat   \n \
    Control file: /home/temp/prod.ctl   \n \
    Log file    : /home/temp/prod.log"
fiLet me know if this is what you expect.
Good luck!!!
Bhagat
null

Similar Messages

  • Choosing the Return code for a scenario

    Hi,
    I execute an ODI scenario "AAA" from Unix with the command startscen.sh
    Can I control the return code of called screnario?
    IN the scenario "AAA" (=package) i have different path with ko/ok. I would like to choose a specific return code for each ko path. Is it possible ?
    Thank you very much.
    Best regards,

    How you creating this file? Why you couldn't create without enter?
    But, however, see solution in that case:
    File 1.sql:
    select 1 from dual;File 2.sql:
    select 2/0 from dual;File 3.sql:
    select 3 from dual;File exec_sql.sql:
    WHENEVER SQLERROR EXIT
    @&1
    @&2
    @&3And you need to generate file as this "test.sql":
    define f1 = 1.sql
    define f2 = 2.sql
    define f3 = 3.sql
    @exec_sql &f1 &f2 &f3Regards,
    Malakshinov Sayan

  • Transaction code to find return code for transport request

    Hi,
    I want to see  the return code for transport requests after importing to QAS from DEV. What is the transaction code to find return code and can you explain in brief.
    Thx,
    Vasu

    you can check it out in STMS
    wht you can do is ,,
    Run Tcode STMS > Overview imports (F5) > you will find all import queues > then click on the import queue in which u want to see the status of transport (DEV , QAS , PRD )
    > then find out the transport no > click on that > then click on logs or press ( ctrl + f4)
    Return code
    Meaning
    0000
    Transport performed without errors
    0004
    Warnings were issued. All objects were transported successfully. There were special actions for individual objects that may not have been intentional, for example, a warning is issued during the export if the request contains an object deletion.
    Read the warnings.
    0008
    Individual objects could not be transported successfully. You must analyze and correct the errors. Examples of import errors: Original object was not overwritten, Repaired object was not overwritten
    0012 or higher
    A critical error has occurred, probably not caused by the contents of the request. You must inform your system administrator.
    http://help.sap.com/saphelp_nw70/helpdata/en/57/38e26c4eb711d182bf0000e829fbfe/content.htm
    Hope this information will help you ,,
    Cheers
    dEE

  • Error handling return code for Provide Statement

    Hi Experts,
    For select statement we have error handling return code sy-subrc.
    What is the error handling return code for provide.. end provide statement.
    Thanks,
    Ragu

    Ragu,
    Same thing.
    Check sy-subrc.
    sy-subrc is the return code for all ABAP statements as far as I know.
    Regards,
    Dilek

  • Return code  For DataStore objects and InfoObjectsb

    Hello Gurus,
           For DataStore objects and InfoObjects: you cannot use the
    return code in the routine for data fields that are updated by being
    overwritten.
           as per above statement, why ?
    Many thanks,
    Frank Zhang

    How you creating this file? Why you couldn't create without enter?
    But, however, see solution in that case:
    File 1.sql:
    select 1 from dual;File 2.sql:
    select 2/0 from dual;File 3.sql:
    select 3 from dual;File exec_sql.sql:
    WHENEVER SQLERROR EXIT
    @&1
    @&2
    @&3And you need to generate file as this "test.sql":
    define f1 = 1.sql
    define f2 = 2.sql
    define f3 = 3.sql
    @exec_sql &f1 &f2 &f3Regards,
    Malakshinov Sayan

  • Return Code for scenario execution

    When we execute an interface,package or scenario.
    We can go in execution tab and see the start time , end time and Return code which has values like 0,7000,1722,1777 etc.
    This value is fetched from odi system table :-snp_sess_task_log.
    This table contains the log status for an execution . it contains start time, end time ,status code and all.
    My problem is that i want to know which table stores the status code that table snp_sess_task_log picks from.
    I mean is there any master table containing all the error codes/status codes that can occur in a scenario execution?

    I mean is there any master table containing all the
    error codes/status codes that can occur in a scenario
    execution?The code and the message come from the RDBMS...
    But they are stocked on a table after raising.
    Try this on your work rep connexion:
    SELECT *
    FROM SNP_STEP_LOG L, SNP_SESS_STEP SS,SNP_SESSION S,SNP_EXP_TXT X
    WHERE
    L.SESS_NO = SS.SESS_NO AND
    L.NNO = SS.NNO AND
    S.SESS_NO = L.SESS_NO AND
    STEP_STATUS = 'E' AND
    L.I_TXT_STEP_MESS=X.I_TXT

  • Return code for dynamic client by-pass

    hi,
    i wonder if 302 ( move temporaily) for return code in dynamic client by-pass. but it said 200 in the Cisco web page, why?
    thanks
    difei

    hi,
    my question is what's the return code from CE if the client ip addr. authentication failed? in cisco web page, it said 200. i guess it be 302, redirect to the original server.
    difei

  • Throws Exception in main and return code for JVM

    Hello,
    Could someone tell me what the following statement :
    public class Foo {
    public static void main(java.lang.String[] args) throws Exception {
    // Some source code
    is supposed to do with the return code of the VM when the Exception is thrown.
    I mean what num�ric value is supposed to return the following instruction :
    java -classpath ... com.app.Foo
    Because my Java program is run in a script shell which is supposed to get a return code which as to be interpreted.
    Off course I am not allowed to do the test myself because this script shell is executed on a production server ...

    I don't know what the return code will be, but you could do this:
    public static void main(String[] args)
      try
        // ...Run the program here...
      catch (Exception e)
        // Print the stack trace
        e.printStackTrace();
        // Exit with an error code
        System.exit(10);
    }Jesper

  • Getting Return Code for cl_gui_frontend_services= execute

    Hey,
    im using the static method cl_gui_frontend_services=>execute  to start a program locally. The program is openens synchronously and i need to get the return code of the program. I mean not the one from the method-call but from the external tool on OS-level.
    Is there a way to get that one ?
    Thanks and regards,
    oliver

    well seems there is no way...solved it now over a result-file which is get written by the called tool and later read by sap.

  • Return Code to UNIX from Procedure Package

    I've found examples where a 1-byte RC can be picked up by a UNIX shell script (in $?) but they involve a PL/SQL block and bind variable in the script itself. It appears I cannot use a bind variable in a Package because the compile fails (PLS-00049: bad bind variable). UNIX does find a RC value when I use RAISE_APPLICATION_ERROR( (-20000-744) - v_rc_255, 'Abnormal Termination.' ); where v_rc_255 is a PLS_INTEGER with value 255, but the value is not 255! Sometimes it is zero, other times 7.
    Is there a practical way I can signal "Abnormal Termination" from any PL/SQL Package's Procedures/Functions to UNIX so I can send my shell script down the appropriate path?

    I believe that the only way to do what you propose is to use bind variables in your script. This is not necessarily a problem, however. Note that in UNIX, you must insure that the return value is between 0 and 255 (since there is only 1 byte of storage for return variables).
    Consider the following simple example:
    create a simple test procedure (or package, or function) which can raise a user-defined error:
    SQL> create or replace procedure test(inval IN number) is
    2 begin
    3 if inval = 0 then return;
    4 else raise_application_error(-20102,'My error');
    5 end if;
    6 end test;
    7 /
    Note that RAISE_APPLICATION_ERROR must return a value between -20000 and -20999
    In your shell script, create a bind variable and wrap your call to the procedure in a PL/SQL block with an exception handler. For example, I have created a shell script called mytest.sh:
    #!/bin/ksh
    sqlplus -s <<-EOF
    scott/tiger
    var retvar number;
    begin
    test($1);
    :retvar := 0;
    exception
    when others then
    :retvar := ABS(sqlcode) - 20000;
    end;
    exit :retvar
    EOF
    retval=$?
    echo retval=$retval
    From a UNIX shell prompt, execute the script with an argument of 0; a value of 0 is returned (normal completion)
    Execute the script with any other value and a value of 102 is returned (note that we had to perform a calculation on sqlcode to insure that the value was between 0 and 255).
    Hopefully this makes sense.

  • C API WISH LIST: New info API or return code for txn- commit()

    One problem I have to solve now is that I cannot txn->commit(txn) if there are
    open cursors using that txn. The limitation itself is ok, but I need to know this
    prior to calling commit, or have commit return a suitable error code.
    What happens now if I call commit prior to closing all cursors using it, is that
    it returns the error code -30975 (DB_RUNRECOVERY: Fatal error, run
    database recovery). Then the db is left in an abysmal state for the user.
    All this is happening within a BDB BASIC interpreter where I can't predict
    the user program's cursor usage.
    The only solution for me at the moment is to track each cursor creation
    on the current transaction within the interpreter, and try to preempt this
    problem.
    WISH LIST: It would be nice to either:
    1. have txn->commit() return a more suitable error, without
    corrupting the db (check for this problem first).
    or
    2. have a way to determine how many open cursors there are
    on this txn, so that I can report the failure back to
    the caller.
    Approach #1 is preferable, since api for #2 has limited use. But # 2
    could be provided as part of DB_ENV->txn_stat(), which currently
    lacks this info.
    Thanks, Warren.

    Oh, that does help. The only worry I have is that this appears to be undocumented and could change on the user trying to build my project with a future release. But, I think I'm willing to risk that, at this point.
    Thanks again, Warren.

  • Return code for EXECUTE PROCEDURE (native SQL)

    Hi Experts,
    I've seen in the Note 364707 that the field %_ERRCODE is no longer supported since WAS 6.10 for stored procedures like this:
    EXEC SQL.
      EXECUTE PROCEDURE proc [(parameter list)] %_ERRCODE INTO :rc
    ENDEXEC.
    So an Upgrade to WAS 7.00 gives this programms an error.
    Has anybody an idea for an alternative?
    Regards,
    Stefan

    Hello Peluka,
    i have seen you have worked with 'execute procedure'.
    I want to execute a procedure with two Parameters and one structure. Example:
    EXECUTE PROCEDURE test.p_getdata ( in :i_ls_nr , in :vdatum , out :vtest ).
    vtest has the simple structure with field lieferscheinnr (char25).
    When i execute the procedure, i get the error <b>wrong number or types of arguments in call</b>.
    Do you know, whether execute procedure with structures is not possible?
    Thank you in advance.

  • Return Code of sqlldr for failure or success ??

    Hi,
    I would like to know what will be the return code for the sql loader when there is rejection of single record from the data file.
    Can someone please tell me regarding return code of sqlldr so that depending on that i would be able to take some action.
    The other methods which are there to do the same :
    1) To scan the log file and check for rejected keyword
    2) To check weather any bad file is created.
    Any help would be highly appreciated.
    Thanks!!

    Check out this book : Utilities
    http://otn.oracle.com/pls/db92/db92.docindex?remark=homepage
    Joel P�rez

  • Return code 139

    Hi i am executingthe below script in unix:
    sqlplus -s ${SQL_USERID} <<EOF
    whenever sqlerror exit sql.sqlcode
    begin
    UPDATE statement
    end;
    EOF
    rc=$?
    echo $rc
    i am getting the return code as 139.
    What does it mean?
    How to make the query to be successful?
    Thanks

    My wild guess would be:
    ORA-00907: missing right parenthesis
    Whose idea was it to return sql.sqlcode though? The return code of Unix commands is an 8 bit number and can only go up to 255 (i.e. binary 11111111), which is fine for distinguishing between 0 (success) and 1 (failure) etc, after which it wraps around to 0 again. This means your 139 is mod(actual_error_code,256), and my guess is 907:
    $> sqlplus username/pass
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 2 18:59:41 2011
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select (1 from dual;
    select (1 from dual
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    SQL> exit sql.sqlcode
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    $> print $?
    139Just for fun, here are the valid error codes that could give you 139:
    begin
       for r in (
          select rownum as oracle_error
               , mod(rownum,256) as return_code
               , cast(null as varchar2(200)) as message
          from   dual
          connect by rownum <= 20000
       loop
          if r.return_code = 139 then
             r.message := sqlerrm(r.oracle_error * -1);
             if r.message not like 'ORA-%: Message ' || r.oracle_error || ' not found;%' then
                dbms_output.put_line(r.message);
             end if;
          end if;
       end loop;
    end;
    ORA-00139: duplicate attribute
    ORA-00395: online logs for the clone database must be renamed
    ORA-00907: missing right parenthesis
    ORA-01163: SIZE clause indicates  (blocks), but should match header
    ORA-01419: datdts: illegal format code
    ORA-01675: max_commit_propagation_delay inconsistent with other instances
    ORA-01931: cannot grant  to a role
    ORA-02187: invalid quota specification
    ORA-02443: Cannot drop constraint  - nonexistent constraint
    ORA-03211: The segment does not exist or is not in a valid state
    ORA-06027: NETASY: channel close failure
    ORA-06539: target of OPEN must be a query
    ORA-07563: sldext: $PARSE failure
    ORA-08331: Wait operation timed out
    ORA-10635: Invalid segment or tablespace type
    ORA-10891: disable column pruning in ANSI join transformation
    ORA-12171: TNS:could not resolve connect identifier:
    ORA-12427: invalid input value for  parameter
    ORA-12683: encryption/crypto-checksumming: no Diffie-Hellman seed
    ORA-13195: failed to generate maximum tile value
    ORA-13451: GeoRaster metadata scaling function error
    ORA-13707: Either the start snapshot  or the end snapshot  is incomplete or missing key statistics.
    ORA-15243:  is not a valid version number
    ORA-16011: Remote File Server process is in Error state.
    ORA-16267: Cannot instantiate a Logical Standby during a switchover
    ORA-16523: operation requires the client to connect to instance ""
    ORA-16779: the destination parameter of a database is set incorrectly
    ORA-19595: archived log  already included in backup conversation
    ORA-19851: OS error while managing auxiliary databaseBy the same logic, you will notice that ORA-00256, ORA-01024, ORA-01280, ORA-01536 etc return 0, making you think your script succeeded when it actually failed with 'space quota exceeded for tablespace' etc.
    Edited by: William Robertson on Jun 2, 2011 7:13 PM

  • Java.exe return codes - windows

    I have a java application being run from a batch file on WindowsNT4sp6a using Sun's j2se 1.3.0 (build 1.3.0-C) with Java Hotspot (TM) Client VM (build 1.3.0-C, mixed mode) and during the course of running the app (confirmed that it happens at different places in the app by observing logs), the VM simply dies with no exceptions thrown that my java app can catch.
    But, using MS batch environment variable ERRORLEVEL, I observe that the java.exe is returning 3 as the return code. I also have observed that java.exe returns 0 normally.
    Can anyone clue me into where I can find info about what return code 3 is?
    Also, are there any VM log/tracing mechanisms I can turn on to help debug this problem?

    Thank you for your reply.
    But, this is why this is so weird ... I am the programmer (well, maintenace programmer), and the java program is not using System.exit(), therefore, the java.exe should return 0 (zero) when the end of the main() is reached (right?).
    But, it doesn't, it returns 3 ....
    Well, I know the end of the main() is not being reached (because the program is not completing its' task). Plus, all the code is wrapped in try { ... } catch(Exception e) { e.printStackTrace(); } ... and no exceptions!
    Then, I wrapped all that in try { ... } catch(Error err) { System.out.println("caught an error!"); } ... but no dice, whatever is happening, it is out of the control of my java program.
    What could this mean, I am assuming (and correct me if I am wrong) that if I don't call System.exit(3), then it must be the jvm itself returning that code (3) .... and probably due to an internal error ... and I would assume the internal error is in some manner being caused by my code, but if I had a list of possible return codes for this specific jvm implementation and their meanings, then I would have an idea of what to look for in the code.
    I was just hoping someone could point me in the right direction on this forum quickly, but I guess I will have to earn my pay and figure it out the old fashioned way ... work!.
    Just to add:
    My current game plan is to check all the JDBC code, it looks as if not all the Statement and Connection objects are being closed properly before new ones are created (don't ask). It uses the sun.jdbc.odbc.JdbcOdbcDriver and I have heard it can be buggy if you don't properly close those things.

Maybe you are looking for

  • Port 62078 open ( porta 62078 aberta ) - IPhone 3Gs

    Devido à uma invasão recente em minha rede pessoal, resolvi fazer uma busca de todas as falahas de segurança existentes em meu ambiente, e curiosamente encontrei uma unica porta aberta em meu IPhone 3Gs, a porta 62078. Realizei uma busca intensa na i

  • Trying to install ALUI Interaction 6.1 MP2 for Linux

    I was wondering if anyone has any idea about some issues that I have been having trying to install ALUI User Interaction 6.1 MP2 for Linux. Here are the specs that I have: OS: Ubuntu 8.10 Preinstall file run under root: yes Error Message: Preparing t

  • C6 00 compatible with BH-505

    Hi, Is Nokia C6-00 phone compatible with bluetooth headset BH-505. As per the product specification it's compatible with C6-01, I guess it should be compatible but better to be safe. Regards, Kavan Solved! Go to Solution.

  • Where is the "Icon Display Period" attribute stored?

    G'day All, I have a procedure that needs to referenece the "Icon Display Period" attribute for a particular content area (this is normally accessed via the Content Area properties page). Try as I might, I cannot track down the table/column that store

  • Which features work with Adobe 8 and 9 and Office 2003 and not Office 2010?

    Which features work with Adobe 8 and 9 and Office 2003 and won't work with Adobe 8 or 9 with Office 2010?