Return-Path: <ml-errors@fatcity.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id h6VLLSw31035
 for <oracle-l@orafaq.net>; Thu, 31 Jul 2003 16:21:28 -0500
X-ClientAddr: 66.27.56.212
Received: from www3.fatcity.com (rrcs-west-66-27-56-212.biz.rr.com [66.27.56.212])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id h6VLLNp31022
 for <oracle-l@orafaq.net>; Thu, 31 Jul 2003 16:21:24 -0500
Received: (from root@localhost)
 by www3.fatcity.com (8.11.6/8.11.6) id h6VJ0Xv11554
 for oracle-l@orafaq.net; Thu, 31 Jul 2003 12:00:33 -0700
Received: by fatcity.com (05-Jun-2003/v1.0g-b73/bab) via fatcity.com id 005C8068; Thu, 31 Jul 2003 11:54:23 -0800
Message-ID: <F001.005C8068.20030731115423@fatcity.com>
Date: Thu, 31 Jul 2003 11:54:23 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Jamadagni, Rajendra" <Rajendra.Jamadagni@espn.com>
Sender: ml-errors@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Jamadagni, Rajendra" <Rajendra.Jamadagni@espn.com>
Subject: RE: logging oracle error code and message into a table within pro
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 73; ListGuru (c) 1996-2003 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: multipart/mixed;	boundary="----=_NextPartTM-000-0aa99de9-38e9-44a5-b8a8-b09b49d0b4b1"
------=_NextPartTM-000-0aa99de9-38e9-44a5-b8a8-b09b49d0b4b1
Content-Type: multipart/alternative;
 boundary="----_=_NextPart_001_01C35795.3EC03907"
------_=_NextPart_001_01C35795.3EC03907
Content-Type: text/plain;
 charset="iso-8859-1"

sorry .... should be ...
 
  insert into error_log (error_ts, ora_user, error_text, call_stack) 
  values (sysdate, user, szerrors,szcalls); 

Raj
----------------------------------------------------------------------------
---- 
Rajendra dot Jamadagni at nospamespn dot com 
All Views expressed in this email are strictly personal. 
QOTD: Any clod can have facts, having an opinion is an art ! 

-----Original Message-----
Sent: Thursday, July 31, 2003 3:45 PM
To: Multiple recipients of list ORACLE-L



create or replace log_errors (in_errors varchar2, in_calls varchar2) 
is 
szerrors varchar2(1000) := dbms_utility.format_error_stack; 
szCalls  varchar2(1000) := dbms_utility.format_call_stack; 
pragma autonomous_transaction; 
begin 
  szerrors := 
  insert into error_log (error_ts, ora_user, error_text) 
  values (sysdate, user, szerrors); 
  commit; 
end; 
/ 


begin 
... 
exception 
   when others then 
     log_errors; 
     -- for benefit of the program ... 
     raise; 
end; 
/ 

something like this should help ... 
Raj 
----------------------------------------------------------------------------
---- 
Rajendra dot Jamadagni at nospamespn dot com 
All Views expressed in this email are strictly personal. 
QOTD: Any clod can have facts, having an opinion is an art ! 


-----Original Message----- 
<mailto:Ravindra.Basavaraja@T-Mobile.com> ] 
Sent: Thursday, July 31, 2003 3:35 PM 
To: Multiple recipients of list ORACLE-L 
procedu 


Hi All, 

I want to log the oracle error code and messages that will be generated 
within a procedure/trigger 
into a table. 

I know i can write this in the exception block.Does anyone has any sample 
code to help me out. 

thanks 
ravindra 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
<http://www.orafaq.net>  
-- 
Author: Basavaraja, Ravindra 
  INET: Ravindra.Basavaraja@T-Mobile.com 

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
<http://www.fatcity.com>  
San Diego, California        -- Mailing list and web hosting services 
--------------------------------------------------------------------- 
To REMOVE yourself from this mailing list, send an E-Mail message 
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in 
the message BODY, include a line containing: UNSUB ORACLE-L 
(or the name of mailing list you want to be removed from).  You may 
also send the HELP command for other information (like subscribing). 


------_=_NextPart_001_01C35795.3EC03907
Content-Type: text/html;
 charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>RE: logging oracle error code and message into a table within procedu</TITLE>

<META content="MSHTML 5.50.4926.2500" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face="Courier New" size=2><SPAN class=365295418-31072003>sorry .... 
should be ...</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN 
class=365295418-31072003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff><FONT face="Courier New" color=#000000 size=2>&nbsp; 
insert into error_log (error_ts, ora_user, error_text<SPAN 
class=365295418-31072003>, call_stack</SPAN>)</FONT><FONT 
face="Courier New"><FONT size=2><FONT color=#000000> <BR>&nbsp; values (sysdate, 
user, szerrors<SPAN class=365295418-31072003>,szcalls</SPAN>); 
</FONT><BR></FONT></FONT></FONT></DIV>
<DIV><SPAN class=365295418-31072003><FONT face="Courier New" color=#0000ff 
size=2>Raj</FONT></SPAN></DIV>
<DIV><SPAN class=365295418-31072003></SPAN><FONT face="Courier New" 
size=2>--------------------------------------------------------------------------------</FONT> 
<BR><FONT face="Courier New" size=2>Rajendra dot Jamadagni at nospamespn dot 
com</FONT> <BR><FONT face="Courier New" size=2>All Views expressed in this email 
are strictly personal.</FONT> <BR><FONT face="Courier New" size=2>QOTD: Any clod 
can have facts, having an opinion is an art !</FONT> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Jamadagni, Rajendra 
  <BR><B>Sent:</B> Thursday, July 31, 2003 3:45 PM<BR><B>To:</B> Multiple 
  recipients of list ORACLE-L<BR><B>Subject:</B> RE: logging oracle error code 
  and message into a table within pro<BR><BR></FONT></DIV>
  <P><FONT size=2>create or replace log_errors (in_errors varchar2, in_calls 
  varchar2)</FONT> <BR><FONT size=2>is</FONT> <BR><FONT size=2>szerrors 
  varchar2(1000) := dbms_utility.format_error_stack;</FONT> <BR><FONT 
  size=2>szCalls&nbsp; varchar2(1000) := dbms_utility.format_call_stack;</FONT> 
  <BR><FONT size=2>pragma autonomous_transaction;</FONT> <BR><FONT 
  size=2>begin</FONT> <BR><FONT size=2>&nbsp; szerrors := </FONT><BR><FONT 
  size=2>&nbsp; insert into error_log (error_ts, ora_user, error_text)</FONT> 
  <BR><FONT size=2>&nbsp; values (sysdate, user, szerrors);</FONT> <BR><FONT 
  size=2>&nbsp; commit;</FONT> <BR><FONT size=2>end;</FONT> <BR><FONT 
  size=2>/</FONT> </P><BR>
  <P><FONT size=2>begin</FONT> <BR><FONT size=2>...</FONT> <BR><FONT 
  size=2>exception</FONT> <BR><FONT size=2>&nbsp;&nbsp; when others then</FONT> 
  <BR><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; log_errors;</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp; -- for benefit of the program ...</FONT> 
  <BR><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; raise;</FONT> <BR><FONT 
  size=2>end;</FONT> <BR><FONT size=2>/</FONT> </P>
  <P><FONT size=2>something like this should help ...</FONT> <BR><FONT 
  size=2>Raj</FONT> <BR><FONT 
  size=2>--------------------------------------------------------------------------------</FONT> 
  <BR><FONT size=2>Rajendra dot Jamadagni at nospamespn dot com</FONT> <BR><FONT 
  size=2>All Views expressed in this email are strictly personal.</FONT> 
  <BR><FONT size=2>QOTD: Any clod can have facts, having an opinion is an art 
  !</FONT> </P><BR>
  <P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From: 
  Basavaraja, Ravindra [<A 
  href="mailto:Ravindra.Basavaraja@T-Mobile.com">mailto:Ravindra.Basavaraja@T-Mobile.com</A>]</FONT> 
  <BR><FONT size=2>Sent: Thursday, July 31, 2003 3:35 PM</FONT> <BR><FONT 
  size=2>To: Multiple recipients of list ORACLE-L</FONT> <BR><FONT 
  size=2>Subject: logging oracle error code and message into a table 
  within</FONT> <BR><FONT size=2>procedu</FONT> </P><BR>
  <P><FONT size=2>Hi All,</FONT> </P>
  <P><FONT size=2>I want to log the oracle error code and messages that will be 
  generated</FONT> <BR><FONT size=2>within a procedure/trigger</FONT> <BR><FONT 
  size=2>into a table.</FONT> </P>
  <P><FONT size=2>I know i can write this in the exception block.Does anyone has 
  any sample</FONT> <BR><FONT size=2>code to help me out.</FONT> </P>
  <P><FONT size=2>thanks</FONT> <BR><FONT size=2>ravindra</FONT> <BR><FONT 
  size=2>-- </FONT><BR><FONT size=2>Please see the official ORACLE-L FAQ: <A 
  target=_blank href="http://www.orafaq.net">http://www.orafaq.net</A></FONT> 
  <BR><FONT size=2>-- </FONT><BR><FONT size=2>Author: Basavaraja, 
  Ravindra</FONT> <BR><FONT size=2>&nbsp; INET: 
  Ravindra.Basavaraja@T-Mobile.com</FONT> </P>
  <P><FONT size=2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- 858-538-5051 <A 
  target=_blank href="http://www.fatcity.com">http://www.fatcity.com</A></FONT> 
  <BR><FONT size=2>San Diego, 
  California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Mailing list and web 
  hosting services</FONT> <BR><FONT 
  size=2>---------------------------------------------------------------------</FONT> 
  <BR><FONT size=2>To REMOVE yourself from this mailing list, send an E-Mail 
  message</FONT> <BR><FONT size=2>to: ListGuru@fatcity.com (note EXACT spelling 
  of 'ListGuru') and in</FONT> <BR><FONT size=2>the message BODY, include a line 
  containing: UNSUB ORACLE-L</FONT> <BR><FONT size=2>(or the name of mailing 
  list you want to be removed from).&nbsp; You may</FONT> <BR><FONT size=2>also 
  send the HELP command for other information (like subscribing).</FONT> 
</P></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C35795.3EC03907--


------=_NextPartTM-000-0aa99de9-38e9-44a5-b8a8-b09b49d0b4b1
Content-Type: text/plain;
 name="ESPN_Disclaimer.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="ESPN_Disclaimer.txt"

*********************************************************************This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you.*********************************************************************1

------=_NextPartTM-000-0aa99de9-38e9-44a5-b8a8-b09b49d0b4b1--

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jamadagni, Rajendra
  INET: Rajendra.Jamadagni@espn.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

