Function Key
Block Menu Ctrl+B
Clear Block F7
Clear Field F5
Clear Form F8
Clear Record F6
Commit Ctrl+S
Count Query F12
Delete Record Ctrl+Up
Display Error Shift+Ctrl+E
Down Down
Duplicate Field Shift+F5
Duplicate Record Shift+F6
Edit Ctrl+E
Enter Query F11
Execute Query Ctrl+F11
Exit F4
Help Ctrl+H
Insert Records Ctrl+Down
List of Values Ctrl+L
List Tab Pages F2
Next Block Shift+PageDown
Next Field Tab
Next Primary Key Shift+F7
Next Record Down
Next Set Of Records Shift+F8
Previous Block Shift+PageUp
Previous Field Shift+Tab
Previous Record Up
Print Ctrl+P
Return Return
Scroll Down PageDown
Scroll Up PageUp
Show Keys Ctrl+K
Up UpUpdate Records Ctrl+U
Wednesday, February 10, 2010
Wednesday, February 3, 2010
Procedure To Send Email from oracle database
CREATE OR REPLACE PROCEDURE EEMAIL (p_smtp_hostname varchar2,p_smtp_portnum varchar2,p_from varchar2,p_recpt_1 varchar2,p_recpt_2 varchar2,subject VARCHAR2,MSG VARCHAR2)
IS
v_connection UTL_SMTP.CONNECTION;
v_header varchar2(1000);
crlf VARCHAR2(2):= UTL_TCP.CRLF;
--subject VARCHAR2(1000);
BEGIN
v_connection := utl_smtp.open_connection(p_smtp_hostname,p_smtp_portnum);
utl_smtp.helo(v_connection,p_smtp_hostname);
utl_smtp.mail(v_connection,p_from);
utl_smtp.rcpt(v_connection,p_recpt_1);
utl_smtp.rcpt(v_connection,p_recpt_2);
--utl_smtp.rcpt(v_connection,p_recpt_3);
v_header := 'Date: 'TO_CHAR(SYSDATE,'dd Mon yy hh24:mi:ss')crlf
'From: 'p_from''crlf
'Subject: 'subjectcrlf
'To: 'p_recpt_1crlf
'CC: 'p_recpt_2';'crlf;
-- 'CC: 'p_recpt_3crlf;
utl_smtp.open_data(v_connection);
utl_smtp.write_data(v_connection,v_header);
-- RFC 821 Format (SMTP) blank line between message header and message body
utl_smtp.write_data(v_connection,crlf);
utl_smtp.write_data(v_connection,MSGcrlfcrlf' ');
utl_smtp.close_data(v_connection);
utl_smtp.quit(v_connection);
/*EXCEPTION
WHEN UTL_SMTP.INVALID_OPERATION THEN
INSERT INTO ERROR_UPLOAD_SQL_MSG (SQL_CODE,SQL_ERROR_MSG,ERROR_DATE)
VALUES ('UTL_SMTP.INVALID_OPERATION','Invalid Operation in Mail attempt using UTL_SMTP.',SYSDATE);
COMMIT;
WHEN UTL_SMTP.TRANSIENT_ERROR THEN
INSERT INTO ERROR_UPLOAD_SQL_MSG (SQL_CODE,SQL_ERROR_MSG,ERROR_DATE)
VALUES ('UTL_SMTP.TRANSIENT_ERROR','Temporary e-mail issue - try again.',SYSDATE);
COMMIT;
WHEN UTL_SMTP.PERMANENT_ERROR THEN
INSERT INTO ERROR_UPLOAD_SQL_MSG (SQL_CODE,SQL_ERROR_MSG,ERROR_DATE)
VALUES ('UTL_SMTP.PERMANENT_ERROR','Permanent Error Encountered.',SYSDATE);
COMMIT;*/
-- END EMAIL_ERRORS;
END;
/
IS
v_connection UTL_SMTP.CONNECTION;
v_header varchar2(1000);
crlf VARCHAR2(2):= UTL_TCP.CRLF;
--subject VARCHAR2(1000);
BEGIN
v_connection := utl_smtp.open_connection(p_smtp_hostname,p_smtp_portnum);
utl_smtp.helo(v_connection,p_smtp_hostname);
utl_smtp.mail(v_connection,p_from);
utl_smtp.rcpt(v_connection,p_recpt_1);
utl_smtp.rcpt(v_connection,p_recpt_2);
--utl_smtp.rcpt(v_connection,p_recpt_3);
v_header := 'Date: 'TO_CHAR(SYSDATE,'dd Mon yy hh24:mi:ss')crlf
'From: 'p_from''crlf
'Subject: 'subjectcrlf
'To: 'p_recpt_1crlf
'CC: 'p_recpt_2';'crlf;
-- 'CC: 'p_recpt_3crlf;
utl_smtp.open_data(v_connection);
utl_smtp.write_data(v_connection,v_header);
-- RFC 821 Format (SMTP) blank line between message header and message body
utl_smtp.write_data(v_connection,crlf);
utl_smtp.write_data(v_connection,MSGcrlfcrlf' ');
utl_smtp.close_data(v_connection);
utl_smtp.quit(v_connection);
/*EXCEPTION
WHEN UTL_SMTP.INVALID_OPERATION THEN
INSERT INTO ERROR_UPLOAD_SQL_MSG (SQL_CODE,SQL_ERROR_MSG,ERROR_DATE)
VALUES ('UTL_SMTP.INVALID_OPERATION','Invalid Operation in Mail attempt using UTL_SMTP.',SYSDATE);
COMMIT;
WHEN UTL_SMTP.TRANSIENT_ERROR THEN
INSERT INTO ERROR_UPLOAD_SQL_MSG (SQL_CODE,SQL_ERROR_MSG,ERROR_DATE)
VALUES ('UTL_SMTP.TRANSIENT_ERROR','Temporary e-mail issue - try again.',SYSDATE);
COMMIT;
WHEN UTL_SMTP.PERMANENT_ERROR THEN
INSERT INTO ERROR_UPLOAD_SQL_MSG (SQL_CODE,SQL_ERROR_MSG,ERROR_DATE)
VALUES ('UTL_SMTP.PERMANENT_ERROR','Permanent Error Encountered.',SYSDATE);
COMMIT;*/
-- END EMAIL_ERRORS;
END;
/
Subscribe to:
Posts (Atom)