Call the OBIEE Unix Shell Script

Hi all

Is it possible to make a call to a Unix Shell Script with the framework of the Action of OBIEE.

Thanks in advance

I don't think, but we can go for it instead side BI. Try to transfer the same features side shell script so that the script can identify your report using the tail of the log nqquery and execute the rest of your lines in shell script.

This can done and works as expected. If you identify your report instead of this long logical query at all with my suggestion that you can go for a little keyword.

Score pls help if

Tags: Business Intelligence

Similar Questions

  • Call the PL/SQL shell script

    Hi all

    I've seen several links and options for calling a PL/SQL shell script. I was wondering if there is something like DBMS_SCHEDULER. CREATE_PROGRAM-> executable that calls an external program in 11 GR 2.

    Here's what I have to. I have 11 GR 2 database with Dataguard. I have START triggering who begins a DBMS_SERVICE when the role becomes PRIMARY. In the same instance, I would stop the VIP on the former primary database and start the VIP on the new primary database.

    Thanks for the advice and assistance.

    Jan S.

    The URL below links to ask Tom. Inside, he talks about creating a Java procedure in your database that allows you to execute commands from the host OS (PL/SQL calls the proc of Java that runs the host command). There are several ways to run the OS commands, but this one is very flexible. I needed to use it for a task that I have who didn't fit one of the other methods very well.

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:no:P11_QUESTION_ID:3069633370832

  • How to validate SQL * MORE connection in Unix shell script

    I wrote the following function in unix shell script to validate SQL * MORE connection and throw a user-defined message.

    function check_db_conn

    {

    output | sqlplus-s-L $User/$Password@$SID >/dev/null

    If [[$?-no 0]]; then

    echo 'credentials incorrect DB.

    FI

    }

    However, I would like to change this feature so that the user has entered a good connection and that there is a problem with TNS listener must display the appropriate message.

    Hello

    Try adding:

    lsnrctl status $listener_name > /dev/null
    if [[ $? -ne 0 ]]; then
      echo "Issue with Listener"
    fi
    
  • Unable to see the serveroutput sql shell script

    Hello experts,

    I have a shell script that I use to call a pl/sql procedure.
    This proc write dbms_output.
    I would like the dbms_output in a capture file when calling sqlplus to my shell script.


    Here is the code:
    ===============================
    ECHO '.
    sqlplus apps / $APPS_PWD < < ENDOFSQL
    Set serveroutput ON
    Set feedback off
    set verify off
    set linesize 250
    set pagesize 250
    Start
    jdr_utils.listcustomizations('$I');
    end;
    /
    output
    ENDOFSQL
    "> > new.log"
    ===============================


    What I get in the "new.log" is given below:
    ===============================
    sqlplus apps/prj08app < < ENDOFSQL
    Set serveroutput ON
    Set feedback off
    set verify off
    set linesize 250
    set pagesize 250
    Start
    jdr_utils.listcustomizations('/Oracle/Apps/IRC/candidateSelfService/WebUI/VisVacDispPG');
    end;
    /
    output
    ===============================
    ENDOFSQL


    I want to get is the given procedure dbms_output.
    Please suggest.

    Thank you
    Vinod

    Shell?

    Your call to sqlplus is between double quotes. (In ksh, at least) who gets taken literally (after substitution of the variables). To run the chain and echo its output use a backtick (') instead of a double quotation mark ("")

    Published by: Brian Bontrager Sep 29, 2011 15:51

  • How2 validate the chain of connection in unix shell script

    I am writing a shell script unix which removes the instance user/passwd/user, form a connection string and pass it to sqlplus. Now, I want to validate if a valid/clean connection string was formed. Basically, I want to do something like below

    sqlplus-s $CONN_STR

    and disconnect if valid string and always disconnect and return to guest if it's not a string valid.

    Is there a clean way, I can check if the return has been after a successful login and how disconnect it in script and check if a string is not valid.

    Create a file name test.sql containing only the OUTPUT and use-L option to SQL * more (attempts to connect only once, instead of reprompting error.)

    D:\>sqlplus -L hr/ko@XE @test.sql
    
    SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 17 08:48:37 2010
    
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    
    ERROR:
    ORA-01017: invalid username/password; logon denied
    
    SP2-0751: Unable to connect to Oracle.  Exiting SQL*Plus
    
    D:\>echo %errorlevel%
    1
    
    D:\>sqlplus -L hr/hr@XE @test.sql
    
    SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 17 08:48:49 2010
    
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    
    D:\>echo %errorlevel%
    0
    
    D:\>sqlplus -L hr/hr@KO @test.sql
    
    SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 17 08:52:22 2010
    
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    
    SP2-0751: Unable to connect to Oracle.  Exiting SQL*Plus
    D:\>echo %errorlevel%
    1
    
  • Re: Unix shell script to notify if an array has reached a number of lines

    Looking to write a script to send an alert notification when an Oracle database table object reaches a certain value of line number. If anyone has the logic "If this while" for a script shell unix would be great.

    With the logic of control and check on the table when it reaches the total line number can be added to the script and on-demand via cron.

    Thank you.

    Thus, you must periodically (how often?) a COUNT (*) on the target table?  Is this acceptable overhead?

    /Korn Bourne shell scripts can compare numbers and check if one is greater than another.  See "-gt" UNIX - Shell basic operators

    Hemant K Collette

  • Get PLSQL stored procedure in unix shell script

    Hi Experts,

    I have a PLsql procedure with the specification below-

    PROCEDURE SEND_INV_VIA_EMAIL (p_pdf_file_name IN VARCHAR2, p_submitted_frm IN VARCHAR2);

    I can pass two parameters of SHELL script and it works fine-

    # By calling the PLSQL procedure

    sqlplus-s $APPS_USER < < EOSQL

    SET SERVEROUTPUT SIZE 1000000

    whenever sqlerror exit 1;

    run MOB_XMLPUB_ARCHIVE_ARINV_PCK.send_inv_via_email ("basename $DATA_FILE", "ARCHIVE");

    "exit";

    EOSQL

    But now I want to have an output in the plsql procedure parameter-

    PROCEDURE SEND_INV_VIA_EMAIL (p_pdf_file_name IN VARCHAR2, p_submitted_frm IN VARCHAR2, p_return_status IN OUT VARCHAR2);

    based on this I want to determine the concurrent request completion status since the shell script is called via the simultaneous program.

    How will pass parameter out of the shell and how do I use this parameter in the SHELL script to determine completion status?

    Thank you very much.

    Vikrant

    Something like this:

    # By calling the PLSQL procedure
    sqlplus-s $APPS_USER<>
    SET SERVEROUTPUT SIZE 1000000
    whenever sqlerror exit 1;
    declare
    rstatus varchar2 (100) - or however long, it must be
    Start
    MOB_XMLPUB_ARCHIVE_ARINV_PCK.send_inv_via_email ("basename $DATA_FILE", 'ARCHIVE', rstatus);
    dbms_output.put_line (' status = ' | rstatus);
    end;
    /
    "exit";
    EOSQL
    grep 'Return status =' somefile

  • Restart the OBIEE UNIX environment

    Hi all

    I'm new to obiee11g.please can share steps restart all services on Unix.
    now that my environment is running. Let me know that I need to stop first and which servers then stop.
    Yet once the servers I need to start.


    Thank you
    ANI

    Hello

    OBIEE 11 g on Enterprise install with BI managed suite and Weblogic admin server. Below are the start up and close the scripts and their sequences.

    The sequnces of departure is:

    Node Manager (console wls and EM, scripts located in WLS_HOME/bin)
    AdminServer (located under the domain/bi_foundation/bin scripts)
    BI Managed Server (located under the domain/bi_foundation/bin scripts)
    Process manager (Start all Services bi, scripts located in INSTANCE_HOME/bin, uses opmnctl - startall/status)

    The Scripts are:

    Node Manager: startNodeManager (cmd or sh)
    AdminServer: startWeblogic (cmd or sh)
    BI Managed Server: startManagedServer (cmd or sh)
    Process Manager: opmnctl startall

    Stop the sequence:
    Reverse order must be followed to stop Services.

    opmnctl stopall
    stopManagedServer (cmd or sh)
    stopWeblogic (cmd or sh)
    Node Manager: Stop nodemanager on unix directly kill the process. On windows fits as a service manager service single node.

    I hope this helps. Pls mark if he does.

    Thank you
    SVS

  • How to execute the pl/sql shell script

    Hi Experts


    I need to be able to call a pl/sql procedure shell script

    Linux and 11g

    I am new to java and followed the solution below
    The appeal of OS in Plsql commands

    After following the solution on top of link

    Declare
    x Varchar2 (2000);
    Begin
    x: = OSCommand_Run ('ls - the);
    -print x;
    DBMS_OUTPUT. Put_line (x);
    End;
    /

    give me output of 0 but the command is not executed.

    What must be changed or is there another solution?

    Thank you
    Archana

    See if that helps...

    [http://www.oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php]

  • DBMS_SCHEDULER - trying to create and run a UNIX shell script from Oracle

    How can I run Script Shell Unix from Oracle using DBMS_SCHEDULER?

    After reading many examples online, I finished the 3 steps below.
    Create program, create jobs, run task. On my 3rd stage, I get the following error.
    How can I make sure that the work was created?

    ORA-27475: "APPS. POSPAY_FILE_CHECK_JOB' must be work

    (1) create the program
    BEGIN
      dbms_scheduler.create_program(
         program_name => 'POSPAY_FILE_CHECK_PROG',
         program_type => 'EXECUTABLE',
         program_action => '/home/ldcgroup/ldccbc/POSPAY_USC2_CHECK.sh',
         number_of_arguments => 0,
         enabled => TRUE,
         comments => 'Test Program'
         );
    END;
    (2) create jobs
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
       job_name          =>  'POSPAY_CHECK_FILE_JOB',
       program_name      =>  'POSPAY_CHECK_FILE_PROG',
       enabled           =>   TRUE);
    END;
    /
    (3) the job (not calendar, I'll run this a concurrent request of EBS)
    BEGIN
       DBMS_SCHEDULER.run_job (
         job_name => 'POSPAY_FILE_CHECK_JOB');
    END;
    /

    Of [documentation | http://download.oracle.com/docs/cd/E11882_01/server.112/e10595/scheduse002.htm#i1009668]

    The job is created disabled. You must enable it with DBMS_SCHEDULER.ENABLE before the Scheduler will automatically run it.
    
    Jobs are set to be automatically dropped by default after they complete. Setting the auto_drop attribute to FALSE causes the job to persist.
    
  • Call the SQL of a script problem

    Hello
    I have a script for example query.sh:
    #! / bin/sh
    sqlplus-s ${ORACLE_USER} < < HIC
    set the position
    NewPage set to none

    SELECT 'ALTER TABLE' |' TEST_TABLE' | 'ADD PARTITION' |' P' | To_char (trunc (sysdate + 7), "IYYY"). » W'|| To_char (trunc (sysdate + 7), 'IW') | ' VALUES LESS (TO_DATE('''||) To_char (sysdate + 14, 'YYYYMMDD') | " ((', "YYYYMMDD")); "FROM DUAL;
    output
    HIC

    This will actually give me: ALTER TABLE TEST_TABLE add PARTITION P2010W46 VALUES LESS THAN (TO_DATE('20101122','yyyymmdd'));

    I'll do this output of the second script. for example create_part.sh

    #! / bin/sh

    SQL='/home/Bill/scripts/query.sh'

    sqlplus ${ORACLE_USER} < < EOF
    Set serveroutput size 1000000
    set the position

    $SQL

    output
    FO %


    When I run the 2nd script I get:

    SQL > SQL > SQL > SQL 2 > ALTER TABLE test_table add a SCORE from P2010W46 LESS THAN VALUES (TO_DATE ('20101122 ',' yyy))
    *
    ERROR on line 1:
    ORA-01861: literal does not match the format string

    I suspect that the output of the 1st script encapsulates a second line, and it defective runs correctly.

    East of Oracle 9i

    Please suggest a way to overcome this problem.

    Thank you in advance.

    In the first script, add the VALUE LINESIZE 1000

  • sqlplus from a shell script with the variable in unix

    I'm having some trouble calling sqlplus from a shell script... I am basically asking for a path/name of file which I attribute to one to a variable called $code. Then use cp to move the file ($code) to a new directory. I think that there is something wrong with my sqlplus below. echo $code does not work yet. I thought that $code was variable, which I could see, but rather it seems that the script is trying to rerun the SQL command each time.

    Any help would be greatly appreciated... condensed version of the code is below. Thank you!

    file in $FILES
    do
    Code =""
    code ='sqlplus-s $USER_PWD < < EOF
    Set the off position;
    set pagesize 0;
    Select r.outfile_name OUTFILE
    some paintings
    where file_name = $file;
    EXPRESSIONS OF FOLKLORE"
    echo $code
    CP $code $newdir

    Hello

    I hope code below will help but set feedback off so that he won't be any info if no line selected

    echo ${CODE}
    if [ -z "${CODE}" ]
    then
    echo "No rows returned"
    else
    echo "Returned"
    fi
    

    Concerning
    CA
    uninstall security tool
    essential elements of the Security window
    Windows startup configuration
    the Award bios update

  • Calling shell script program SQL and passing parameters

    Hi guys,.
    Greetings from Toronto. Is it possible to move one or more strings as parameters to a sql from shell script program?

    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, this is not something I have to solve that minute. Any help would be appreciated
    and I will think of the problem.

    Thank you
    REDA

    Published by: Raj404261 on June 25, 2009 11:40

    Published by: Raj404261 on June 25, 2009 17:29

    OK, just a few pointers possible if you need to go the way of shell script.

    I suggest that you have a separate SQL script for each of your options, which retains the fairly well-defined lines and keeps the maintenance as simple as possible. Therefore, in your shell script, you can have something like:

    #!/bin/ksh
    # Accept system input parameters
    p_user_id=$1
    p_job_id=$2
    
    # Deduce which script you'll call here
    # using if statements, or even a case:
    
    if [[ p_job_id -eq 1 ]]
    then
      SQL_SCRIPT=sql_script1.sql
    else
      SQL_SCRIPT=sql_script2.sql
    fi
    
    # Or using case
    
    case $2
      in
        1)     SQL_SCRIPT=sql_script1.sql;
    
        2)     SQL_SCRIPT=sql_script2.sql;
    
        3)     SQL_SCRIPT=sql_script3.sql;
    
        *)     SQL_SCRIPT=sql_script4.sql;
    esac
    
    export ${SQL_SCRIPT}
    
    #If you need to query the database at all to deduce which script to cal
    #Then something like this:
    
    SCRIPT_VAR=`sqlplus -s username/password << EOF
    set heading off
    set feedback off
    set verify off
    SELECT * FROM DUAL;
    EOF`
    
    export {SCRIPT_VAR}
    
    SQL_SCRIPT=sql_script${SCRIPT_VAR}.sql
    
    # Then just call your script:
    sqlplus. -s $p_user_id/password @${SQL_SCRIPT}
    
  • Pass the Shell script variable to the plsql block

    Hello
    I have a shell script and pass the parameter of Shell script in a PLSQL block, I use the code but impossible to get any result, below
    Can someone help me with this issue?

    Shell script: test.sh


    * #! / bin/sh *.

    var1 = $1

    SQLPLUS = 'sqlplus-s ".
    Login = "gmisowner/gmisowner1".

    day ='$SQLPLUS $LOGON < < ++
    set the position
    Set feedback off

    Start
    select count () from mis_ref_codes where ref_description = & var1; *

    end;

    "exit";
    ++`

    echo $day

    Execution at the command prompt: >./test.sh Underline
    returns nothing

    1. I was hoping the count (*) in the number of lines in him select statement is stored in the day, but nothing returned as output of the plsql block
    the select statement above is an example, but I'll have to run a much larger plsql block

    I have syntactically doing something wrong? Please suggest

    Published by: Camilla January 14, 2012 12:35

    First of all you needget get rid of anonymous PL/SQL block:

    var1=$1
    
    SQLPLUS="sqlplus -s"
    LOGON="gmisowner/gmisowner1"
    
    day=`$SQLPLUS $LOGON <<++
    set heading off
    set feedback off
    select count(*) from mis_ref_codes where ref_description=&var1;
    exit;
    ++`
    echo $day
    

    But it still does not work. Your SQL * more script a proxy & var1. It has nothing to do with shel environment variable var1. That is why SQL * PLus prompts you to enter the value just after she readings

    Select count (*) in the mis_ref_codes where ref_description = &var1;

    And since you redirected input to your script, you must put value of var1, which isn't what you want, right? So what you need is:

    dev > # I'll set $1 to X
    dev > set X
    dev > var1 = $1
    dev > SQLPLUS = 'sqlplus-s ".
    dev > login = ' / '.
    dev > ='$SQLPLUS $LOGON < < EOF
    > set position
    > leave your comments
    > set verify off
    > select ' Have a nice day! "twice where dummy ="$var1 ";
    > "exit";
    > EOF'
    dev > echo $day
    Good day!
    dev >

    SY.

    Published by: Solomon Yakobson on 13 January 2012 15:17

  • Exports (from shell script) without password given explicitly in the script

    Hi all
    I have Oracle 10g 2 on SLES 10 64-bit. I would like to export the database using shell scripts data pump. Is there a method to hide the password in the script file.

    Currently to be done by the command:

    expdp system/password@database...

    If any user who see the script will know the Passover.

    Concerning

    Groxy

    Hello

    Have you thought about the feature ' Secure external password store "which was added in 10 gr 2? It uses the Oracle Wallet to store a database_alias with the name of user and password credentials in an encrypted format. You can then enter your order expdp like this:

    expdp / @database_alias...

    Take a look at the security of 10gr 2 Guide. There is a chapter on how to put in place.

    John

Maybe you are looking for

  • Need a new adapter for Tecra A2 - who is compatible?

    Help, please! My adapter stopped working and the serial number was PA3282U-1ACA. A card with the serial number PA3083U-1ACA will work with my laptop? What other compatible adapters are there? Thank you

  • Display (LED display)

    Perhaps someone knows if exist in Labview and addons that will show you the result (as meters) on LED screen as shown in picture... Thank you

  • Change of FG and background color of the individual elements in the array

    Is it possible to change the color of foreground and background of the individual elements of the array? According to the the link below it is not.  But that was 4 years ago and I wonder if it's possible with the new version of Labview. http://forums

  • file transfer is not possible via bluetooth

    Mr President. I can't transfer files from my phones android for my computer sony vaio notebook. I get a message saying... remote device rejected..., on my phone. But the transfer of files from laptop to phone works. Any help on this will be appreciat

  • ContentDescriptor do not accept the pcm?

    Hi all I have the following strange situation: I created player with Datasource to receive the RtpPacket byte array and play with blackberry player. However, to implement this I use SourceStream who must have a few ContentDescriptor: public class Rec