Calling Unix shell script for some GUI interface

Hi,
I'm preparing a shell script, which would check for the syntax of a bteq script.
I want this shell script to be called from a GUI interface...
Is it possible to call this shell script from any GUI interface..
If yes, could you please help me out.
Thanks,
Harshad.

Harshad (user524171) wrote:
I'm not aware of OEM grid control. Can i use it without Oracle or Oracle is must for this...Er.. this is an Oracle forum... and if you are not using Oracle s/w then why are you using Oracle support forums?
I'm using teradata database and unix here...And what part of ORACLE Database General Forum+ do you not understand that makes you ask Teradata questions here?
Teradata is not Oracle. Oracle is not Teradata. Please use the correct forum for your subject matter.

Similar Messages

  • Need Help in creating Unix Shell Script for database

    Would be appreciable if some one can help in creating unix shell script for the Oracle DB 10,11g.
    Here is the condition which i want to implement.
    1. Create shell script to create the database with 10GB TB SPACE and 3 groups of redo log file(Each 300MB).
    2. Increase size of redolog file.
    3. Load sample schema.
    4. dump the schema.
    5. Create empty db (Script should check if db already exists and drop it in this case).
    6. Create backup using rman.
    7. restore backup which you have backed up.

    This isn't much of a "code-sharing" site but a "knowledge-sharing" site.  Code posted me may be from a questioner who has a problem / issue / error with his code.   But we don't generally see people writing entire scripts as responses to such questions as yours.  There may be other sites where you can get coding done "for free".
    What you could do is to write some of the code and test it and, if and when it fails / errors, post it for members to make suggestions.
    But the expectation here is for you to write your own code.
    Hemant K Chitale

  • Calling UNIX shell script from ODI package?

    Hi,
    How Can we call UNIX shell script from ODI package?
    I have a ftp_ss.sh script which which ftps a file from remote server to local server, archives the last file and renames new file to the standard (ie file data store)name.
    I want to run the above script and interfaces from a package.
    Any help is greately appreciated.
    Thanks,
    RD

    In the package window, put "OS Command" from the toolbox.
    Provide the command parameters to this tool in form of "/path/to/script/ftp_ss.sh"

  • Want to create unix shell script for  Clone procedure in 11i and r12

    Want to create unix shell script for Clone procedure in 11i and r12 .Can anyone help me on this as I m new to oracle apps and scripting.
    Thanks in advance .

    user11958935 wrote:
    Thanks but I want it for application cloning ie adcfgclone and autoconfig etc .Please see old threads for similar topic/discussion.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+Rapid+AND+Clone&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+AutoConfig&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Call Unix Shell Script From OBIEE

    Hi All,
    Is it possible to do a call to a Unix Shell Script with the Action Framework from OBIEE.
    Thanks in Advance

    I dont think so but we can go for it instead of BI side. Try to port the same functionality on shell script side, so that the script can identify your report using tail of nqquery log and execute the rest of your lines in shell script.
    This can doable and works as expected. If at all you are going with my suggestion you can go for a small key word to identify your report instead of that lengthy logical query.
    Pls mark if helps

  • User defined workflow calling unix shell script

    Hi
    I have defined a workflow in OWB 10GR2 which calles a user defined object before calling the actual mapping.
    The user defined object calls a unix shell script which sets things right in the shell before the mapping can run.
    When executing the shell script from a unix shell myself it does exactly what I want
    However if I call the same script from workflow it does not recognize any of the commands not even internal shell commands like ls, touch.
    I've created a small test.sh script
    #! /bin/bash
    ls -l > listing.txt
    Created a flow with a user_defined object of which property is set:
    COMMAND.Value /home/oracle/test.sh
    If I then deploy and start the flow get the following:
    PF_WEB_00:TEST Success
    /home/oracle/test.sh: line 2: ls: command not found
    Anyone has any clue why this is or what I'm doing wrong?
    Geert

    Hi Lew,
    Thanks for the reply.
    This basically confirms what I've figured out so far.
    I noticed I was able to get my script running by using absolute paths everywhere, after which my only problem was it could not resolve the TNS.
    To bypass this I ended up copying all the path settings out of the .profile of my oracle user into my script after which the script ran fine.
    At least now I know for sure what's causing it and that by making my scripts a bit more extensive then usual I can do what I please :)
    Geert

  • Calling Unix shell script from PL/sql code

    Hi
    I need to call a shell script from a procdeure which i need to run in toad. Let me kno whow can i do that and connect to unix box with an example.

    Thanks Avinash,
    That on was very useful.
    When I try to execute I got the following error.
    Could you let me now What privileges are required?
    SQL> BEGIN
    dbms_scheduler.create_job(job_name => 'myjob',
    job_type => 'executable',
    job_action => '/home/rananto/a.sh',
    enabled => TRUE,
    auto_drop => TRUE);
    END;
    / 2 3 4 5 6 7 8
    BEGIN
    ERROR at line 1:
    ORA-27486: insufficient privileges
    ORA-06512: at "SYS.DBMS_ISCHED", line 99
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 262
    ORA-06512: at line 2
    SQL> exec dbms_scheduler.run_job('myjob');
    BEGIN dbms_scheduler.run_job('myjob'); END;
    ERROR at line 1:
    ORA-27475: "CRDM.MYJOB" must be a job
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at line 1

  • Can i call unix shell script from B2B callout.

    Hi,
    We had a requirement to invoke a unix shell script from B2B callout implemented class. Here is the code in implementation class:
    public void execute(CalloutContext context,List input,List output)
    throws CalloutDomainException, CalloutSystemException {
    try {
    CalloutMessage cmIn = (CalloutMessage)input.get(0);
    FileOutputStream fos = null;
    String inputFile = "/home/orasoad/digitalsign/input/test.txt";
    String outputFile = "/home/orasoad/digitalsign/output/test.txt.gpg";
    File outFile = new File(inputFile);
    String str =cmIn.getBodyAsString();
    fos = new FileOutputStream(outFile);
    Writer out = new OutputStreamWriter(fos);
    out.write(str);
    out.close();
    String shellFile = "/home/orasoad/digitalsign/dg.sh";
    String cmd[] = new String[] { shellFile, inputFile, outputFile };
    Runtime rt = Runtime.getRuntime();
    Process pr = rt.exec(cmd);
    int i = pr.waitFor();
    BufferedReader br = new BufferedReader(new InputStreamReader(pr.getInputStream()));
    StringBuffer sb = new StringBuffer();
    String line;
    while ((line = br.readLine()) != null) {              
    sb.append(line);
    CalloutMessage cmOut = new CalloutMessage(sb.toString());
    output.add(cmOut);
    } catch (Exception e) {
    throw new CalloutDomainException(e);
    We were able to execute the unix shell script from standalone java class with same code. But some how it is not working as expected while invoking the B2B java callout.
    Is it possible to invoke unix shell script from B2B callout?
    Please give inputs.
    Regards,

    Though it's not a good idea to invoke shell scripts from java callout but technically it will work.
    But some how it is not working as expected while invoking the B2B java callout.What is not working as expected? Any error in the log (server-diagnostic.log or server.out)?
    Regards,
    Anuj

  • Calling unix shell script from oracle stored procedure.. urgent!!!!!!!!!!!!

    Hi,
    i havea requirement where in i should be able to call my shell script through oracle stored procedure.i tried the following way..but iam unable to get the result.please find the details below.
    new.sh - my shell script - lctfile (LCTFILE) is the input pa
    v_config_file=`find $FND_TOP -name LCTFILE
    FNDLOAD apps/s0ccer@$dxbs1 0 Y DOWNLOAD $v_config_file /home/bir4163/RPT33/bin/menu.ldt MENU MENU_NAME='AR_NAVIGATE_GUI'
    if [ $? != 0 ];then
    echo "$DATE $0 FNDLOAD DOWNLOAD Failed!" | tee -a $LOG_FILE
    else
    echo "SUCCESS" | tee -a $LOG_FILE
    fi
    CREATE OR REPLACE PROCEDURE test_dbms_scheduler
    AS
    v_text VARCHAR2 (255) := 'AR_NAVIGATE_GUI';
    BEGIN
    DBMS_OUTPUT.put_line ('I am in Procedure');
    DBMS_SCHEDULER.create_job (
    job_name => 'test_dbms_scheduler',
    job_action => '/home/bir4163/RPT33/bin/new.sh',
    number_of_arguments => 1,
    job_type => 'executable',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=SECONDLY; INTERVAL=1',
    enabled => FALSE,
    auto_drop => FALSE,
    comments => 'run shell script'
    DBMS_SCHEDULER.set_job_argument_value (job_name => 'test_dbms_scheduler',
    argument_position => 1,
    argument_value => v_text);
    DBMS_SCHEDULER.enable ('test_dbms_scheduler');
    DBMS_OUTPUT.put_line ('I am back in Procedure');
    EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line (SQLCODE || SQLERRM);
    END;
    But iam unable to test it as i do not have permissions to access dbms_scheduler.can anybody tell me how to solve this using DBMS_PIPE with a sample code.
    please do help its very urgent
    thanks
    ramya

    Hi,
    Register your Shell Script as a concurrent program, Executable execution method "Host", then use fnd_request.submit_request to submit the program.
    Regards,
    Andries

  • Process Flow - User Defined object calling Unix Shell script not working

    Hi, I have a User Defined Object in a Process Flow with the following parameters :-
    Command: /usr/bin/ksh
    Parameter List:
    Result Code:
    Script: cd /shell_scripts
    ./dwh_get_datafile.sh param1 param2 param3
    Success Threshold: 0
    The script executes but it does not correctly interpret all the Unix commands within it e.g command such as FTP, DATE, GREP etc.
    In the job details I can see :-
    ./dwh_get_datafile.sh: date: not found
    ./dwh_get_datafile.sh: ftp: not found
    ./dwh_get_datafile.sh: grep: not found
    ./dwh_get_datafile.sh: rm: not found
    ./dwh_get_datafile.sh: ls: not found
    ./dwh_get_datafile.sh: awk: not found
    Anyone know what I have done wrong ?
    The script runs fine when run as a Unix script while logged into Telnet.
    Thanks.
    Paul

    The shell script is executed by the oracle user in the unix environment so make sure that the directorie where you can find the unix commands exists in the path for the oracle user in .profile as you can se in my example below.
    PATH=$PATH:$ORACLE_HOME/bin:$OWBHOME/bin:/ASW/ora_script:/local/bstat:/usr/bin:/opt/bin:/usr/local/bin; export PATH
    /JZ

  • How can I call unix shell script from database using triggers

    Hi everyone,
    can anybody help me to solve my problem.
    we have one table and records are getting inserted into table.
    when the record is inserted with 'C',I need to fetch that record-id which is primary key and then by passing that id as an argument I need to execute a shell script which is there in Unix using triggers.
    please note DB and Scripts are in different servers.

    4159efc6-cffb-4496-bd1a-68859f6ce776 wrote:
    Hi everyone,
    can anybody help me to solve my problem.
    we have one table and records are getting inserted into table.
    when the record is inserted with 'C',I need to fetch that record-id which is primary key and then by passing that id as an argument I need to execute a shell script which is there in Unix using triggers.
    please note DB and Scripts are in different servers.
    PL/SQL can only interact with objects on the local DB Server.
    PL/SQL can initiate OS local script via any of the following mechanisms: EXTERNAL PROCEDURE, JAVA, DBMS_SCHEDULER
    The local script then will need to launch the remote script.

  • Calling unix shell script from SAP

    Hi,
    1. i created command in SM69 as Zshell.
    2. i pass this command to FM SXPG_COMMAND_EXECUTE. it is working fine when the file is having read write execute permisson on unix level.
    but the problem is my unix administrator he don't want to give this permission. because of some security reason.
    he want's to execute with ROOT.
    anyone knows how i can handle this situation?
    if the file is doesnot have read write execute permission, then FM give permission error.
    Thanks.

    could i pass like this.
    my script name is ZRECOVERY_RPT.
    p_comm = ZRECOVERY_RPT.
    in the function module i passed like this.
    CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
      EXPORTING
        commandname                         = p_comm
      ADDITIONAL_PARAMETERS               =
        OPERATINGSYSTEM                     = SY-OPSYS
        TARGETSYSTEM                        = p_host
      DESTINATION                         =
       STDOUT                              = 'X'
       STDERR                              = 'X'
       TERMINATIONWAIT                     = 'X'
      TRACE                               =
      DIALOG                              =
    IMPORTING
      STATUS                              =
      EXITCODE                            =
    TABLES
       EXEC_PROTOCOL                       = it_exec_pro
    EXCEPTIONS
       NO_PERMISSION                       = 1
       COMMAND_NOT_FOUND                   = 2
       PARAMETERS_TOO_LONG                 = 3
       SECURITY_RISK                       = 4
       WRONG_CHECK_CALL_INTERFACE          = 5
       PROGRAM_START_ERROR                 = 6
       PROGRAM_TERMINATION_ERROR           = 7
       X_ERROR                             = 8
       PARAMETER_EXPECTED                  = 9
       TOO_MANY_PARAMETERS                 = 10
       ILLEGAL_COMMAND                     = 11
       WRONG_ASYNCHRONOUS_PARAMETERS       = 12
       CANT_ENQ_TBTCO_ENTRY                = 13
       JOBCOUNT_GENERATION_ERROR           = 14
       OTHERS                              = 15
    IF sy-subrc EQ 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    how i can pass along with SH.

  • Need Example on calling a unix shell script from oracle stored procedure

    Hi
    Can anybody give example on how to call unix shell script from an Oracle stored procedure. Please give a small example on how to do this .I need this urgently please.
    Have a nice time.
    Thanks & Regards
    Jogesh

    If you are on 10g you can also use DBMS_SCHEDULER. See Re: Excute Unix command Using PL SQL

  • Java exec() of UNIX shell script

    I have a java application that uses:
    p = Runtime.getRuntime().exec( cmdLine);
    to execute a UNIX shell script, for example:
    #!/bin/ksh
    . /export/pc112477/freeware/work1/wsEnv
    export PATH=/opt/sfw/bin:/usr/ccs/bin:/usr/bin:/usr/ucb:$PATH
    cd /export/pc112477/freeware/work1/usr/src/pkgdefs/SFWnmap
    /usr/ccs/bin/make -e ROOT=$ROOT install
    RESULT=$?
    if [ $RESULT = 0 ]
    then
    echo "Package source"
    cd /export/pc112477/freeware/work1/usr/src/pkgdefs/SFWnmapS
    /usr/ccs/bin/make -e ROOT=$ROOT install
    RESULT=$?
    fi
    exit $RESULT
    Some times the running of the script locks up depending on how much work the script has to, eg. if the make calls pkgmk for a small package it runs okay but if its a large package it locks up in pkgmk.
    The script itself works okay if run directly
    Does anyone have any ideas on why this locks up and how I could stop it doing it.
    Thanks

    For anyone who stumbles across this and needs an answer:
    To empty the standard error and output, you need to use getErrorStream() and getInputStream() on the Process object created when you execed your command. Create new InputStreamReaders with the streams from the process, then wrap those with BufferedReaders and read each line with a while loop. This is the basic thing you need to do:
    try{
    Process proc = Runtime.getRuntime().exec(command);
    InputStreamReader isr = new InputStreamReader(proc.getErrorStream());
    BufferedReader errReader = new BufferedReader(isr);
    String line;
    while((line = errReader.readLine()) != null)
    <do something with each line of error>
    } //end try
    catch(<errors>) {
    <do something with errors>
    } //end catch
    What you really should do is put the stream handling in a separate class that extends Thread, create an instance for the error and output streams, and start each one. There is a class called StreamGobbler that does this sort of thing. Look at http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html to find out more about it and read a detailed explanation of different problems with exec().

  • Please provide me unix shell script (export and import of database schema)

    please i am new in unix
    \please give me sample unix shell script (export and import of database schema)

    please i am new in unix
    \please give me sample unix shell script (export and import of database schema)Instead of providing you the readymade unix shell script for your requirement, I will give you the hints to prepare the same at your own.
    Create a file with .sh extension.
    # Specify and set all required Environment variables.
    ORACLE_HOME, PATH, NLS_LANG, etc.,
    # Use the export command with all clauses
    export scott/tiger@orcl file=scott.dmp log=scott_emp.log
    # Compress it.
    compress scott.dmp
    Refer any unix/linux documents for scripting basics.
    http://www.bijoos.com/ora7/oracle_unix.htm
    Regards,
    Sabdar Syed.

Maybe you are looking for

  • Flatten family hierarchy to level 2, level 3, level 4 across

    For example....                      Family Hierarchy                       Grandma 1                               Mom 1                                  daughter 1                                     Grand daughter 1                                

  • SPD 2010 - ID Column moves to end of List in DataSheet View

    Randomly, the ID column will move from the first column to the last column when you access DataSheet view. In Standard View it is still column 1.... We are using this ID Column: ID# (linked to item with edit menu) Other times this ID Column will add

  • I want to change my email address in itunes?

    How do I CHANGE MY EMIAL ADDRESS IN ITUNES FOR ON MY IMAC?

  • Error : ORA-32001 & ORA-02095 occurs when trying to alter audit_trial

    Hi All, I am trying to alter the audit_trial parameter to 'db,extended' as need to log SQLTEXT and SQLBIND into the SYS.AUD$. But when I tried to alter the system parameter it gives me the below error. Connected to Oracle Database 11g Release 11.2.0.

  • Error when publishing class diagram

    Hi I'm trying to publish a class diagram as a JPEG file and I'm getting the following Error: This exception should have been dealt with programatically. The current activity may fail and the system may have been left in an unstable state. The followi