Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Oracle / Oracle DB Tools / July 2008

Tip: Looking for answers? Try searching our database.

procedures and packages in SQL*Plus

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Slattery - 10 Jul 2008 21:17 GMT
I can enter stored procedures/functions  and packages in SQL*Plus,
that works fine. Except when there's a syntax error someplace. Then it
tells me something like "Warning: Package Body created with
compilation errors." But it doesn't tell me WHAT the errors are! It
doesn't work that way with an anonymous PL/SQL block, that gives a
fine syntax error report.

Is there something I can set to get it to tell me what it objects to?
I scanned the list of SET options, tried autotrace and flagger, still
lost.

Signature

Tim Slattery
Slattery_T@bls.gov
http://members.cox.net/slatteryt

Malcolm Dew-Jones - 10 Jul 2008 22:01 GMT
: I can enter stored procedures/functions  and packages in SQL*Plus,
: that works fine. Except when there's a syntax error someplace. Then it
: tells me something like "Warning: Package Body created with
: compilation errors." But it doesn't tell me WHAT the errors are! It
: doesn't work that way with an anonymous PL/SQL block, that gives a
: fine syntax error report.

: Is there something I can set to get it to tell me what it objects to?
: I scanned the list of SET options, tried autotrace and flagger, still
: lost.

sql> show errors

If there aren't any errors then it says "No errors.", and it's cleared
after each successful code creation, so it's useful to to simply call
it every time.

    prompt creating foobar
    @foobar
    show error

    prompt creating bazbar
    @bazbar
    show error
Maxim Demenko - 11 Jul 2008 18:50 GMT
Malcolm Dew-Jones schrieb:
> : I can enter stored procedures/functions  and packages in SQL*Plus,
> : that works fine. Except when there's a syntax error someplace. Then it
[quoted text clipped - 20 lines]
>     @bazbar
>     show error

Alternatively, errors can be shown for particular object

SQL> create or replace package a
  2  is
  3  a number
  4  end;
  5  /

Warning: Package created with compilation errors.

SQL> create or replace package b
  2  is
  3  b number;
  4  end;
  5  /

Package created.

SQL> sho error
No errors.
SQL> sho error package a
Errors for PACKAGE A:

LINE/COL ERROR
-------- -----------------------------------------------------------------
4/1      PLS-00103: Encountered the symbol "END" when expecting one of
         the following:
         := . ( @ % ; not null range default character
         The symbol ";" was substituted for "END" to continue.

Best regards

Maxim
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.