Search the Reference Library pages:  

Oracle DBMS_AQELM

Version 10.2
 
General Information
Purpose Provides subprograms to manage the configuration of Oracle Streams Advanced Queuing (AQ) asynchronous notification by e-mail and HTTP
Source {ORACLE_HOME}/rdbms/admin/dbmsaqem.plb
First Available 9.0.1
Dependencies
DBMS_AQELM_LIB UTL_HTTP UTL_SMTP UTL_TCP
System Privileges GRANT execute ON dbms_aqelm TO <schema>;
GRANT execute ON dbms_aqelm TO uwclass;
 
GET_MAILHOST (new 11g)
Returns the host name for the SMTP server that the database will uses send out e-mail notifications dbms_aqelm.get_mailhost(mailhost OUT VARCHAR2);
See AQELM Demo
 
GET_MAILPORT (new 11g)
Returns the port number for the SMTP server dbms_aqelm.get_mailport(mailport OUT NUMBER);
See AQELM Demo
 
GET_PROXY (new 11g)
Returns the name fo the proxy server dbms_aqelm.get_proxy(
no_proxy_domains OUT VARCHAR2,
proxy            OUT VARCHAR2);
See AQELM Demo
 
GET_SENDFROM (new 11g)
Returns the sent-from e-mail address dbms_aqelm.get_sendfrom(sendfrom OUT VARCHAR2);
See AQELM Demo
 
HTTP_SEND (new 11g)

Undocumented

Appears to send a specified line "WHAT" at a specified line number "WHATL" for a named URL.

Returns 404 if the URL does not exist. 

dbms_aqelm.http_send(
url         IN VARCHAR2,
what        IN VARCHAR2,
whatl       IN  NUMBER,
status_code OUT VARCHAR2);
set serveroutput on

DECLARE
 sc VARCHAR2(30);
 ls VARCHAR2(100) := 'TEST';
BEGIN
  dbms_aqelm.http_send('www.psoug.org/index.html', ls, 2, sc);
  dbms_output.put_line(sc);
END;
/

DECLARE
 sc VARCHAR2(30);
 ls VARCHAR2(100) := 'TEST';
BEGIN
  dbms_aqelm.http_send('www.psoug.org/test.html', ls, 30, sc);
  dbms_output.put_line(sc);
END;
/
 
SET_MAILHOST
Sets the host name for the SMTP server that the database will uses send out e-mail notifications dbms_aqelm.set_mailhost(mailhost IN VARCHAR2);
See AQELM Demo
 
SET_MAILPORT
Sets the port number for the SMTP server dbms_aqelm.set_mailport(mailport IN NUMBER);
See AQELM Demo
 
SET_PROXY (new 11g)
Sets the name of the proxy server dbms_aqelm.set_proxy(mailhost IN VARCHAR2)
See AQELM Demo
 
SET_SENDFROM
Sets the sent-from e-mail address dbms_aqelm.set_sendfrom(sendfrom IN VARCHAR2);
See AQELM Demo
 
DBMS_AQELM Demo

Demo Code
set serveroutput on

DECLARE
 mh VARCHAR2(100);
 mp NUMBER;
 sf VARCHAR2(50);
 np VARCHAR2(50);
 px VARCHAR2(50);
BEGIN
  dbms_aqelm.set_mailhost('psoug.org');
  dbms_aqelm.set_mailport(25);
  dbms_aqelm.set_sendfrom('[email protected]');
  dbms_aqelm.set_proxy('[email protected]');
  COMMIT;

  dbms_aqelm.get_mailhost(mh);
  dbms_output.put_line('Mail Host: ' || mh);
  dbms_aqelm.get_mailport(mp);
  dbms_output.put_line('Mail Port: ' || mp);
  dbms_aqelm.get_sendfrom(sf);
  dbms_output.put_line('Send From: ' || sf);
  dbms_aqelm.get_proxy(np, px);
  dbms_output.put_line('No Proxy: ' || np);
  dbms_output.put_line('Proxy: ' || px);
END;
/
 
Related Topics
Advanced Queuing Demo 1
Advanced Queuing Demo 2
DBMS_AQ
DBMS_AQADM
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us    © 2003 - 2024 psoug.org
-----