Mungkin masalah di "permission"-nya. Coba dicheck lagi mengenai java privileges yg diberikan ke user.
Bowo --- In [email protected], "dany" <[EMAIL PROTECTED]> wrote: > Dear pakar, > > saya mencoba artikel ttg "System Call from a Java Procedure" pada metalink, > tetapi gagal menjalankan command yang secara O/S command tersebut baik2 > saja. > > berikut infonya : > > Database : Oracle 9.2.0.4 > Platform : Sun Solaris9 (SPARC) > > --Java Source > CREATE AND COMPILE JAVA SOURCE NAMED "execmd" AS > import java.lang.*; > import java.io.*; > public class execmd { > public static void run(String command[]) { > try { > Process p = Runtime.getRuntime().exec(command[0]); > > try { > p.waitFor(); > } > catch (InterruptedException ie){ > System.out.println("Errornya : " + ie.getMessage()); > } > > System.out.println("Dari Process " + p.exitValue()); > } > catch (IOException e) { > System.out.println("IO Exception : " + e.getMessage()); > e.printStackTrace(); > } > } > } > > --Procedure > CREATE OR REPLACE procedure p_cmd_run (command varchar2) as > language java > name 'execmd.run(java.lang.String[])'; > > --O/S command > bash$ /usr/bin/vmstat 2 3 | /usr/bin/awk '{print $5}' > > /export/home/oracle/vm.log > --> sukses dan file log terbentuk > > --PL/SQL Command > bash$ rm -rf /export/home/oracle/*.log > bash$ sqlplus scott/tiger > begin > p_cmd_run('/usr/bin/vmstat 2 3 | /usr/bin/awk ''{print $5}'' > > /export/home/oracle/vm.log'); > end; > --> file log tdk terbentuk dan message: "Dari Process 1" > > --O/S command > bash$ /usr/bin/sar 2 3 | /usr/bin/awk '{print $5}' > > /export/home/oracle/sar.log > --> sukses dan file log terbentuk > > --PL/SQL Command > bash$ rm -rf /export/home/oracle/*.log > bash$ sqlplus scott/tiger > begin > p_cmd_run('/usr/bin/sar 2 3 | /usr/bin/awk ''{print $5}'' > > /export/home/oracle/sar.log'); > end; > --> sukses tetapi file log tidak terbentuk, message : "Dari Process 0" > > > mohon pencerahan dari para pakar. > Terima kasih sebelum dan sesudahnya. > > > thx -- -----------I.N.D.O - O.R.A.C.L.E--------------- Keluar: [EMAIL PROTECTED] Website: http://indo-oracle.blogspot.com ----------------------------------------------- Bergabung dengan Indonesia Thin Client User Groups, Terminal Server, Citrix, New Moon Caneveral, di: http://indo-thin.vze.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/indo-oracle/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

