If the exception handling is the default and hasn't been customized, then the standard error messages cite a line number, which you can find in the DBA_SOURCE view for that program module, which will locate the SQL statement within the function, procedure, or package. On 10/26/2012 4:17 PM, anuragdba@xxxxxxxxx wrote: > Hi all, > > > A quick question on PL/SQL exception handling.... > > Is there a way to capture the SQL that raised the exception? > > I have used SQLCODE and SQLERRM, but both do not help to get the SQL that is > causing the exception... > > > Thanks, > Anurag-- > //www.freelists.org/webpage/oracle-l -- //www.freelists.org/webpage/oracle-l