Pular para o conteúdo principal

Postagens

Mostrando postagens de junho, 2013

Execute Command in Operating System Using Java Source

--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;   ...

Send authenticated email using UTL_SMTP

CREATE OR REPLACE PROCEDURE send_mail (p_to        IN VARCHAR2,                                        p_from      IN VARCHAR2,                                        p_subject   IN VARCHAR2,                                        p_text_msg  IN VARCHAR2 DEFAULT NULL,                                        p_html_msg  IN VARCHAR2 DEFAULT NULL,                                        p_smtp_host IN VARCHAR2,          ...

Install APEX using Embedded PL/SQL Gateway

Download APEX from OTN http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html Install Apex for Full Development Environment @apexins.sql APEX_DATA APEX_FILES TEMP /i/ Change password for user ADMIN - The same script can be used for password lost @apxchpwd.sql Configure the Embedded PL/SQL Gateway @apex_epg_config.sql /u01/app/oracle/product Updating the Images Directory @apxldimg.sql /u01/app/oracle/product Change job_queue_processes parameter in database SELECT VALUE FROM v$parameter WHERE NAME = 'job_queue_processes'; ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 scope=both; Enable XDB Service SELECT DBMS_XDB.GETHTTPPORT FROM DUAL; EXEC DBMS_XDB.SETHTTPPORT(8080); Create ACL to allow access DECLARE   ACL_PATH  VARCHAR2(4000); BEGIN   -- Look for the ACL currently assigned to 'localhost' and give APEX_040200   -- the "connect" privilege if APEX_040200 does not have the privilege yet.   SELECT ACL INTO ACL_PATH ...