Fire OMB Plus commands from PL/SQL

Hi all,
does anyone know if it is possible to fire OMB Plus commands from PL/SQL procedures?
I can imagine that there might be a PL/SQL package in the repository owner schema that accepts OMB Plus commands as strings...or something similar...
Thanks,
Elio

Hi Elio
I don't know about any existing package that could do that.
What I'd suggest is to build a stored procedure/function/package that could do that. Or even, execute OMB Scripts in the host from a pl/sql program.
Good luck.
Regards,
Marcos

Similar Messages

  • How to issue a SQL*Plus command from PL/SQL program?

    Thanks.

    You can't issue a SQL*PLus command from a PL/SQL program. If you can tell us more about what you are trying to do, perhaps we can offer a substitute.

  • Running a SQL*Plus command from Java

    I have a requirement to run SQL* Plus commands from Java. The results as they would appear in SQL*Plus window or spool file should be captured and stored in a table.
    For example,
    SQL> select * from dual;
    D
    X
    1 row selected;
    SQL>
    All the lines above should be stored for later use.
    Could any one give pointers?
    Thanks,
    Ravi

    <p>
    Hi,
    </p>
    <p>
    <strong><font face="Courier New">
    public class RuntimeExecApp {
     public static void main(String args[]) throws IOException
      Runtime r = Runtime.getRuntime();
      r.exec(&quot;C:\\Oracle\\sqlplus.exe&quot;);
    }</font></strong>
    </p>
    <p>
    Kuba 
    </p>
    Message was edited by:
    KUBA

  • Running sqlldr command from PL/SQL Block

    DECLARE
    BEGIN
    END;

    In SQL * plus we can run DOS commands using the following command
    HOST DIR
    HOST DIR/P
    But When we can't run the HOST command in PL/SQL Block..
    I have to Run sqlldr command from PL/SQL Block..
    i tried as follows
    DECLARE
    BEGIN
    EXECUTE IMMEDIATE ' host sqlldr control= bad= ';
    END;
    By
    BalaNagaRaju

  • What is the diffrence between OMB plus command and OMB command

    what is the diffrence between OMB plus command and OMB command?
    are they both TCL command?

    Hi Alena,
    Welcome to SDN.
    Check this
    EXIT in Loops and Modularization Units
    Basic form
    EXIT.
    Effect
    Within a loop structure:
    Terminates looop processing (DO, WHILE, LOOP, SELECT).
    Within subroutines and other modularization units (but not in a loop structure):
    Leaves the subroutine or modularization unit (FORM, MODULE, FUNCTION, TOP-OF-PAGE, END-OF-PAGE).
    Outside loop structures and modularization units (report processing):
    Terminates report processing and triggers list display.
    But not sure about
    atexit() .. ,may use in Object Oriented Programming.
    (C++)
    "At exit-command in module pool."
    Mohinder
    Edited by: Mohinder Singh Chauhan on Aug 1, 2008 8:06 AM

  • O/s commands from PL/SQL

    hi all..
    i want to execute operating system commands from PL/SQL..
    particulary imp command....
    i have used the f/wg approach but while i execute the imp command it does not responds me any output..
    I have to kill the process from o/s.
    prodn is my user
    --AS SYS user
    begin
    dbms_java.grant_permission( 'PRODN',
    'SYS:java.io.FilePermission',
    '/oracle/product/9.2.0/bin/imp',
    'execute' );
    dbms_java.grant_permission
    ('PRODN',
    'java.lang.RuntimePermission',
    'writeFileDescriptor' );
    end;
    ---------------------------------AS PRODN user
    create or replace and compile
    java source named "Util"
    as
    import java.io.*;
    import java.lang.*;
    public class Util extends Object
    public static int RunThis(String args)
    Runtime rt = Runtime.getRuntime();
    int rc = -1;
    try
    Process p = rt.exec(args);
    int bufSize = 4096;
    BufferedInputStream bis = new BufferedInputStream(p.getInputStream(),
    bufSize);
    int len;
    byte buffer[] = new byte[bufSize];
    // Echo back what the program spit out
    while ((len = bis.read(buffer, 0, bufSize)) != -1)
    System.out.write(buffer, 0, len);
    rc = p.waitFor();
    catch (Exception e)
    e.printStackTrace();
    rc = -1;
    finally
    return rc;
    create or replace
    function RUN_CMD(p_cmd in varchar2) return number
    as
    language java
    name 'Util.RunThis(java.lang.String) return integer';
    create or replace procedure RC(p_cmd in varchar2)
    as
    x number;
    begin
    x := run_cmd(p_cmd);
    end;
    i executed the command as follows in sql>
    BEGIN
    rc('/oracle/product/9.2.0/bin/imp tim/tim file=/home/oracle/vas4359.dmp log
    =log1.log');
    END;
    it runs fine creates log1.log in / home/oracle but there is no output in
    log1.log file.
    I have to kill the process as follows after which sql> displays me :
    "PL/SQL procedure successfully completed."
    [oracle@msebdb oracle]$ ps aux|grep imp
    oracle 20052 0.0 0.2 12732 4328 ? S 11:57 0:00 /oracle/product/
    .2.0/bin/imp file=/home/oracle/vas4359.dmp log=log1.log
    oracle 20102 0.0 0.0 3692 652 pts/2 S 12:03 0:00 grep imp
    Note:There is no tim user.. i just want to get error in my log file..
    my further steps are to read this log file and send email/notifications to users.
    my main program is as f/ws:
    /*imp and check log file*/
    create or replace procedure abc
    as
    v_exists boolean;
    v_exists_log boolean;
    ex_open BOOLEAN;
    flen NUMBER;
    bsize NUMBER;
    vInHandle_open utl_file.file_type;
    vInHandle_open_log utl_file.file_type;
    v_filelog utl_file.file_type;
    v_fl utl_file.file_type;
    v_pth varchar2(60);
    v_fnm varchar2(60);
    v_file_exists varchar2(60);
    v_logline varchar2(30) ;
    v_search varchar2(30) :='ORA-';
    vNewLine VARCHAR2(32767);
    cursor c_fname is
    select full_pth ,f_name from upld_file_t where f_name in
    (select f_name from tbl_file_nm where typ_file='D' AND DEL_FLG='N');
    BEGIN
    for v_sec in c_fname
    loop
    utl_file.fgetattr(LOCATION=>'ORALOAD',
    FILENAME=>v_sec.f_name,
    FEXISTS=>v_exists,
    FILE_LENGTH=> flen,
    BLOCK_SIZE=>bsize);
    if v_exists
    THEN
    dbms_output.put_line('File Exists' || v_sec.f_name);
    v_file_exists:=v_sec.f_name;
    --dbms_output.put_line('v_file_exists ' || v_file_exists);
    dbms_output.put_line('File Length: ' || TO_CHAR(flen));
    dbms_output.put_line('Block Size: ' || TO_CHAR(bsize));
    dbms_output.put_line(' before file open');
    vInHandle_open := utl_file.fopen('ORALOAD',v_sec.f_name,'R',32767);
    -- dbms_output.put_line(' after file open');
    -- do whater with teh file data
    v_fl:=utl_file.fopen('ORALOAD','v_sec.f_name','W');
    dbms_output.put_line('v_sec.f_name');
    IF utl_file.is_open(vInHandle_open)
    THEN
    /*if log file exists..*/
    utl_file.fgetattr(LOCATION=>'ORALOAD',
    FILENAME=>v_sec.f_name||'.log',
    FEXISTS=>v_exists_log,
    FILE_LENGTH=> flen,
    BLOCK_SIZE=>bsize);
    if v_exists_log
    then
    dbms_output.put_line('file' ||v_sec.f_name||'.log');
    v_filelog :=utl_file.fopen('ORALOAD',v_sec.f_name||'.log','W',32767);
    LOOP
    BEGIN
    UTL_FILE.PUT(v_filelog,'ORA-');
    exit;
    END;
    END LOOP;
    else
    dbms_output.put_line('File not found' || v_sec.f_name);
    END IF;
    UTL_FILE.fclose(v_filelog);
    dbms_output.put_line('Closed File ' || v_sec.f_name|| '.log');
    END IF;
    /*imp THE FILE and read log file*/
    utl_file.fgetattr(LOCATION=>'ORALOAD',
    FILENAME=>v_sec.f_name||'.log',
    FEXISTS=>v_exists_log,
    FILE_LENGTH=> flen,
    BLOCK_SIZE=>bsize);
    if v_exists_log
    then
    dbms_output.put_line('file' ||v_sec.f_name||'.log');
    v_filelog :=utl_file.fopen('ORALOAD',v_sec.f_name||'.log','R',32767);
    LOOP
    BEGIN
    UTL_FILE.get_line(v_filelog,v_logline);
    if v_logline = v_search then
    dbms_output.put_line(v_logline);
    end if;
    UTL_FILE.fclose(v_filelog);
    dbms_output.put_line('Closed File ' || v_sec.f_name|| '.log');
    exit;
    END;
    END LOOP;
    else
    dbms_output.put_line('File not found' || v_sec.f_name);
    END IF;
    END IF;
    END LOOP;
    --close the curosr .. check this
    EXCEPTION
    WHEN UTL_FILE.ACCESS_DENIED THEN
    DBMS_OUTPUT.PUT_LINE('No Access!!!');
    when others then
    dbms_output.put_line('ERROR (open_file) => '||sqlcode);
    dbms_output.put_line('MSG (open_file) => '||sqlerrm);
    end;

    Hi,
    You might have better luck in the PL/SQL or Java forums. They are located here:
    PL/SQL: PL/SQL
    Java: http://forums.oracle.com/forums/forum.jsp?forum=99
    Good luck,
    Mark

  • Run OS command from Pl/SQL

    Is there any way to execute an OS command from pl/sql other than using dbms_pipe & pro*C combo. I have done this way before but it seems there is built-in oracle package which can do this in 8/8i.
    Also HOST command in forms will execute the OS coomand from the clinet. Is there any way to execute the OS command on the server from the forms clinet?
    thanks,
    Ravi.
    null

    Ravi,
    Can you send me an example how one can
    execute a this command from a PL/SQL
    program 'sed 3q /etc/passwd'.
    Please write to me at
    [email protected]
    thanks
    Pramod

  • Calling Operating System Commands from PL/SQL using java

    Calling Operating System Commands from PL/SQL - The Java Way
    wlth help of given thread link,
    Calling OS Commands from Plsql
    but i had user privilege problem
    Declare
    x Varchar2(2000);
    Begin
    x := OSCommand_Run('/tmp/sri/GROUP_ho.sh');
    DBMS_OUTPUT.Put_Line(x);
    End;
    o/p;
    can't exec: /tmp/sri/GROUP_ho.sh lacks user privilege
    i done the grant privillage also
    part
    dbms_java.grant_permission('abcd', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    dbms_java.grant_permission('abcd', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    dbms_java.grant_permission('
    abcd', 'SYS:java.io.FilePermission','<<ALL FILES>>', 'execute');
    again
    get
    can't exec: /tmp/sri/GROUP_ho.sh lacks user privilege
    same error;

    Process management at the OS level should prevent execution continuing in the calling code until the command has completed (either successfully or with error).
    If the low level java code were to spawn child process threads then execution could continue, but I'm guessing the Java function your talking about doesn't do that and just calls the operating system to execute the command and waits for the returning code to come back.

  • How to: execute operating system commands from PL/SQL

    System: IBM pSeries AIX
    Oracle: 11g Enterprise
    Is there a quick way to execute operating system commands from PL/SQL?
    Without creating a JAVA class....
    I need to execute a Loader script.
    I want to do this from within PL/SQL.
    I need to to do 4 things.
    Three require SQL scripts.
    The fourth is SQL*Loader.
    The usual way is with a UNIX script calling 3 SQL scripts and one Loader control file.
    Is there way to do all this from within ONE PL/SQL SCRIPT ??
    Just let me know.

    Is there a quick way to execute operating system commands from PL/SQL?
    NO
    Without creating a JAVA class....
    I need to execute a Loader script.
    I want to do this from within PL/SQL.
    WHY ON EARTH, such action will create a new connection and become a resource hog?
    I need to to do 4 things.
    Three require SQL scripts.
    The fourth is SQL*Loader.
    The usual way is with a UNIX script calling 3 SQL scripts and one Loader control file.
    Which is perfect for the purpose.
    Is there way to do all this from within ONE PL/SQL SCRIPT ??
    Just let me know.
    NO, there is NOT. Nor should there be. Why create unstable ineffcient Mickey Mouse systems, glued together by hacking?
    Sybrand Bakker
    Senior Oracle DBA

  • OMB*Plus Command for Maintain/Add/Remove Experts in Context and Tools Menue

    Hi there,
    does anybody know how to maintain Experts in the Context- and Tools-Menue by OMB-Commands?
    The problem ist, that I transfer Experts into another workspace via OMBEXPORT/OMBIMPORT,
    and I would like to maintain the menues in my batch-script.
    Can't find anything in the docu about this.
    Thanks in advance.
    Andreas

    Hi David,
    thank you very much for the quick and correct answer.
    Just a few more questions about this.
    Now, as I know the answer, I found it in the documentation as well.
    But I allways find it very hard to find anything in the OMB*Plus Command Reference . And also with the description of the OMBMENU command: Why is there no description about the parameters in the reference? Where is the list of valid object types, and where is the description of the "QUOTED_STRING" (NEW, OPEN)?
    This command is just an example for the, in my opinion, really poor quality of the OWB*Plus Command Reference.
    Is there any underlaying reason for this that I do not understand, or is there a special strategy to work with this document, or do I just need more practice?
    The answers to this questions would be very helpfull for me, but also for my customer, where we start to implement a quite big DWH on OWB basis.
    Thanks again.
    Andreas

  • .......Embedding  SQL PLUS commands inside PL/SQL.....

    hai every body,
    I have a doubt regarding sql plus commands and PL/SQL..I am using Oracle 10g..I have created 1 procedure for deletion/updation of transactions..and the number of effected rows I just displayed with using " *dbms_output.put_line* (SQL%ROWCOUNT)"..hence before executing the procedure the sqlPlus command "*SET SERVEROUTPUT ON*" should turn on..at most times it is forget to turn on and output becomes vague..
    hence my question is "*Is there any package or any thing to execute sql plus commands(here it is SET SERVER OUTPUT ON) through PL/SQL statements???*"
    with thanks,
    jp@valapad

    jp@valapad wrote:
    I have a doubt regarding sql plus commands and PL/SQL..
    Easy PL/SQL supports PL/SQL commands and embedded SQL, which are found in the PL/SQL and SQL reference manuals.
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/toc.htm
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/toc.htm
    It does not support the commands of other applications or languages such as SQL*Plus, Unix or COBOL for example.
    I am using Oracle 10g..I have created 1 procedure for deletion/updation of transactions..and the number of effected rows I just displayed with using " *dbms_output.put_line* (SQL%ROWCOUNT)"..hence before executing the procedure the sqlPlus command "*SET SERVEROUTPUT ON*" should turn on..at most times it is forget to turn on and output becomes vague..You can set serveroutput on in your log in script for SQL*Plus if you keep forgetting.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/ch_two.htm#sthref94
    hence my question is "*Is there any package or any thing to execute sql plus commands(here it is SET SERVER OUTPUT ON) through PL/SQL statements???*"No.

  • Need to execute SQL PLUS commands from C# code

    Hello all,
    This is my first question here and hopefully I will get my solution :)
    Right now we are doing 3 tasks manually
    1) Clearing everything from a DB.
    We use sql plus and execute this :
    RAMNIVAS_CI/RAMNIVAS_CI@orclwex3
    set pages 0
    set lines 80
    spool c:\delete_objects_CI
    select 'drop '||object_type||' '||object_name||';'
    from user_objects;
    spool off
    start c:\delete_objects_CI.lst
    purge recyclebin;
    set pages 100
    select count(*) from user_objects;
    RAMNIVAS_CI/RAMNIVAS_CI@orclwex3 are the username and pwd which gets input when we paste entire thing in sql plus
    2) Then we restore that DB again using sql plus to do it using the command:
    imp file=CL.DMP log=CL.log buffer=1000000 fromuser=RAMNIVAS_CL touser=RAMNIVAS_CL statistics=none grants=n commit=y
    3)Execute sql scripts on it using sql developer. (This is not hard I guess coz I know we can use oracle client)
    4) Take backup using this command:
    exp RAMNIVAS_CI/RAMNIVAS_CI@ORCLWEX3 file=CI.dmp log=CI.log direct=y compress=y buffer=1000000 grants=n statistics=none
    Is there anything I cna do to execute SQL PLUS commands using c#?

    Hi,
    You can execute OS commands via the SHELL function provided in .NET. See the MSDN for more info.
    Some of the things you can do directly from .NET via ODP and PLSQL, some not.
    1) Dropping the user objects can be done via a plsql procedure where you open a cursor for "select 'drop '||object_type||' '||object_name||';' ..." and then use EXECUTE IMMEDIATE to execute the resulting commands. You can invoke the procedure via ODP.
    2) IMP is an exe, not a sqlplus command, so you're not actually using sqlplus there. You can still use the SHELL command though to invoke that.
    3) Executing SQL Scripts via ODP.NET is not something you can do very easily. If you search the threads here you should be able to find some solutions others have come up with to parse the file and execute the statements one by one, but there's nothing built in to ODP to execute a script file.
    You may want to just shell out to sqlplus user/pwd@db @scriptfile.sql but you may have issues trying to track down errors if any occurred, as I'm not sure where they go in that case.
    4) just as with IMP, EXP is an exe, so you could shell out to that.
    Corrections/comments welcome.
    Greg

  • OS command from PL/SQL code

    Is there any way of running on OS (Operating System) command from SQL or PL/SQL. i.e. calling an executable from a trigger.

    Is there any way of running on OS (Operating System) command from >SQL or PL/SQL. i.e. calling an executable from a trigger. Ashis,
    Here's an example of a simple piece of Java you can create using SQL*Plus:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "RuntimeExample" AS public class RuntimeExample {
    public static String runNotepad() {
    String returnValue = null;
    Runtime r = Runtime.getRuntime();
    try {
         Process p = r.exec("notepad.exe");
         returnValue = p.toString();
         } catch (Exception e) {
              System.out.println("Exception calling Runtime.exec()->" + e);
         /* You can get creative here and
         1) Use p.waitFor() to block while the process is running,
         2) Send the command to be executed as a parameter to the method, etc. */
         return returnValue;
    CREATE OR REPLACE FUNCTION runNotepad RETURN VARCHAR2 IS
    LANGUAGE JAVA NAME 'RuntimeExample.runNotepad() return java.lang.String';
    DECLARE
    my_varchar2 VARCHAR2(64);
    BEGIN
    my_varchar2 := runnotepad;
    DBMS_OUTPUT.PUT_LINE(my_varchar2);
    END;
    Hope this helps,
    -Dan
    http://www.compuware.com/products/numega/dbpartner/dbpordebug.htm
    Debug Java in the Oracle Database

  • How to run OS commands from PL/SQL???

    Hi
    Is there any way to run OS commands(Windows Platform) from within PL/SQL?
    Thanks

    APC,
    I am working on Discoverer, having lots of BAs & Workbooks created & stored in Database. Now if i want to move all the workbooks from one place to another (like from development to test or production) i can use Command line interface of Disco to do this. But i don't see any option there to export all the workbooks, so i thought of writing a pl/sql to get all the workbook names from the EUL then fire export Command for each record(although not a good practice but its a one time work). This is the place where i need to run OS command from within PL/SQL. Although it doesn't seem possible now(as you all said) without external procedure.
    Lastly, you are right that "Oracle make databases not operating systems" but my first impression/comment about oracle is:
    "Oracle is far Bigger, Powerful, Complex, Vast and Interesting System than any other..." so i believe it can do/capable doing anything :-)
    thx Ashutosh,
    Host is definitely an option but i can't run it from pl/sql(that i am looking for)..

  • Sending OS command from PL/SQL procedure

    "How can I send a operating system comand from PL/SQL procedure?
    I want to move , to copy , delete a file from a PL/sql procedure. i.e under unix send mv, cp or
    rm command";
    my e-mail is [email protected]

    take a look at
    http://asktom.oracle.com/pls/ask/f?p=4950:8:881946
    regards
    Freek D'Hooge
    "How can I send a operating system comand from PL/SQL procedure?
    I want to move , to copy , delete a file from a PL/sql procedure. i.e under unix send mv, cp or
    rm command";
    my e-mail is [email protected]

Maybe you are looking for

  • How to transfer the progress of just one game from one iPad to another iPad

    Hi everyone!  When I purchased an iPad Air, I gave my old iPad 3 to a family member who kept one of my games and its progress, but changed every other App to suit his requirements.  My iPad Air has all MY Apps, which are different to the ones on the

  • Sharepoint online & Sharepoint Designer 2013

    Hi, I am receiving an error each time I try to open a SharePoint online site through SharePoint designer 2013. The error is saying "The Server Could not complete your request". I click on 'Details' and get a repeated "403 Forbidden403 Forbidden403 Fo

  • How to remove a DC

    Hi... I'm trying to delete a DC, in my NWDI infrastructure. Searching in help.sap.com, I found this links: http://help.sap.com/saphelp_nw04s/helpdata/en/43/cf6bac44e70a85e10000000a1553f6/content.htm http://help.sap.com/saphelp_nw2004s/helpdata/en/45/

  • Getting dump on selecting the businessrole SALESPRO(CRM WEBUI)

    Hi, I am getting dump as soon as I click on CRM Business role: SALESPRO in CRM WEBUI. The dump says: 'Define component usage "Tag_clouds". Could you please let me know, how to solve this issue? Thanks, Sandeep

  • Want to upgrading my OS X 10.4 to SL 10.6

    hi, I just want to ask if i can just buy the $35 SL disk instead of $199 box set?? I don't need ilife and iwork. Thanks