Posts

Showing posts from June 3, 2013

Oracle 10g:Get Unix/Linux Mount Point info /Alert logs in Mail By Java Source

Image
Execute Unix/Linux commands by Java Source This is very easy with few steps. 1.CREATE JAVA SOURCE into oracle 10g database. Install jvm.Connect to SQL with sysdba priviledges. @$ORACLE_HOME/javavm/install/initjvm.sql   CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Host" AS import java.io.*; public class Host {   public static void executeCommand(String command) {     try {       String[] finalCommand;       if (isWindows()) {         finalCommand = new String[4];         // Use the appropriate path for your windows version.         //finalCommand[0] = "C:\\winnt\\system32\\cmd.exe";    // Windows NT/2000         finalCommand[0] = "C:\\windows\\system32\\cmd.exe";    // Windows XP/2003     ...