Operating System Calls from APEX with Java and PL/SQL

Question about operating system calls from apex.
I created a java file which is wrapped with pl/sql like
create or replace java source named "ExternalCall" as
import java.io.*;
I do the steps from this web page http://www.oracle.com/global/de/community/tipps/oscalls/index.html
The page is in german, but for experienced users the code on this page says everything.
In apex i have an application which calls this function with the "move" command in a sql-report region.
Let's say move c:\work1\file.txt c:\work2\file.txt
Everything works fine on one host(pc) but if i want to transfer the file from my host to another one then
i get the messgage "no access" although i have read, write access on the other host.
By the way, on both hosts i have admin rights.
Why can't i transfer the file over a network ?
Thanks in advance for any kind of help.
Regards
Stefan

I guess you are working on a Windows host. In this case Oracle processes are running as Windows services with a build-in MS system account. This account has no access to network ressources. You have two ways to get out of your windows box:
Assign Oracle services a network enabled account, e.g. domain user with local administrator privileges. (I never tried this and I don't like to recommend it.)
Use a command script for copying files and use explicite authentication within this script:-
net use \\myserver\ipc$ tiger /user:scott
copy c:\temp\xxx1 \\myserver\share\temp
copy c:\temp\xxx2 \\myserver\share\temp
Michael

Similar Messages

  • Operating system calls from apex

    Question about operating system calls from apex.
    I created a java file which is wrapped with pl/sql like
    create or replace java source named "ExternalCall" as
    import java.io.*;
    I do the steps from this web page http://www.oracle.com/global/de/community/tipps/oscalls/index.html
    The page is in german, but for experienced users the code on this page says everything.
    In apex i have an application which calls this function with the "move" command in a sql-report region.
    Let's say move c:\work1\file.txt c:\work2\file.txt
    Everything works fine on one host(pc) but if i want to transfer the file from my host to another one then
    i get the messgage "no access" although i have read, write access on the other host.
    By the way, on both hosts i have admin rights.
    Why can't i transfer the file over a network ?
    Thanks in advance for any kind of help.
    Regards
    Stefan
    null

    You say that "on both hosts i have admin rights".
    Remember that Oracle doesn't log in as "you", so Oracle may not have rights to the remote host.
    There are a lot of different permissions that can be assigned to java stored procedures. This chapter in the documentation might help:
    http://download-east.oracle.com/docs/cd/B19306_01/java.102/b14187/chnine.htm#BABFBDGG
    You might get better help from the JVM forum:
    Java in the Oracle Database

  • Operative System call from Composition Environment 7.2

    Hello all,
    what is the way to execute a shell script from SAP Composition Environment 7.2 (only j2ee stack).
    ....On an ABAP engine I know that the solution is true with a transaction that create a external system call, but on j2ee?
    thank you!!

    Hi Rajesh,
    Please try to clear cookies and temp file from your browser. and try again. if issue still persist, then try again later
    Hope it helps
    Regards
    Arun

  • Cross platform operating system calls from Java

    For our application we need to call an external program to perform FTP. We use ncftp as it's available on all the server platforms our clients use (Sun, HP, Linux, Windows). Up to now we've been using a Java program that listens to the Oracle pipe and sends a string to the OS.
    Now we are using 8i we thought it would be better to use Java within Oracle as this should reduce problems due to the external program not running. On Windows it works fine, but on Linux runtime.exec does not seem to take account of the system path. If I send something like '/usr/bin/ncftpput ...' it works, but I can't rely on the executable being in that directory although it should be somewhere in the path. I want to just pass 'ncftpput ...'.
    Ideally I want to be able to make the code OS independent, but would consider doing something in the Java part to detect the OS and adapt accordingly, perhaps by using a shell e.g. '/bin/sh -c ncftpput ...', but I've had problems with that using the whole command line and can I rely on having a specific shell on all *nix systems?
    At some point we'd like to do all the FTP from within Oracle, but that looks like a bigger project.
    Any ideas/suggestions?
    Thanks
    Steve

    Steve,
    To determine the OS, you should be able to check the System properties. As an example, when I run this (quick and dirty) sample code, I can see that os.name=Windows NT on my Windows instance:
    CREATE OR REPLACE JAVA SOURCE NAMED "envTest" AS public class envTest {
    public static void getEnvVar() {
    System.getProperties().list(System.out);
    CREATE OR REPLACE PACKAGE envTest IS
         PROCEDURE getEnvVar;
    END;
    CREATE OR REPLACE PACKAGE BODY envTest IS
         PROCEDURE getEnvVar IS
         LANGUAGE JAVA NAME 'envTest.getEnvVar()';
    END;
    To see the output after executing envTest.getEnvVar, map System.out to DBMS_OUTPUT before running it, as follows:
    set serveroutput on
    begin
    dbms_java.set_output(100000);
    end;
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle.htm
    Debug PL/SQL and Java in the Oracle Database

  • System log shows operating system call recv failed(error no.73)

    hi all,
      here i have some doubt in system log please clarify me,
    here in my (sm21)system log files i find more no  of logs for dispatcher and it indicates operating system call recv failed(error no.73)
    system log  Short Text shows:
    Operating system call &5&5&4 failed (error no. &>E5)
    The specified operating system call was returned with an error.
    For communication calls (receive, send, etc) often the cause of errors are network problems.
    It could also be a configuration problem at operating system level. (file cannot be opened, no space in the file system etc.).
    what is means

    Hello,
    Yes, you are right, these kind of problems (OS Error 73) are usually caused by network issues. Error 73 means 'connection reset by peer'. In most cases, this is because the connection was interupted by the communication partner or an active network component between.
    I provide you some recommendations:
    - Check your Network environment. You can use NIPING tool to diagnose it (note 500235), check your MTU stability.
    - Check note 27320 - keep alive and gui_auto_logout profile param
    - Also you can implement note 1002075 for a possible solution
    I hope this helps you.
    Regards,
    Blanca

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

  • System Call from Java, problem LD_LIBRARY_PATH

    I use class Runtime to invoke Operating System Call.
    I want to run OS command gpg (gnu program for encrypting/ decrypting files).
    What is interesting, when I run my sqlplus script from system user (used for database installation) call ends with success.
    Running script from other os users or machines ends with -1 code and error message:
    "ld.so.1: gpg: fatal: libiconv.so.2: open failed: No such file or directory"
    gpg uses libraries given LD_LIBRARY_PATH (/opt/gnupg/lib:/usr/lib:/usr/local/lib)
    I think that is the problem. Is there a workaround for that??
    Best regard
    Grzegorz

    Maybe related to the fact that the PATH environment variable is unset then re-initialized by Oracle to PATH = /usr/local/bin:/bin:/usr/bin. Try using absolute path for the OS commands.
    Kuassi
    - blog http://db360.blogspot.com/
    - book http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html

  • I fail to start the sap server with error:Operating system call recv failed

    I fail to start the sap server in SAP R3 Management Console and the message in the syslog was :
    R/3 Basis System: Operating system call           recv failed (error no. 10053)
    Is there any one could tell me how to resolve the problem or give me some advice?I will appreciate him/her very much.Thank you.

    trc file: "dev_disp", trc level: 1, release: "620"
    Sun May 07 13:14:30 2000
    kernel runs with dp version 3(ext=1) (@(#) DPLIB-INT-VERSION-3)
    length of sys_adm_ext is 304 bytes
    systemid   560 (PC with Windows NT)
    relno      6200
    patchlevel 0
    patchno    674
    intno      20020600
    pid        3628
    ***LOG Q00=> DpSapEnvInit, DPStart (00 3628) [dpxxdisp.c   978]
         shared lib "dw_xml.dll" version 674 successfully loaded
         shared lib "dw_xtc.dll" version 674 successfully loaded
         shared lib "dw_stl.dll" version 674 successfully loaded
    Sun May 07 13:14:32 2000
    WARNING => DpNetCheck: NiAddrToHostCanon() took 2 seconds
    Sun May 07 13:14:37 2000
    WARNING => DpNetCheck: NiAddrToHost(1.0.0.0) took 5 seconds
    ***LOG GZZ=> 2 possible network problems detected - check tracefile and adjust the DNS settings [dpxxtool2.c  3212]
    MtxInit: -2 0 0
    DpShMCreate: sizeof(wp_adm)          12784     (752)
    DpShMCreate: sizeof(tm_adm)          1690816     (8412)
    DpShMCreate: sizeof(wp_ca_adm)     18000     (60)
    DpShMCreate: sizeof(appc_ca_adm)     6000     (60)
    DpShMCreate: sizeof(comm_adm)     192000     (384)
    DpShMCreate: sizeof(wall_adm)     (22440/34344/56/100)
    DpShMCreate: SHM_DP_ADM_KEY          (addr: 001E0040, size: 1977824)
    DpShMCreate: allocated sys_adm at 001E0040
    DpShMCreate: allocated wp_adm at 001E0560
    DpShMCreate: allocated tm_adm_list at 001E3750
    DpShMCreate: allocated tm_adm at 001E3778
    DpShMCreate: allocated wp_ca_adm at 00380438
    DpShMCreate: allocated appc_ca_adm at 00384A88
    DpShMCreate: allocated comm_adm_list at 003861F8
    DpShMCreate: allocated comm_adm at 00386210
    DpShMCreate: allocated ca_info at 003B5010
    DpShMCreate: allocated wall_adm at 003B5018
    MBUF state OFF
    Sun May 07 13:14:38 2000
    EmInit: MmSetImplementation( 2 ).
    <ES> client 0 initializing ....
    <ES> InitFreeList
    <ES> block size is 1024 kByte.
    Using implementation std
    <EsNT> Memory Reset enabled as NT default
    <EsNT> EsIUnamFileMapInit: Initialize the memory 2458 MB
    <ES> 2457 blocks reserved for free list.
    ES initialized.
    ***LOG Q0K=> DpMsAttach, mscon ( db01) [dpxxdisp.c   9115]
    CCMS: Initalizing shared memory of size 20000000 for monitoring segment.
    CCMS: start to initalize 3.X shared alert area (first segment).
    DpMsgAdmin: Set release to 6200, patchlevel 0
    MBUF state PREPARED
    MBUF component UP
    DpMBufHwIdSet: set Hardware-ID
    ***LOG Q1C=> DpMBufHwIdSet [dpxxmbuf.c   941]
    DpMsgAdmin: Set patchno for this platform to 674
    Release check o.K.
    Sun May 07 13:15:18 2000
    ERROR => W2 (pid 4776) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W2
    Sun May 07 13:15:38 2000
    ERROR => W5 (pid 4548) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W5
    ERROR => W8 (pid 4592) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W8
    ERROR => W9 (pid 4584) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W9
    ERROR => W12 (pid 4676) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W12
    ERROR => W13 (pid 4272) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W13
    my types changed after wp death/restart 0xbf --> 0xb7
    Sun May 07 13:15:58 2000
    ERROR => W4 (pid 4888) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W4
    ERROR => W6 (pid 4788) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W6
    ERROR => W15 (pid 4596) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W15
    Sun May 07 13:16:18 2000
    ERROR => W1 (pid 4892) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W1
    ERROR => W3 (pid 4904) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W3
    ERROR => W7 (pid 4000) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W7
    ERROR => W10 (pid 4864) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W10
    my types changed after wp death/restart 0xb7 --> 0xb5
    Sun May 07 13:16:38 2000
    ERROR => W0 (pid 4900) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W0
    ERROR => W11 (pid 4500) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W11
    ERROR => W14 (pid 4636) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W14
    ERROR => W16 (pid 3532) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W16
    my types changed after wp death/restart 0xb5 --> 0x80
    DP_FATAL_ERROR => DpEnvCheck: no more work processes
    DISPATCHER EMERGENCY SHUTDOWN ***
    DpModState: change server state from STARTING to SHUTDOWN
    Sun May 07 13:16:42 2000
    ***LOG Q0M=> DpMsDetach, ms_detach () [dpxxdisp.c   9341]
    MBUF state OFF
    MBUF component DOWN
    ***LOG Q05=> DpHalt, DPStop ( 3628) [dpxxdisp.c   7883]

  • My Mac operating system is OSX 10.4.11 and I "replaced" my older version of Firefox with a newer one that does not open with my system. Can you send me an older version of Firefox? Thanks!

    My Mac operating system is OSX 10.4.11 and I "replaced" my older version of Firefox with a newer one that does not open with my system. Can you send me an older version of Firefox? Thanks!

    You can get Firefox 3.6.20 from here. <br />
    http://www.mozilla.com/en-US/firefox/all-older.html

  • Whenever i try to manually sync my iPhone with a new playlist on iTunes (on my laptop), it always gets stuck in step 7, Waiting for changes to be applied, and then nothing happens. I'm running the latest operating systems on both my iPhone 5 and macbook

    Whenever i try to manually sync my iPhone with a new playlist on iTunes (on my laptop), it always gets stuck in step 7, Waiting for changes to be applied, and then nothing happens. I'm running the latest operating systems on both my iPhone 5 and macbook

    I really don't appreciate the fact that no one from Apple seems to be dealing with the many, many threads that have started on this topic since iOS 7 came out. In any event, I seem to have solved my problem with a full software restoration -- that is, iOS software restoration.
    I clicked on "Restore iPhone..." which does a complete reinstall of the iOS but also all apps, photos, songs, etc. Took about 45 minutes, but seems to have worked.
    I had previously tried reverting to a backup of my iPhone, but that did not solve the problem. Only a full restore solved it.

  • How do I copy my operating system to a solid state drive and make it the disk I boot from?

    How do I copy my operating system to a solid state drive and make it the disc I boot from?

    Where is your operating system now? Basically, you clone it from wherever it is now to the SSD:
    Clone Lion/Mountain Lion using Restore Option of Disk Utility
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Select Disk Utility from the main menu then press the Continue button.
    Select the destination volume from the left side list.
    Click on the Restore tab in the DU main window.
    Select the destination volume from the left side list and drag it to the Destination entry field.
    Select the source volume from the left side list and drag it to the Source entry field.
    Double-check you got it right, then click on the Restore button.
    Destination means the SSD. Source means the drive now holding OS X.

  • My itunes opens after 2-3 hrs after doubleclicking it to open;it happened once or twice  with itunes 11.x , but its a constant problem after updating itunes to 12.x ....my operating system win7;processor i5 intel haswell and 4gb ram...i hav no issue

    My itunes opens  2-3 hrs after doubleclicking it to open;it happened once or twice  with itunes 11.x , but its a constant problem after updating itunes to the latest 12.0.1....my operating system windows7;processor i5 intel haswell and 4gb ram...i have no issue with opening other big programs....i tried uninstalling completely the itunes and reinstalling it as i thought at first it is not opening (because it takes really long time) and i followed the following support pages
    1)iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    2)iTunes for Windows doesn't open after upgrading in Windows Vista, Windows 7, or Windows 8
    but my problem doesnot get solved even after trying all the methods in the above pages...
    now i realized,it opens after 2-3 hrs and at will...after opening it keeps hanging.finally it doesnot again open immediately after closing...kindly help me out as soon as possible

    My itunes opens  2-3 hrs after doubleclicking it to open;it happened once or twice  with itunes 11.x , but its a constant problem after updating itunes to the latest 12.0.1....my operating system windows7;processor i5 intel haswell and 4gb ram...i have no issue with opening other big programs....i tried uninstalling completely the itunes and reinstalling it as i thought at first it is not opening (because it takes really long time) and i followed the following support pages
    1)iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    2)iTunes for Windows doesn't open after upgrading in Windows Vista, Windows 7, or Windows 8
    but my problem doesnot get solved even after trying all the methods in the above pages...
    now i realized,it opens after 2-3 hrs and at will...after opening it keeps hanging.finally it doesnot again open immediately after closing...kindly help me out as soon as possible

  • The performance of management system with Java and MySQL

    Hi all,
    I want to develop one management application with Java and MySQL. However I am not sure which is a good way to design the system. The system has to deal with customers' data in the database.
    Should I create objects for every customers when application starts so that I do not need to access to the database often? Or
    Should I access to the database everytime the user want to deal with customer's data?
    Welcome for any suggestion.
    Thank you
    Pat

    Hi
    i i think u should go through MVC model or use connection pooling

  • Operating system call w2k and linux

    Hello:
    I am not a programmer but i nedd a routine to do an operating system call and execute a batch or shell set of commands,
    do anyone know how can i do it?
    thanks a lot in advance

    Or maybe Runtime.exec is enough for you. MUCH simpler than JNI, as long as a shell executing a script is all you want.
    Read this first:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    %

  • After reinstalling operating system Windows 7, I lost apps and can no longer sync with Outlook 2010?

    After reinstalling operating system Windows 7, I lost apps and can no longer sync with Outlook 2010?

    apps are stored in
    C:\Users\<your account name>\Music\iTunes\Mobile Applications
    their extensions are .Ipa  you can try doing a search on your harddisk
    unless you formattet it when you reinstalled
    but an app can only ever be bought 1 times on an appleID so if you try to buy them again it will give you a free download of the app and not charge you
    about sync then if you connect the ipad and click info tab and set it to sync your outlook data it should sync without any problems

Maybe you are looking for

  • ABAP QUERY (SAP QUERY) Coding problem?

    Hi experts, Can anyone tell me how to find what is the final internal table in SAP QUERY? I want to delete some unwanted records from my final internal table but I am unable to find it. please do help. Its urgent I am strugling from 3 days, to day I

  • JVM 1.6.0_02-b05 hanges in satisfy_failed_allocation

    I am having a java application which usually gets to hanged state after running for quite a long time (5 to 6 months). The process has a large number of threads (approx 143), it does huge number of processings over the time period and all of a sudden

  • Policy Domain Root error during Policy Manager installation

    I am installing Policy manager for the first time and I am getting error at Policy domain root level. If I specify Policy Domain Root as / it gives me this error Unable to modify the entry with DN obapp=PSC,ou=Oblix,dc=SUPPLIER,DC=GLOBAL in the direc

  • Mac OS X 10.7.3 Question

    After installing Mac OS X 10.7.3 i keep getting error messages "You can't open the application Adobe Reader Updater Helper because PowerPC applications are no longer supported"  What is this all about?

  • How to delete email notification

    Does anyone know how to delete a non-existent email notification from BlackBerry Q5? I have tried to reset/ reboot the device yet it doesn't disappear. Thanks all!