RMAN errors sent to shell script calling RMAN sequence?

Hello,
I have a Korn shell script run on Solaris as the root user that launches RMAN sequences similar to this one:
#!/bin/ksh
su - oracle -c "export ORACLE_SID=ORCL; rman target / << !
<rman sequence>
I am wondering if there is a way to catch the RMAN errors in the shell script?
If I call SQLplus instead of RMAN, I can use "whenever sqlerror exit sql.sqlcode" and I will retrieve the error code in the shell script from $? - can I do such a thing with RMAN?
Thank you,
Adrian

You could capture the return code *$?* from your RMAN script and if it returns anything other than 0, then you could grep the RMAN log for errors and/or query
V$RMAN_OUTPUT after the RMAN script executes.

Similar Messages

  • Dbms_scheduler error when running shell script

    I have 2 shell scripts.
    ftp_file_from_apps.sh copies a file from one server to antoher. It receives an input which is the name of the file to be copied.
    scp_file_to_dbs.sh does a secure copy. Copying the file fo anther directory on the same server.
    ftp_file_from_apps.sh
    ~~~~~~~~~~~~~~~~~
    #!/bin/bash
    sftp applprod@<host.domain>:/<source_directory>/$1
    /<destination_directory>/$2
    scp_file_to_dbs.sh
    ~~~~~~~~~~~~~
    scp -r /<source_directory>/$1 <host.domain>:/<destination_directory>/$1
    Both of these scripts works 100% when i run them from os level:
    ftp_file_from_apps.sh xxx.out xxx.pdf
    scp_file_to_dbs.sh xxx.pdf
    the problem is when i run them with dbms_scheduler:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    v_file_name and v_file_name_pdf is varchar2(20) with values assigned.
    begin
    dbms_scheduler.create_job(
    job_name=>'FTP_FILE_FROM_APPS',
    job_type=>'executable',
    job_action=>'/<directory_of_script>/ftp_file_from_apps.sh
    v_file_name v_file_name_pdf',
    enabled=>TRUE
    end;
    begin
    dbms_scheduler.create_job(
    job_name=>'SCP_FILE_TO_DBS',
    job_type=>'executable',
    job_action=>'/<directory_of_script>/scp_file_to_dbs.sh
    v_file_name_pdf',
    enabled=>TRUE
    end;
    ftp_file_from_apps.sh error:
    ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
    scp_file_to_dbs.sh error:
    ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
    I tripple checked my <directory_of_script>.
    Please help.
    Regards
    John

    Hi,
    What Paul means is that you should not be using
    job_action=>
    '/<directory_of_script>/scp_file_to_dbs.sh v_file_name_pdf',
    Instead job_action should be the name of the shell script only. So you should have
    job_action=>
    '/<directory_of_script>/scp_file_to_dbs.sh',
    number_of_arguments=>1
    enabled=>false
    And then make a call to dbms_scheduler.set_job_argument_value (for each argument) and finally a call to dbms_scheduler.enable.
    Hope this helps,
    Ravi.

  • Shell script called from .sql fie in oracle concurrent manager

    Hi
    I am running a request set through Oracle concurrent manager.
    The manager calls a .sql file. The sql file internally calls a unix shell script.
    v_body VARCHAR2(10000);
    v_body is set as followed in the sql program.
    v_body := 'ATTENTION :' || CHR(10) || CHR(10) ||
    'Your invoice number ' || r_error_rec.invoice_num || ' cannot be paid at present due ' ||
              'to one of the following reasons:' || CHR(10) || CHR(10) ||
              ' - The Purchase Order number quoted on the invoice is invalid ' || CHR(10) ||
              ' - The Purchase Order number has not been quoted at all on the invoice' || CHR(10) ||
              ' - The Purchase Order number is missing on one or more of the lines on the invoice' ||
              CHR(10) || CHR(10) ||
              'To avoid any further payment delays, please advise us of the correct Purchase ' ||
              'Order number(s) by emailing ' || r_error_rec.sender || '. Please note that it is not ' ||
              'necessary to re-submit the invoice.' || CHR(10) || CHR(10) ||
              'If you do not know the Purchase Order number, please contact the employee ' ||
              'who ordered your goods/services for this number. For future reference please note that ' ||
              'it is the responsibility of the vendor to ensure that an approved Purchase Order ' ||
              'number is received before supplying goods/services to . The purchase order is ' ||
              'evidence that the order has been approved by management.' || CHR(10) || CHR(10) ||
              'This invoice will be held as pending until the valid Purchase Order number can be provided.' || CHR(10) || CHR(10) ||
              'Thank you,' || CHR(10) || CHR(10) || ' Accounts Payable' || CHR(10);
    The sql now calls a unix shell script as shown below.
              l_request_id := fnd_request.submit_request (
                                            'CFI',                                   'CFIECAPEMLSH',                         NULL,                              NULL,                              FALSE,                              r_error_rec.sender,                          v_recipient,                              v_ccrecipient,                          v_bccrecipient,                          v_subject,                                   v_body,                                   v_attachment     
    So here the problem i am facing is that the shell script is not getting called.
    If i keep v_body= 'Test' the shell script is called and program is working fine.
    Is it a problem with CHR(10) or the size limitation of v_body i dont know.
    I tried to keep v_body VARCHAR2(10000).
    Still it did not work.
    Plz help me if u know about this.

    You cannot have varchar2 > 4000.

  • Shell script calling SQL Program and passing parameters

    Hi guys,
    Greetings from Toronto. Is it possible to pass a string or strings as parameters to a sql program from a shell script ?
    Shell Script
    # Accept system input parameters
    p_user_id=$1
    p_job_id=$2
    sqlplus.exe -s $p_user_id @$RD_PATH/rd_test.sql $p_user_id $p_job_id
    SQL Program (rd_test.sql)
    -- Accept system input parameters
    define p_user_id = &1
    define p_job_id = &2
    -- Wondering if its possible to pass these 3 parameters from a shell script program.
    -- (1) rd_test-$p_job_id-3-1.lis
    -- (2) RD_PRINTER(rd_test,3)
    -- (3) t_data
    select
    t_data=''rd_test-'||'''$p_job_id'''||'-1-1.txt''
    t_data_dir=''.''
    ksh $RD_PATH/another_shell_prog.sh $p_user_id $p_job_id '||a.rd_value||' '
    ||b.rd_value||' rd_test-$p_job_id-3-1.lis $RD_PRINTER(rd_test,3) '||
    '$t_data $t_data_dir'||'
    exit_status=$?
    check_command'
    from rd_job_parameter b, rd_job_parameter a
    where a.job_id = &2
    and a.jp_module_id = 'RDTEST'
    and b.job_id = a.job_id
    and b.module_id = a.module_id
    /As always, its not something I have to solve this minute. Any help would be appreciated
    and I will be thinking of the problem.
    Thanks
    Raj
    Edited by: Raj404261 on Jun 25, 2009 11:40 AM
    Edited by: Raj404261 on Jun 25, 2009 5:29 PM

    Hi Sean,
    Thanks for the reply. I am not at work yet. I already do have the if condition to call 2 separate sql scripts. I was hoping them to be reduced to one sql script. That's why I was hoping to pass some of those values to the select statement as parameters.
    Here is what I was hoping to pass from the shell script based on an IF condition. The good thing about it is that I can hard code these 3 parameters in the shell script in the IF and ELSE conditions. Is it possible to tag these 3 hard coded values in the command line after $p_job_id and then capture these 3 parameters in the SQL program ?
    1. rd_test-$p_job_id-3-1.lis or rd_test-$p_job_id-3-1.lis
    2. RD_PRINTER(rd_test,3) or RD_PRINTER(rd_test,4)
    3. t_data=''rd_test-'||'''$p_job_id'''||'-1-1.txt''
    Shell script :
    # Accept system input parameters
    p_user_id=$1
    p_job_id=$2
    if [condition]
       sqlplus.exe -s $p_user_id @$RD_PATH/rd_test.sql $p_user_id $p_job_id
    else
       sqlplus.exe -s $p_user_id @$RD_PATH/rd_test.sql $p_user_id $p_job_id
    fi
    ksh $RD_PATH/another_shell_prog.sh $p_user_id $p_job_id '||a.rd_value||' '
    ||b.rd_value||' rd_test-$p_job_id-3-1.lis $RD_PRINTER(rd_test,3) '||
    '$t_data $t_data_dir'||'

  • Oracle Workflow Erroring on Function/Shell Script

    We are in the process of upgrading databases and reimported all the OWB code into the new database.
    Currently our OWB mappings all seem to run ok, but when I try to run a process flow I am hitting the following error
    RPE--2075: Oracle Workflow failed to process the execution request for activity LD_EDW_MAIN:F_GET_DB_NAME. This may be because dependant objects have not yet been deployed. ORA-20010
    F_GET_DB_NAME is a function and I checked and I see that the function executes properly
    I also hit a similar error when trying to execute a shell script.
    How would I go about deploying a function or a shell script?
    Im relatively new to OWB and am being "force fed" learning since we lost our main OWB colleague.
    Thank you

    Thanks! for your reply.
    I am using this API outside the workflow.I am using this API for iExpense to approve an Expense Report. In Expenses Workflow below are the processes:
    1. AP_MANAGER_APPROVALPROCESS whihc is using NON_AME_APPROVAL_PROCESS and this is using REQUEST_APPROVAL_PROCESS and under this process there is a notification APPROVAL_REQUES. Now, I am completing this ACTIVITY as Approve and I am able to do that but problem is that REQUEST_APPROVAL__PROCESS is itself not getting completed and stuck here.
    Please let me know how can I achieve that.
    Thansks!
    Sandy

  • Execve: Exec format error to execute shell script

    I made job to execute a shell script.
    exec dbms_scheduler.create_job (
    job_name => 'run_sh',
    job_type=>'EXECUTABLE',
    job_action=> '/fsoracle/app/oracle/inst2/if_cft/send_file_susin.sh',
    start_date=>sysdate + 1/5760,
    enabled => TRUE
    send_file_susin.sh
    #!/bin/ksh
    set -v
    . /fsutil/ndm/axway/profile
    /fsutil/ndm/axway/Synchrony/Transfer_CFT/bin/CFTUTIL << EOJ
    CONFIG TYPE=COM,MEDIACOM=TCPIP,FNAME=$CFTTCP
         SEND PART=ZADA,IDF=1363X1364,
              FNAME='/fsoracle/app/oracle/product/rdbms/log/KFG.DD.SHRCOM.HRD.A03',
              NFNAME=KFG.DD.SHRCOM.HRD.A03,
              FLRECL=25,NLRECL=25
         SWAITCAT SELECT='IDTU=="%_CAT_IDTU%"'     
    EOJ
    This script is well executed in terminal mode, but it threwed error, [ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error STANDARD_ERROR="execve: Exec format error"] when I executed the shell script, send_file_susin.sh.
    I changed owners and chmods of some specific files, and t.sh was well executed.
    t.sh
    #!bin/ksh
    /usr/bin/mkdir /tmp/test
    I don't know what's wrong with the script, send_file_susin.sh.
    Does any know about this? Please, tell me the solution.
    Thanks in advance,
    Jinbae Kim.

    Hi,
    Posting this in case anyone else find it.
    The key error here is "execve: Exec format error" .
    The following things should be checked
    - that the shell script is a text file has UNIX line terminators
    - that the shell script is set to be executable by the user that the job runs as
    - that the shell script begins with a hashbang line - e.g. #!/bin/sh (I suspect this is the problem)
    For running external jobs on 10gR2 or below, refer to this post Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files
    For running external jobs on 11g and up, please use a credential.
    Hope this helps,
    Ravi.

  • Oracle Error Handling in Shell Scripts

    I need to manage 2 diferente class of errors :
    Oracle Errors(produced in compilation time) and
    Operating Syste Error(e.g. No Datbase conection ORA-1017,etc) my shell its KSH.
    Please can you help me how can I manage then?
    this my alternative but is not correct ;
    #creating conexion with sql
    exit | sqlplus -s $USERPV_DB/$PWDPV_DB @$VORDSQLPATH/ord.extractor_porven.sql $VFDESDE $VFHASTA > $VORDDATOS_PATH/ord.extractor_porven$VDATE.dat 2>> $VLOG
         #Evaluating last sentence (sqlplus . . . . )
         VERROR=$?
         #Si VERROR=0 should stop process execution and alert with echo ".."Oracle error handling before compilation time
         if [ $VERROR  != 0 ]
         then
         echo "value of VERROR are:$VERROR"
         echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME" >> $VLOG 2> /dev/null
         " Here show VERROR
         else #Oracle error handling in compilation time
         echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME " >> $VLOG
         " Here show VERROR
    else if [ $VERROR  = 0 ]
    " DATA EXTRACTION WAS SUCESSFUL"
    fi
    Would apreciate your help its very urgent.
    Best Regards
    Antonio

    user5647282 wrote:
    I need to manage 2 diferente class of errors :
    Oracle Errors(produced in compilation time) and
    Operating Syste Error(e.g. No Datbase conection ORA-1017,etc) my shell its KSH.
    Please can you help me how can I manage then?
    this my alternative but is not correct ;
    #creating conexion with sql
    exit | sqlplus -s $USERPV_DB/$PWDPV_DB @$VORDSQLPATH/ord.extractor_porven.sql $VFDESDE $VFHASTA > $VORDDATOS_PATH/ord.extractor_porven$VDATE.dat 2>> $VLOG
    Piping the output of 'exit' to sqlplus????????? what do you expect from this?
         #Evaluating last sentence (sqlplus . . . . )
         VERROR=$?any error returned by sqlplus as $? would be a fatal error of sqlplus itself, not any error returned by processing a sql statement. If your script ord.extractor_porven.sql were to generate, say, an ORA-00001, that is NOT an error in sqlplus and so does not return to the OS as an error of sqlplus.
         #Si VERROR=0 should stop process execution and alert with echo ".."Oracle error handling before compilation time
         if [ $VERROR  != 0 ]
         then
         echo "value of VERROR are:$VERROR"
         echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME" >> $VLOG 2> /dev/null
         " Here show VERROR
         else #Oracle error handling in compilation time
         echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME " >> $VLOG
         " Here show VERROR
    else if [ $VERROR  = 0 ]
    " DATA EXTRACTION WAS SUCESSFUL"
    fi
    Would apreciate your help its very urgent.
    there is no "urgent" here.
    "Urgent" means one of two things -
    1) people are dying, or
    2) you have a customer-facing, revenue-producing production system that is down.
    (And to get some perspective on the second case, keep the first in mind.)
    For the first, you call whatever civil emergency service seems appropriate.
    For the second, you open an SR with Oracle - which requires a paid-up support contract. For them to consider your problem "urgent", you will need to demonstrate that your problem falls under item #2. I seriously doubt your problem fits that criteria.
    Best Regards
    Antonio

  • Getting error while running shell scripts

    Hi DBAS,
    I Have one requirement,i want connect n database dynamically by using dynamic password and execute some oracle commands,i written some script ,but while running i am getting error,please any one correct my error ,i am not able to getting error
    passwrd.pw like this
    abc@abc
    aaa@aaa
    # vi healthcheck.ksh
    #!/bin/ksh
    export PW=`cat /applis/forum/pune/dbhealthchecks/.pw/passwrd.pw`
    for (( i = 0 ; i < ${#PW[@]} ; i++ ))
    do
    sqlplus -s larry/$PW<<EOI
    spool sysdate.dat
    select sysdate from dual;
    done
    exit;
    EOI
    error :
    line 2: syntax error at line 11: `for' unmatched
    thanks!
    larry
    Edited by: tmadugula on Mar 18, 2011 6:26 AM

    Could you explain the reason for the for loop and connection attempts while incrementing var $i?
    It is also no a good idea to provide a password at the command line since it can be seen with 'ps' command.
    Better:
    sqlplus -s <<-EOI
    connect larry/$PW
    etc.

  • Error handling with shell script

    Hi,
    I want to write a .sql file with lots of executable statements. These statements need to run on 100 of schemas per database.
    I want to have error handling mechanism in this file in such a way that whenever I get any ORA- error or SP error, it should stop executing there.
    Please help me.
    Thanks.

    872305 wrote:
    Hi,
    I want to write a .sql file with lots of executable statements. These statements need to run on 100 of schemas per database.
    I want to have error handling mechanism in this file in such a way that whenever I get any ORA- error or SP error, it should stop executing there.
    Please help me.
    Thanks.
    10:47:51 SQL> help whenever sqlerror
    WHENEVER SQLERROR
    Performs the specified action (exits SQL*Plus by default) if a
    SQL command or PL/SQL block generates an error.
    WHENEVER SQLERROR {EXIT [SUCCESS|FAILURE|WARNING|n|variable|:BindVariable]
                        [COMMIT|ROLLBACK] | CONTINUE [COMMIT|ROLLBACK|NONE]}
    10:48:07 SQL>

  • [SOLVED] Stop "foreign" error output from shell script

    Hello,
    I have just migrated from TrueCrypt to VeraCrypt (without issues by the way), but I have a problem with a script that I wrote.
    This script is basically a shortcut for mounting a VeraCrypt volume and opening it with Dolphin; it keeps a "question" open at the command line, which, when answered with 'y', will unmount the volume.
    Here is the important part of the script:
    /usr/bin/veracrypt "$VERACRYPT" "$MOUNTDIR"
    /usr/bin/dolphin "$MOUNTDIR"
    echo "Unmount VeraCrypt volume now [y/n]?"
    read ANSWER
    if [ "$ANSWER" = "y" ]
    then
    /usr/bin/veracrypt -d "$VERACRYPT"
    fi
    exit 0
    As you can see, it's utterly simple. My problem now is, that some system message shows up when running the command, and it somehow hides my "question":
    "/org/freedesktop/UDisks2/block_devices/dm_2d0" has new interfaces: ("org.freedesktop.UDisks2.Block", "org.freedesktop.UDisks2.Filesystem")
    "/org/freedesktop/UDisks2/block_devices/dm_2d0" has new interfaces: ("org.freedesktop.UDisks2.Block", "org.freedesktop.UDisks2.Filesystem")
    I thought it was veracrypt or Dolphin related, and I tried adding "2> /dev/null" at the end of those commands, but it appears that this message comes from somewhere else.
    Is there a way to suppress these "foreign" messages? Why does my "question" not show up anymore at all?
    Thanks,
    DrTebi
    Last edited by drtebi (2015-02-02 23:41:39)

    That worked, thanks!
    I have to assume that veracrypt caused the "new interfaces" message then?
    I didn't try the redirecting to stdout at first because I thought if I do that, I would not get my "question" -- but that was of course wrong, since I am not redirecting the "read" command.
    Thanks for the help.

  • Trouble in Unix calling a Java utility from another shell script

    Hi,
    I'm able to run a shell script (call it script B) in Unix which calls a Java utility. When I call script B from another script (script A) I get the error below. I have done much work to make sure the environment variables are the same.
    java.util.zip.ZipException: error in opening zip f
    ile
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:69)
    at com.something.runtime.ZipFileApplicationSource.<init>(ZipFileApplicationSource.java:22)
    at com.something.runtime.ZipFileRuntime.main(ZipFileRuntime.java:35
    ANY HELP WOULD BE GREATLY APPRECIATED.
    Thanks

    Here's my guess, if this doesn't work, post your scripts and maybe that will help.
    When you run your script B, you said it works. I think the problem is that when you run script B, your shell and envirenment variables are set by the window you're working in. When you call script B from script A, it creates a new shell to run it and it doesn't run the files that are run when you start a terminal or a telnet(it won't run .cshrc, .kshrc or .login). Depending on what OS you're using, I think the default shell is sh for most of them. The first line of script B should be
    #!/(your bin directory)/(shell you're using)
    for me it's
    #!/bin/tcsh
    then you might want to run your startup file to set envirenment variables, paths, etc...
    source (your user directory)/(the file name)
    for me it's
    source ~/.cshrc
    Then if you need to set the environment variables in your script.
    set CLASSPATH /usr/local/j2ee/bin.....
    set PATH /bin:/xyz....
    If that doesn't help post your scripts, or if I didn't explain it will enough, just ask.

  • Using launchctl command within a shell script

    I have successfully installed two daemons, and I would like to be able to disable and enable them via shell scripts, called by the daemons themselves. Here is my first shell script:
    #!/bin/sh
    # Testing for presence of a CODEBOY file
    if [ -e "/Volumes/CODEBOY/Change.txt" ]
    then
    osascript '/Users/praxisii/Library/Scripts/MacScript.scpt'
    launchctl unload -w '/Users/praxisii/Library/LaunchDaemons/WaitDaemon.plist'
    launchctl load -w '/Users/praxisii/Library/LaunchDaemons/RunDaemon.plist'
    fi
    The daemon works just fine, running the background, calling this script, which is waiting for me to plug in my flash drive (entitled CODEBOY). When the flash is plugged in, the applescript is called, and the first launchctl command is executed, which disables the WaitDaemon. As advertised, the .plist file is re-written with the Disabled key set to true. The next line (which is supposed to enable the RunDaemon) is never executed.
    Similarly, if the launchctl line is placed before the osascript line, the applescript is never called. It is as if the shell ignores everything after a single launchctl command, which it will execute.
    Any ideas or comments?

    Gary:
    Thank you for the link to the TN2083. Long, but very informative.
    I appreciate all the other comments on this thread. I am an amateur AppleScript/UNIX scripter, and any opportunity to learn more is much appreciated.
    I have completely re-worked my original launchd agent system for automatic processing of a file on a flash drive. Here is the .plist file that I now use:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>RunOSAscript</string>
    <key>LowPriorityIO</key>
    <true/>
    <key>Program</key>
    <string>/usr/bin/osascript</string>
    <key>ProgramArguments</key>
    <array>
    <string>osascript</string>
    <string>/Users/casdvm/Desktop/AutoFlash.scpt</string>
    </array>
    <key>RunAtLoad</key>
    <false/>
    <key>ServiceDescription</key>
    <string>Runs Applescript directly</string>
    <key>StandardOutPath</key>
    <string>/Users/casdvm/Desktop/AutoFlashLog.txt</string>
    <key>StartInterval</key>
    <integer>25</integer>
    </dict>
    </plist>
    The AutoFlash.scpt is an Applescript that simply uses the Finder to check for the presence of a specific file on the flash drive. If it is there, and a certain script property has a value of 2, then it runs the AppleScript that processes the desired file on the flash drive. Once that is done, the script property is set to 0 (to prevent the processing from happening over and over again.). Once the flash drive is removed, the script property is set back to 2 in anticipation of the next time the flash drive is plugged in.
    It is much simpler than the two agents I was messing with beforehand. I did indeed discover that this .plist needs to be saved in the LaunchAgents folder of my user Library (thanks again for pointing that out, Gary).
    The only problem that I have involves the continuous calling of the Applescript from the launchd agent. As you can see from my .plist file, that AppleScript is called every 25 seconds. I tried setting it up using the OnDemand key, but I kept receiving a re-spooling error of some sort (I don't recall exactly; my notes are sketchy on that phase of testing), so I just decided to have it go every 25 seconds. It really doesn't matter, since I can leave the flash drive plugged in all day anyway, and it only processes the desired file once.
    Thanks again for all the commentary and discussion; I am grateful for the assistance.
    Craig Smith

  • Problem with the run_job,shell script with sqlldr

    Hi Gurus,
    I Created a job which calls the shell script and i understood from the other posting this job is going to execute with nobody,
    I had done the below testing
    Test 1) Shell script calls the SQL file, this SQL file executes the procedure.
    Test 2) Shell script calls the sqlldr command.
    When i execute the Test cases with , dbms_scheduler Run_job procedure, Test1 is success but Test2 was failed
    When i execute the Test cases with, logging into box with owner of the shell & both test cases are successful.
    Parent folder & Shell files are given with 777 permissions. & the Oracle db is version 10.2.0.1.0.
    Error:
    STANDARD_ERROR="SQL*Loader-522: lfiopn failed for file (*.log)"
    Please provide me your inputs its bit urgent Thanks a lot for your help.
    Edited by: 926769 on May 23, 2012 2:27 PM

    First of all let's look at your environment ... a totally unpatched version of software that is so old it is in desupport mode. You should upgrade to a fully supported version but, if you can't, at least to 10.2.0.5.
    That said without seeing any of your code, or a listing showing permissions on the directory and files, there is insufficient information from which to help you.
    Please post ALL information required for us to understand what you are doing an your environment.
    But before I decided that NOBODY was doing anything ... I'd shell out to the server from SQL*Plus using the HOST command and verify that permissions are as you believe them to be. There is every reason to believe SQL*Loader is having an issue with your file as identified.

  • Shell Script Resource Adapter

    I am using version 7.0 and I'm trying to setup a resource using the Shell Script resource type. I am having issues with a few things:
    1. How do I let the system know there was an error in the shell script? No matter what exit code I use in the Actions I have configured for the resource, the system thinks everything was successful. Relatedly, how can I send back an error message - where can I view it?
    2. How do I send back multiple values for an attribute? When 'GetUser' is called, it is parsed by 'GetUser AttrParse', I haven't been able to successfully send back mutiple values for an attribute. I have tried semicolon separating the attributes so that I can comma separate the multi-values for an attribute. I have also tried pipe.
    3. When I setup a new resource with the shell script resource type, the 'Test Configuration' button calls a unix command that checks for a bunch of unix commands that have nothing to do with what I will be doing in my shell script. Is there a way to change the test?

    I found a way to send back multiple values for an attribute. Instead of using the collectCsvHeader and collectCsvLines AttrParse tokens as the resource reference guide says, I use str and skip tokens to parse the line. These tokens take delimiters and terminators for the line which allows me to send back multiple values for an attribute.
    Line being parsed looks like this:
    TEST USER, ,MN,People; /home/simtestusr; /bin/sh; 8888888888; simtestusr; 888; group1, group2; host1, host2, host2; ;
    <AttrParse name='UnixShellScript GetUser AttrParse' >
    <str name='gecos' trim='true' term=';'/>
    <skip len='1'/>
    <str name='homedir' trim='true' term=';'/>
    <skip len='1'/>
    <str name='shell' trim='true' term=';'/>
    <skip len='1'/>
    <str name='accountId' trim='true' term=';'/>
    <skip len='1'/>
    <str name='uid' trim='true' term=';'/>
    <skip len='1'/>
    <str name='uidnumber' trim='true' term=';'/>
    <skip len='1'/>
    <str name='groups' multi='true' delim=',' trim='true' term=';'/>
    <skip len='1'/>
    <str name='hostnames' multi='true' delim=',' trim='true' term=';'/>
    <skipToEol/>
    <MemberObjectGroups>
    <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
    </AttrParse>
    Also, SUN is telling me that the exit code problem (#1) may be fixed in sp2 for 7.0, I'm waiting to find out when it will be released.
    I still don't have an answer for #3.

  • Problem with backtick replacing apostroph in applescript/shell script

    I've got a script that appears to be using a backtick instead of an apostrophe which is causing an error in my shell script. For the life of me I can't seem to find where the error is being generated?
    The script is attached below. I'm using Exiftool, an app that writes metadata to image files. The shell script
    set cmd to "exiftool -CopyrightNotice=" & exifCopyright & " " & thisFilePath & ""
    set theResult to do shell script cmd
    works fine but the following shell script
    set cmd to "exiftool" & space & authorStr & " " & thisFilePath & ""
    set theResult to do shell script cmd
    returns the error "sh: -c: line 0: unexpected EOF while looking for matching `''
    sh: -c: line 1: syntax error: unexpected end of file" number 2. The code in the event log in applescript editor looks exactly the same to me but one fails in the shell script.
    It has been suggested by the developer of Exiftool, Phil Harvey, that there is a backtick in the second shell script. I read somewhere in the applescript docs that this is due to a change in OS 10.6? Any suggestions on how to fix this?
    Thanks.
    Pedro

    Yea, the authorStr value has a space like "Joe Smith"
    Then you need to use quoted form of this string, too:
    set cmd to "exiftool " & quoted form of authorStr & space & thisFilePath
    although the format looks wrong to me - shouldn't there be some kind of switch, such as "-author=' before it?
    You have to consider how you'd enter this at the command line to work out how best to translate it to AppleScript. For example, if the command line version were:
    exiftool -author='John Doe' /path/to/some.jpg
    you can see the quotes are around the name, not the entire -author switch. In this case you should be looking at something like:
    set authorStr to "John Doe"
    set theFilePath to "/path/to/some.jpg"
    set theCmd to "exiftool -author=" & quoted form of authorStr & space & quoted form of theFilePath
    Now you could, of course, use quoted form when you create the variables (e.g. set authorStr to quoted form of "John Doe"), but that may screw you up later on if/when you try to use authorStr in some other way, so I find it best to use quoted form only where it's needed.

Maybe you are looking for

  • Video from camera won't play in iphoto

    I can import video from my camera into IPhoto and the thumbnail shows up just fine. When I double click to play, nothing happens. Does anyone know what the problem is?

  • Quick Time Player URL?

    I am new to using my I-Mac and am trying to access a radio station in Mali but am unable to do so. Unfortunately, it tells me I have an invalid URL. If anyone can shed some light on this for me and how to either establish a new URL or fix it so that

  • Pdf prints broken characters

    I have a MacBookPro software Mountain Lion 10.8.3, Acrobat vs 10.1.7. Multiple-page pdf displays fine, prints broken characters??? Can I upgrade to Acrobat 11 to rectify problem? How?

  • I can't  download Music and buy apps

    Security questions

  • Bw db copy

    Hi all, We are rebuilding our DEV BW environment from a copy of the Production environment.I have successfully restored the Oracle 9.2 database. R3trans -x is also working. However when I run startsap, it executes R3trans -d and fails the database ch