Call to Operative System function from DB procedure stored

I need to call some unix's function just like copy and delete files, but these, in a DB procedure stored...
there are some package or function (like 'Host()' in sqlplus), for make a call a OS funtions from a DB procedure stored???
I'm using a Oracle 8.1.5...
thanks for your help

Hi,
If you only need to do file i/o, then use the utl_file package. Otherwise, you might need to use the dbms_pipe package and have a little server program sitting on the other end of the pipe waiting to do operating system tasks. There are many new packages with 8i, look over them before trying the dbms_pipe option.

Similar Messages

  • 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.

  • Call operating system services from Jdeveloper

    How can i call operating system services from Jdeveloper ?
    null

    We do not use JDeveloper but use external procedures/routines called from the database. Then you can call a database procedure to an operating system task.
    Linda

  • Executing a Operating System command from Stored Procedure ??

    I want to execute a Operating System command from a PL/SQL Stored Procedure, can anyone suggest me how can I do this ??
    I am on Sun-Solaris with Oracle 8.1.7 database.
    Please do email me at [email protected]
    Thanks in Advance,
    Ramesh L.

    Are you using a webserver? If so, you could make your operating system script into a CGI program, then execute it from pl/sql using utl_http.request.

  • How to execute Operating System commands from Stored procedure.

    Any help on how to execute Operating System commands from stored procedures will be appreciated.
    Nanditha.

    Search the forums for 'External Procedure' and you will find example code that has been posted before.

  • Calling an external C function from a C file in JNI

    Hello,
    I am trying to call an external C function, from a C file which is being called by a Java file. I am getting an unresolved symbol error. I have tried many things like, making the external C function in the format of JNI, etc, etc. It is still not working. I think it has something to do with linking the two C files. If anyone can please answer this, it would greatly help me. here is the code:
    HelloWorld.c:
    #include <jni.h>
    #include <stdio.h>
    #include "MyOldHello.h"
    #include "HelloWorld.h"
    JNIEXPORT void JNICALL
    Java_HelloWorld_print(JNIEnv *env, jobject obj)
         helloPrint();
         return;
    HelloWorld.java:
    class HelloWorld
         private native void print();
         public static void main(String[] args)
              new HelloWorld().print();
         static
              System.loadLibrary("HelloWorld");
              System.loadLibrary("MyOldHello");
    MyOldHello.c:
    #include <jni.h>
    #include <stdio.h>
    #include "MyOldHello.h"
    void helloPrint()
         printf("\nHello World!\n");
    MyOldHello.h:
    void helloPrint();
    Now i use the Visual C++ command prompt to compile this by saying:
    javac HelloWorld.java
    javah -jni HelloWorld
    cl -Ic:\Java\jdk1.6.0_20\include -Ic:\Java\jdk1.6.0_20\include\win32 -MD -LD HelloWorld.c -FeHelloWorld.dll
    and now it gives me the error saying that there is an unresolved external symbol, which is the call to helloPrint in the file HelloWorld.
    If anyone knows how to solve this, or how to call external C functions from a C file that is being called from a Java file using JNI, please respond.
    Thanks
    Nick

    Hi,
    In your post on velocity review, you did not compile MyOldHello.c. You compiled a C file that included the header file for it and called a method defined in the header. The linker is never going to be able to find the code for this if you do not include the object file for this.
    Try this. You will also have to add in any JNI libraries you need to link against but I am sure you could work that out.
    cl /c MyOldHello.c
    cl /c -Ic:\Java\jdk1.6.0_20\include -Ic:\Java\jdk1.6.0_20\include\win32 -MD HelloWorld.c
    cl /LD MyOldHello.obj HelloWorld.obj /FeHelloWorld.dll
    [http://msdn.microsoft.com/en-us/library/f35ctcxw(VS.80).aspx]
    Cheers,
    Shane

  • 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

  • Is it possible to call the Print Quote functionality from Custom ADF page

    Hi,
    We are researching if it is possible to call the Print Quote functionality from the Custom ADF application.
    Goal is to pop up the PDF report upon clicking the Print Quote button on the custom page. Is it possible ?
    Atleast advice on the direction to go forward is appreciated.
    Thanks
    Sai

    Hi ,
    Please check following thread on forum -
    Re: ADF: Calling OAF Page from ADF page
    Check this may also be useful-
    https://blogs.oracle.com/shay/entry/to_adf_or_oaf_or
    I have not tried yet but Steven Chan (Sr. Director OATG) suggest following methodolgy for this-
    https://blogs.oracle.com/stevenChan/entry/appsdatasource_jaas_ebs
    Thanks,
    Ashish

  • Experts call a operating system command

    Hello,
    I have following question about experts.
    It is possible with OMBPLus or experts call a operating system command e.g svn checkout?
    It would great if you give me a example!
    goodbye

    Hi
    You should be able to use the tcl exec command to call svn command....
    for example;
    exec C:\\Program\ Files\\Subversion\\bin\\svn help
    Cheers
    David

  • Calling a PL/SQL function from java

    I would like to call a pl/sql function from java. My pl/sql function is taking arrays of records as parameters. How do i proceed? Which specific oracle packages do I have to import?
    Please send an example.
    TIA,
    Darko Guberina

    Documentation here: http://download-uk.oracle.com/docs/cd/B14117_01/java.101/b10983/datamap.htm#sthref185
    says JPublisher can publish records too.
    But when I change the example given at http://download-uk.oracle.com/docs/cd/B14117_01/java.101/b10983/datamap.htm#sthref190 as following:
    PACKAGE "COMPANY" AS
    type emp_rec is record (empno number, ename varchar2(10));
    type emp_list is varray(5) of emp_rec;
    type factory is record (
    name varchar(10),
    emps emp_list
    function get_factory(p_name varchar) return factory;
    END;
    then I see <unknown type or type not found> at sql or java files generated. Any ideas?

  • Calling a pure C function from JNI method

    Is it posible to call a pure C function from a JNI method.?
    I am communicating with an external device whose API is written in C language.
    Would it work this way
    If I declare empty native methods in Java and those methods in C call pure C methods?
    Thank You...

    Hello,
    I have a similar problem and I posted it here http://www.velocityreviews.com/forums/t724826-jni-calling-an-outside-function-in-the-c-file-which-is-being-called-by-the-java-file.html. If you can answer the question, it would greatly help me.
    Thanks
    Nick

  • Call a UNIX shell script from an oracle stored procedure

    We need to call a UNIX shell script from an oracle stored procedure
    i.e. the control should come back to the procedure once the script completes. Can any body help to achieve this ?

    There are various ways in achieving this.
    For Example, you can call a PRO*C-Library residing on the database server.
    This requires a PL/SQL library to be generated and some changes to the Listener configuration.
    It is also possible to implement a java procedure on the database being invoked by a PL/SQL wrapper class.
    In this way (and if used right) there is also granularity regarding the filestructure permissions given and it may be called during a Forms or other PL/SQL session.
    The article below explains a more generic approach how to invoke shell commands from within an Oracle Instance.
    Be careful with this, because it really works ;)
    Refer to :
    http://www.oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php
    Message was edited by:
    user434854

  • How can I call a function from a procedure

    I have a function named: f_calc_value which return the variable v_result. This function is part of a package.
    How can I call this function from a new procedure I am creating?
    Thanks

    or refer this theread....calling function from procedure

  • How can i call my function from a procedure?

    My function is:
    create or replace FUNCTION test(pAttributeName IN NUMBER)
    RETURN VARCHAR2 IS
    ret VARCHAR2(100) := NULL;
    VAR n1 NUMBER
    BEGIN
    SELECT Klartext INTO ret FROM piclist WHERE ATTRIBUTNAME = 'voltage_level' and PICLIST_ID =pAttributeName;
    RETURN ret;
    Insert into BM_ATTRIB(ID_ERFASSUNG,ID_ATTRIBNAME,ATTRIB_CHA,BM_ATTRIB_ID) VALUES(1,1,ret,1);
    exception
    when no_data_found then
    ret := 'AAA'   ------- you can return any default value,if you like
    --return ret;
    return NULL;
    when others then
    dbms_output.put_line('Exception:'||sqlerrm);
    End;
    I want to call it from a procedure!
    Please help!
    Nicole

    if the function is in the same package as the procedure then merely specify the function name and parameters:
    retcode := functionname(param1..paramn);
    If in another package then:
    retcode := packagename.functionname(param1..paramn);
    If the function is in another schema then you need to grant execute rights to the package/function to the schema trying to run the function:
    grant execute on packagename/functionname to otherschema;
    you need to be the package/function schema owner to do the above grant.

  • Calling  Operating system command  from PL/SQL programs

    Hi
    Is there any way we call the unix shell script from PL/SQL procedure/functions

    In 10g, it is possible.
    BEGIN
    dbms_scheduler.create_job(job_name => 'myjob',
    job_type => 'executable',
    job_action => '/app/oracle/x.sh',
    enabled => TRUE,
    auto_drop => TRUE);
    END;
    SQL> exec dbms_scheduler.run_job('myjob');
    Documentation:
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#sthref6596
    -aijaz

Maybe you are looking for

  • Trying to sign in on one web site, I get this message: Cancel OpenID

    The web site is for my electric bill. I have to open Safari, and sign in from there. The message I get using Fireox when I put in my user name and password is: Cancel OpenID. The web site is EPB.NET, and they have checked everything on their end and

  • Hello please can you tell me how to set up AirPlay as I can't seem to get it to work!

    HI I've recently brought a Apple TV tired to set it up yesterday to watch cartonn hd but can't seem to get it to play on my TV am I doing something wrong? aany help gratefully received  

  • Updating 7.1.0 to 7.1.1 using msiexec /quiet fails

    I need to roll-out patches 7.1.1 (and eventually 7.1.2 and 7.1.3) to our entire organization of 7.1.0. I have two commands which I am testing: 1. msiexec /quiet /patch 711.msp 2. msiexec /patch 711.msp I need to use command 1. as I do not want my use

  • Sql Server configuration requirements for SAP ECC 6.0

    Dear  All, I am using Sql server 2005 Enterprise as data store for Sap ecc 6.0.There are certain configuration requirements to be done while installing it so that sapinst.exe (sap installer) is able to use it to create its own DB's. For eg it require

  • Issues in mass data Upload

    Hi All,         Hope you all are doing fine.         I have to do master data upload for my next project. I have gone through LSMW, DX-WB, Recording etc. and now I am quite comfortable with all of these.         As i have tested these tools for maxim