The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-22-2007
Registered User
 

Join Date: Dec 2006
Location: hyderabad
Posts: 102
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
Reply With Quote
Forum Sponsor
  #2  
Old 11-22-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
What does the Host java code do exactly?

Try fully qualified path for "ls", eg "/usr/bin/ls" or whatever.
Reply With Quote
  #3  
Old 11-23-2007
Registered User
 

Join Date: Oct 2003
Posts: 32
Quote:
Originally Posted by ravi raj kumar View Post
Hi all,
i need to exexute OS commands from oracle prompt.
Do you mean the SqlPlus shell?
if so you can execute OS commands with '!'.

for example:
SQL> !ls -l
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0