![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script to monitor process running on server and posting a mail if any process is dead | pradeepmacha | Shell Programming and Scripting | 12 | 10-17-2008 12:08 AM |
| Killing of a process and send a mail if the process doesnot come up within 2 minutes | Prince89 | Shell Programming and Scripting | 1 | 02-15-2008 04:10 PM |
| how to start a process and make it sleep for 5 mins and then kill that process | shrao | Shell Programming and Scripting | 6 | 03-27-2007 09:54 AM |
| SIGTTOU Error in FTP process | Kumar71 | UNIX for Advanced & Expert Users | 1 | 08-10-2005 09:39 AM |
| login error(can not set process env.) | amit | UNIX for Advanced & Expert Users | 5 | 12-23-2001 01:39 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
process error
Hi all,
i need to exexute OS commands from oracle prompt. For that i did the following steps 1) created a java source called "Host". 2)created a pl/sql procedure called'Host_Command '. 3)issued the following statements EXEC dbms_java.grant_permission( 'TMS','SYS:java.io.FilePermission', '/bin/sh', 'execute' ) EXEC Dbms_Java.Grant_Permission('TMS', 'SYS:java.lang.RuntimePermission','writeFileDescriptor', ''); EXEC Dbms_Java.Grant_Permission('TMS', 'SYS:java.lang.RuntimePermission','readFileDescriptor', ''); Finally i executed the folllowing statements. SET SERVEROUTPUT ON SIZE 1000000 CALL DBMS_JAVA.SET_OUTPUT(1000000); BEGIN Host_Command ('ls'); END; / But i ma getting the following process error; Process err :/bin/sh: ls: No such file or directory PL/SQL procedure successfully completed. Any idea pls. cheers RRK |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
What does the Host java code do exactly?
Try fully qualified path for "ls", eg "/usr/bin/ls" or whatever. |
|
#3
|
|||
|
|||
|
Quote:
if so you can execute OS commands with '!'. for example: SQL> !ls -l |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|