Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-24344: success with compilation error

paraprJun 13 2012 — edited Jun 14 2012
CREATE OR REPLACE TRIGGER trg_upd
BEFORE UPDATE ON test
FOR EACH ROW
DECLARE
v_From VARCHAR2(80) := 'sender@mycompany.com';
v_Recipient VARCHAR2(120) := 'recepient@mycompany.com';
v_Subject VARCHAR2(80) := 'value changed notice';
v_Mail_Host VARCHAR2(30) := 'host ip';-- IP of email server
v_Mail_Conn sys.utl_smtp.Connection;
crlf VARCHAR2(2) := chr(13)||chr(10);
v_dt VARCHAR2(30):= to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss');
BEGIN
v_Mail_Conn := sys.utl_smtp.Open_Connection(v_Mail_Host, 26);
sys.utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
sys.utl_smtp.Mail(v_Mail_Conn, v_From);
sys.utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
sys.utl_smtp.Data(v_Mail_Conn,
'Date: ' || v_dt || crlf ||
'From: ' || v_From || crlf ||
'Subject: '|| v_Subject || crlf ||
'To: ' || v_Recipient || crlf ||
crlf ||
'THe column name'|| 'id' || crlf || -- Message body
'changed from'|| :old.id || 'to' || :new.id || crlf ||
'Column Name' || 'Name' || crlf ||
'changed from'|| :old.name || 'to' || :new.name || crlf ||
'column name' || 'Details' || crlf ||
'changed From'|| :old.details || 'to' || :new.details || crlf );
sys.utl_smtp.Quit(v_mail_conn);
EXCEPTION
WHEN sys.utl_smtp.Transient_Error OR sys.utl_smtp.Permanent_Error then
raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
END;

Giving following error
ORA-24344: success with compilation error

can anyone help to solve this error

Edited by: Paresh Koche on Jun 13, 2012 12:42 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 12 2012
Added on Jun 13 2012
11 comments
18,385 views