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