Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

SHOW ERRORS tips

Expert Oracle Database Tips by Burleson Consulting

December 13, 2015

Question:  How does the PL/SQL show errors command work?

Answer:  When you run PL/SQL the code is interpreted at runtime, and you may see these types of errors:

  • Syntax errors:  These are indicated by the "Warning: Procedure created with compilation errors" message.  You can display the error with the "show errors" SQL*Plus command).
  • Semantic errors:  These are invalid table or column names.
  •  Run time errors:  This is a a non-zero Oracle database error code.

For more details, see my notes on PL/SQL debugging techniques.

Show errors command

To see PL/SQL interpreter errors, you can use the SQL*Plus "show errors" command: as seen in the "show errors" example

SQL> create or replace procedure example_defaults
  2    (n_1 in number := 5,
  3     n_2 in number := 6,
  4     n_3 in number := 7)
  5  as
  6  begin
  7    n_1 := n_2 + n_3;
  8  end;
  9  / 

Warning: Procedure created with compilation errors. 

SQL> show errors

Errors for PROCEDURE EXAMPLE_DEFAULTS: 

LINE/COL ERROR
-------- ------------------------------------------------      PLS-00363: expression 'N_1' cannot be used as an assignment target 

For enhanced show errors command feedback, you can join into dba_errors and dba_source and see the feedback lines in the PL/SQL source code:

set lines 100
set pages 100

column text format a100

with err as (
   select distinct
      owner,
      name,
      type,
      line,
      position,
      sequence,
      text

   from
      dba_errors
   where
      sequence=1

)
select
   decode(n,-1,'* ',' ')||text text from (

      select
         sequence n,
         owner,name,
         type,line,
         lpad(' ',position-1,' ')||'^'||text text
      from
         err

union all
select distinct
   -1 n,
   owner,
   name,
   type,
   line,
   type||' '||owner||'.'||name||' line '||line
from
   err

union all
select
   0,
   owner,
   name,
   type,
   line,
   text
from
   dba_source

where
   (owner,name,type,line) in
      (select
         owner,
         name,
         type,
         line
       from
         err)

order by
   owner,name,
   type,line,
   n

);

   
Oracle Training from Don Burleson 

The best on site "Oracle training classes" are just a phone call away! You can get personalized Oracle training by Donald Burleson, right at your shop!

Oracle training
 
 


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2016

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.


 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster