Execute Shell Script from OWB Process Flow

I am trying to execute a Shell Script from a User Defined activity of OWB Process Flow. As I have not done such things earlier
I need to know:
1. Where I will put the Shell Script (move_file.sh)?
2. What are the values in need to enter in the external process parameters (such as Command, Script, Result Code, Parameter List, Sucess Threshold etc)
Please reply this thread. It would be a big help for me and probably for others as well.
Kind Regards
Zakir
Message was edited by:
Zakir

Check this out,.
http://download-uk.oracle.com/docs/cd/B31080_01/doc/owb.102/b28223/ref_processflows.htm#i1173362
And answer to your question1, the shell script should be on the unix server.
Regards

Similar Messages

  • Passing parameters from shell script to OWB process flow

    Hi all,
    I am running OWB process flow (using the template script provided by oracle) and i want to pass two date parameters as shown below:
    sqlplus -s $SQL_USER/$SQL_PWD@$ORACLE_SID @$HOME_DIR/src/vmc_oem_exec_script.sql OWB_OWNER VMC_POST_DW_PF_LOC_SIT PROCESS VMC_NM1_PORT_MAIN "," "P_DATE_FROM=$DATE_FROM,P_DATE_TO=$DATE_TO"
    How do i catch those values in process flow and pass those to mappings in Process flow?
    Do i need to create PF variables with same names or any name will do?
    Thanks in advance

    This document is explaining how to pass data between activities in process flow.
    I am passing parameters from a shell script.
    Any ideas,how to pass parameters from shell script and then initialize the process flow variables based on those values and then pass them further to mappings.
    Thanks

  • How to execute SQL scripts using OWB Process flows ?

    Hi,
    I have some SQL Scripts. I have to execute them using OWB Process flows.
    Can i get any document or link which helps me in achieving this?
    Thanks in Advance,
    SriGP

    Sutirtha,
    Thank you very much. I really appreciate all of your responses.
    I have one more question ( Sorry for flooding you with lot of questions :) )
    How to capture the errors which occured inside the SQL Scripts.
    My scenario is like this. I have two sql scripts Script_1.sql and Script2.sql namely. I would like to put dependency on the execution of the scripts.
    If Script_1.sql executes succesfully without any errors, then EXECUTE Script_2.sql
    else if Script_1.sql execution contains errors then DON'T EXECUTE Script_2.sql
    As of now, i observed that the Process flow shows Success State even if there is an error in the sql script execution. Because of which i was not able to put dependency on the execution of the scripts.
    I think i can do it by tweaking(changing) the code inside the SQL Scripts, like logging the errors in some log table and reading it before the next script execution.
    But the restriction is, I Should not touch/change the existing SQL Scripts.
    Do we have any mechanism in the ProcessFlows to identify the SQL Errors that occurred during execution of SQL Scripts ?
    Please suggest any idea on this. It will be great if you can help in this.
    Thanks in advance,
    SriGP.

  • (urgent)how to run the sqlldr script in owb process flow?

    dear all:
    In my oracle warehouse ,i have to load much *.dat file
    into database with sqlldr in owb process flow. In owb process flow, I use the external process to run the sqlldr file with following configuration:
    1:======external process==========
    command : /app/ftpfile/sqlldr2.sh
    parameter list:
    success_threshold:0
    script:
    ================================
    2:create a file location in FILE LOCATION node:
    =============
    ODS_LOCAL_LOC
    =============
    3: in the runtime repository i register the location
    ============
    user name: oracle (for the sqlldr should run in oracle user)
    password : oracle
    host name: localhost
    root path: /app/ftpfile/
    ============
    4:configure the process flow
    ============
    path settings
    working locations:ods_local_loc
    ============
    after deploy them success in runtime repository,
    i run it ,it show me error following:
    ==========
    SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
    ORA-12545: Connect failed because target host or object does not exist
    ===========
    please help me!
    with best regard!

    Hello,
    our developers were getting this error code just the other day. They are using "sqlplus_exec_template" script to initiate these things. In our case, I had to do two thing:
    1) Modify their "initiator" script (the one that connects to runtime access user, and then calls "template") - it has to use tns connectivity "user/passwd@service_name"
    2) Create TNS entry (server side) for the "service_name" above.
    Now these SQL*LOADER mappings run successfully.
    Alex.

  • How will execute shell scripts from AR91

    hallo, please help me to find where I can configure the execution mode for scripts called als run-Script in acroread.
    Following scenario: a pdf file (see attachement testpdf.pdf), generate from pdflatex (see testpdf.tex.txt) calls a bash script beispiel.sh (see attachement beispiel.sh.txt). Dependend from situation opens an editor window or an xterm. Under GNOME can we not open the xterm, there start only editor windows - gvim/emacs/kwrite, but not well defined. With acroread7 opens a xterm after menu dialogs. How can i configure an defined behaviour ?
    Thanx for any help
    Regards, Matthias

    Hi Matthias,
    To achieve this you can try to change the default "Open With" settings of .sh files to "xterm" as highlighted in the snapshot below
    This will enable to execute any shell script in xterm.
    Let us know if this helps.
    Thanks,
    Vaibhav

  • Execute shell command from Java

    Hi all,
    I need some idea for executing shell script from Java programe.
    For example i have start.sh script in /tmp/start.sh  folder of unix server.
    I want to execute shell script from local java code.
    Any idea on this.

    Hi,
           Read the following articles/posts, maybe this could help you:
          How to execute shell command from Java
    Running system commands in Java applications | java exec example | alvinalexander.com
    Want to invoke a linux shell command from Java - Stack Overflow

  • Execute Shell Script through Demantra Workflow

    Hi All ,
    Can we execute shell script from Demantra Workflow ?
    If yes where should we place the shell script file and wat should be the commandline command in the step .
    We have the Demantra installed on a windows server and the workflow manager is on a linux server .
    the batch file on the windows server can be executed through the secure shell from the linux server .
    I am trying to achieve the same through thr demantra workflow
    Appreciate any input on the same .
    Thanks and regards
    Suzy

    Hi,
    Shell script is not supported till Demantra 7.2.0.2 WF.
    I have checked with Oracle team also and reply I got below for your reference:
    QUESTION
    *=========*
    As per your details, shall we conclude like this:
    *"only *.bat and *.exe files can be used in workflow. Demantra standard functionality doe*
    *s not support shell script in workflow"*
    ANSWER
    *=======*
    Hi ,
    The Demantra standard functionality 7.2.0.2 does support shell script in workflow.
    Thanks,
    Asya
    Please review the note#468071.1-Unable to Run EBS Workflows that Call EngineManager.exe in
    You will find this note is referring to the Enhancement Request Bug 6644455-- ANALYTICAL ENGINE
    NOT AVAILABLE ON UNIX/LINUX
    But the enhancement bug exist and I hope it is fixed in Demantra 7.3.
    Tks
    MJ

  • Call Shell Script from PL-SQL

    Hello All,
    I have been using some well known Java Class and Procedures to execute shell scripts from PL-SQL.
    The different environments I was using before were
    1)
    Operating System (Server) AIX version 5
    Oerating System(Client) Microsoft Windows XP Service Pack 2
    Oracle Database Version Oracle Database 10g Enterprise Edition Release
    10.2.0.1.0
    2)
    Operating System (Server) Red Hat Linux 3.4.5-2
    Oerating System(Client) Microsoft Windows XP Service Pack 2
    Oracle Database Version Oracle Database 10g Enterprise Edition Release
    10.2.0.1.0
    But suddenly I had to drop and recreate the Databases on 1st (AIX) environment
    and
    reinstall the Operating System (Server) Red Hat 3.4.5-2 on IInd environment stated above (which obviously means the reinstallation of Oracle Database there!)
    Now the shell script(through PL-SQL)is executing smoothly for the IInd (Linux) environment[b] but not executing for the Ist (AIX) environment
    and I am not getting how to solve the problem.
    I have given all the permissions to users, shell scripts and all as they were before.
    Can you please help?
    Regards,
    Abhijit.

    Hello All,
    I have been using some well known Java Class and Procedures to execute shell scripts from PL-SQL.
    The different environments I was using before were
    1)
    Operating System (Server) AIX version 5
    Oerating System(Client) Microsoft Windows XP Service Pack 2
    Oracle Database Version Oracle Database 10g Enterprise Edition Release
    10.2.0.1.0
    2)
    Operating System (Server) Red Hat Linux 3.4.5-2
    Oerating System(Client) Microsoft Windows XP Service Pack 2
    Oracle Database Version Oracle Database 10g Enterprise Edition Release
    10.2.0.1.0
    But suddenly I had to drop and recreate the Databases on 1st (AIX) environment
    and
    reinstall the Operating System (Server) Red Hat 3.4.5-2 on IInd environment stated above (which obviously means the reinstallation of Oracle Database there!)
    Now the shell script(through PL-SQL)is executing smoothly for the IInd (Linux) environment[b] but not executing for the Ist (AIX) environment
    and I am not getting how to solve the problem.
    I have given all the permissions to users, shell scripts and all as they were before.
    Can you please help?
    Regards,
    Abhijit.

  • Call a shell script from a OWB Mapping or Process Flow

    Hi,
    is it possible to call a shell script from a owb mapping or Process Flow and how can i do this?
    Greetings

    Check this :-
    http://blogs.oracle.com/warehousebuilder/2010/05/how_to_use_user_defined_activity_in_owb_process_flow.html
    Cheers
    Nawneet

  • Running sqlplus from an OWB process flow

    I have two SQLplus scripts that I need to run as part of a process flow. The flow calls the scripts at different moments, using Unix commands that look like
    sqlplus userid/passwd@sname @startReadseq.sql
    sqlplus userid/passwd@sname @idenTransac.sql
    Script startReadseq.sql drops and then re-creates a sequence that I need to begin at 1 every time. Script idenTransac.sql runs a PL/SQL program on a table. Both scripts have been tested many times from the SQL prompt and they always run satisfactorily there, under the same userid employed by the process flow at runtime.
    However the two calls to SQLplus are ignored by the flow. The sequence is not reset, and the PL/SQL routine doesn't even write its log file. I looked up our forum but apparently there's no article on this topic yet.
    What am I missing or doing wrong? ... thank you for any help.
    Santiago Gomez

    Santiago, Would you help me?
    I have problems in starting sqlplus activity from a process flow. The process flow is very simple ( START - sqlplus activity - END).
    I wanted to start sqlplus and execute some commands in it.
    I set PARAMETER_LIST as @absolute_path_to_script_that_starts_sqlplus@
    and left the other three parameters(RESULT_CODE, SCRIPT, SUCCESS_THRESHOLD) blank.
    Inside the script that starts sqlplus is:
    sqlplus user/password@sid @absolute_path_to_script_that_contains_commands_to_run_in_sqlplus
    The Validation, generation and deployment passed successfully, but the following message is logged during execution:
    SQL*Plus: Release 10.2.0.1.0 - Production on Thursday Sep.27 17:26:25 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    password: ERROR:
    ORA-12560: TNS: protocol adapter error
    please enter user name:
    I've tried using "sqlplus /nolog" and "sqlplus" to avoid verifying user name and password, but I still got the message above.
    I also specified the absolute path to OWB's sqlplus executable and still failed.
    If I execute "sqlplus user/password@sid @absolute_path_to_script_that_contains_commands_to_run_in_sqlplus" in dos command line, it just works fine.
    I'm used to start just the listener and OracleService<sid>, and I also started OracleDBConsole<sid> to wish it works, but it doesn't help.
    It's really gnawing :-(
    Thanks in advance.
    My environment is Windows XP, Oracle 10.2.0.1.0, workflow server 2.6.4, OWB repository 10.2.0.1.0 design center 10.2.0.1.31

  • Error while trying to execute a unix shell script from java program

    Hi
    I have written a program to execute a unix shell script in a remote machine. I am using J2ssh libraries to estabilish the session connection with the remote box.The program is successfully able to connect and authenticate with the box.
    The runtime .exec() is been implemented to execute the shell script.I have given below the code snippet.
    try {
         File file_location = new File("/usr/bin/");
         String file_location1 = "/opt/app/Hyperion/scripts/daily";
         String a_mib_name = "test.sh";
         String cmd[] = new String[] {"/usr/bin/bash", file_location1, a_mib_name};
         Runtime rtime = Runtime.getRuntime();
         Process p = rtime.exec(cmd, null, file_location);
    System.out.println( "Connected to the server1" );
    BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line = br.readLine();
    while(line !=null)
    System.out.println(line);
    line = br.readLine();
    br.close();
    p.getErrorStream ().close ();
    p.getOutputStream().close();
    int retVal = p.waitFor();
    System.out.println("wait " + retVal);
    //session.executeCommand("ls");
    catch (IOException ex) {
    I get an error message
    Connected to the server
    java.io.IOException: Cannot run program "/usr/bin/bash" (in directory "\usr\bin"
    ): CreateProcess error=3, The system cannot find the path specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at SftpConnect.main(SftpConnect.java:143)
    Caused by: java.io.IOException: CreateProcess error=3, The system cannot find th
    e path specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    I am sure of the file path where the bash.sh and test.sh are located.
    Am i missing something? Any help would be greatly appreciated.
    Thanks
    Senthil

    Hi, I am using a simple program to connect to a RMI server and execute shell script. I use the Runtime.exec aommand to do the same.
    The script is sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul
    The script when run from the server, gives no errors. But when ran using rthe above method in java, gives errors as follows,
    Mycode:
    String command = "/bin/sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul";
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(command);
    int exitVal = proc.exitValue();
    System.out.println("Process exitValue: " + exitVal);
    java.io.IOException: CreateProcess: /bin/sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul error=3
         at java.lang.ProcessImpl.create(Native Method)
         at java.lang.ProcessImpl.<init>(Unknown Source)
         at java.lang.ProcessImpl.start(Unknown Source)
         at java.lang.ProcessBuilder.start(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at DecryptTest.main(DecryptTest.java:18)
    Can anyone please help

  • Executing a shell script from a java program

    Hi,
    I'm facing a problem while executing a shell script from a jsp page.
    I'm using exec() function.
    It's working fine for single statement scripts.But if the script consists of any database processing and some other processing statements,it's not returning the correct exit status of the process.
    Will u please help me in this.
    If there is any other ways to execute a shell script from a jsp page other than Runtime.exec().If so let me know.
    Thanks in advance.

    I think this shud workMaybe - but it is wrong! Why do you create aReader
    and then read bytes which are turned into a String
    without worrying about whether or not the bytes area
    String and without worrying about the character
    encoding if the bytes do represent characters and
    without worrying about how many bytes wereactually
    read.
    Also, both you and the OP should read, digest and
    follow the advice given in
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-
    traps.htmlI dont care if it is wrong. This code works for me.
    We are here to solve problems not to find which post
    is wrong.It is wrong! You are posting bad advice that is very wrong! It may work for you but it is wrong in general! WRONG WRONG WRONG.
    If you have a solution then post it I did post a solution! The reference I gave will explain to you and the OP exactly how it should be done.
    rather then
    posting rude comments.I was not rude! I was explaining just some of what was wrong!

  • Executing a shell script from a jsp page

    Hi,
    I'm facing a problem while executing a shell script from a jsp page.
    I'm using Runtime.exec() function.
    It's working fine for single statement scripts.But if the script consists of any database processing and some other processing statements,it's not returning the correct exit status of the process.
    Will u please help me in this.
    If there is any other ways to execute a shell script from a jsp page other than Runtime.exec() like RMI etc,.If so let me know.
    Thanks in advance.

    Hello,
    It's hard to help you but what you can do is listening to the outputs of your script, you should read the output stream and error stream and send them to the default console.
    Check this excellent article : http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4
    Best regards,
    Olivier.

  • Error while executing unix shell script from java program

    Hi All,
    I am trying to execute unix shell script from a java program using Runtime.execute() method by passing script name and additional arguments.
    Code snippet :
    Java Class :
    try{
         String fileName ="test.ksh";
         String argValue ="satish"; // value passed to the script
         String exeParam = "/usr/bin/ksh "+fileName+" "+argValue;
         Process proc = Runtime.getRuntime().exec(exeParam);
         int exitValue = proc.waitFor();
         sop("Exit Value  is : "+exitValue);
    catch(Exception e)
    e.printStackTrace();
    }Test.ksh
      export -- application realated paths..
      nohup  abc.exe 1> test.log 2>&1;
      $1
      exit.By running the above java class , i am getting exit Value: 139 and log file test.log of 0 bytes.
    when i am running the same command (/usr/bin/ksh test.ksh satish) manually, it's calling abc.exe file successfully
    and able generate the logs properly.
    Pls let us know where exactly i am stuck..
    Thanks in advance,
    Regards,
    Satish

    Hi Sabre,
    As per the guidelines provided by the article, i had done below changes..
    InputStream is = null;
    InputStreamReader iStreamReader = null;
    BufferedReader bReader = null;
    String line = null;
    try{
    String fileName ="test.ksh";
    String argValue ="satish"; // value passed to the script
    String exeParam = "/usr/bin/ksh "+fileName+" "+argValue;
    Process proc = Runtime.getRuntime().exec(exeParam);
    is = proc.getErrorStream();
    iStreamReader = new InputStreamReader(is);
    bReader = new BufferedReader(iStreamReader);
    System.out.println("<ERROR>");
    while((line = bReader.readLine()) != null)
    System.out.println("Error is : "+line);
    System.out.println("</ERROR>");
    int exitValue = proc.waitFor();
    sop("Exit Value is : "+exitValue);
    catch(Exception e)
    e.printStackTrace();
    Now , it's showing something like..
    <ERROR>
    </ERROR>

  • How to run shell script using External Process in Process Flow?

    Hi,
    We can run external process using Process flow.
    I would like to run shell script as external process in Process flow.
    Could any one please explain it?
    Thanks and regards
    Gowtham Sen.

    HI,
    As you said I tried this case. I got the following error. The script is running successfully while I tested at unix command prompt.
    The error is as follows..
    tarting Execution PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: wc: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Sep 29 22:57:39 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    Completing Task PFPS_SMPL_RUNSHELL
    Completing Execution PFPS_SMPL_RUNSHELL
    My scenario is---
    I am trying to return a file name from one shell script. I created a external process for that. After completion of this process, I am running another script which takes that file name and trying to create a external table. The both scripts are runnning successfully. But while I am trying to run using process flow, its not coming.
    And I am not getting the way to catch the output of external process and pass it as parameter as another external process.
    Any suggestions are welcome.
    Thanks and regards
    Gowtham Sen.

Maybe you are looking for

  • QuickTime not found error when trying to run iTunes 64 bit on W7, QuickTime not found error when trying to run iTunes 64 bit on W7

    I have quicktime installed on windows 7, 64 bit, and then installed the 64 bit version of iTunes. Install is successful, but when I try ot run iTunes, I get an error - "QuickTime was not found". Any suggestions?

  • Cant install intel video driver

    when i setup windows 7 32-bit and began ti intall driver the intel video driver didn't setup and this error msg appear anyone help me plz  laptop: hp probook 450 G1 core i7  This question was solved. View Solution.

  • Problem when I extend an oracle rac 10g on new node

    Hi everyone I need to extend an oracle RAC but i have problems when I add a new node. My actual enviroment is: 1) Oracle Grid Infraestructure 11gR2 - 11.2.0.3 (Upgraded from Clusterware 10gR2 + ASM 10gR2) 2) Oracle Rac Database - 10.2.0.5 (all on one

  • Base64 and dbms_output problem

    Hello, I'm trying to write a function that generate HTML content for sending inside a mail. This HTML content needs to have some picture inside it. To do so I'm using some conversion function from blob to base 64 encoding. To be sure that my function

  • JDBC parameters in *.dbc file

    Hi, I have JDBC parameters as bellow , EBS version 12.1.3 FND_JDBC_BUFFER_DECAY_INTERVAL=60 FND_JDBC_BUFFER_MIN=5 FND_JDBC_BUFFER_MAX=20 FND_JDBC_STMT_CACHE_SIZE=100 FND_JDBC_USABLE_CHECK=true FND_JDBC_PLSQL_RESET=false FND_JDBC_CONTEXT_CHECK=true FN