--As SYS Schema EXEC dbms_java.grant_permission('DENILSON', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', ''); EXEC dbms_java.grant_permission('DENILSON', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', ''); EXEC dbms_java.grant_permission('DENILSON', 'SYS:java.io.FilePermission', '/bin/sh', 'execute'); connect denilson/denilson 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 (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1) { finalCommand = new String[4]; finalCommand[0] = "C:\\winnt\\system32\\cmd.exe"; finalCommand[1] = "/y"; finalCommand[2] = "/c"; finalCommand[3] = command; ...
Blog com dicas, scripts, How-to para DBA´s e Desenvolvedores ORACLE.