DBMS_OUTPUT + PL/SQL Developer = PLS-00302

stevem

Member
SQL> set serveroutput on size 1000000
SQL> exec dbms_output.put_line ('TEST')
TEST

PL/SQL procedure successfully completed.

SQL>

Now in PL/SQL developer (v 5.1.6.747) with same user running (as an example) "select count(*) from dual", I get an error box with:
ORA-06550: line 3, column 9:
PLS-00302: component 'DBMS_OUTPUT' must be declared

A box pops up twice with this error for each query (why involve DBMS_OUTPUT in an SQL query anyway?).

The queries always run and give results.

However, running a test script with PL/SQL using dbms_output I get the same error boxes (two again), but no output. SQLPlus works fine, no errors.

Only PL/SQL Dev gives me these errors.

Permissions are obviously OK as shown in first example.

This has always occurred (since day 1), but I'm using PL/SQL Dev more often, so the error has hit the critical mass of annoyance.

Steve
 
What happens if you run:

SQL> set serveroutput on size 1000000
SQL> exec sys.dbms_output.put_line('TEST')

(note the sys prefix)
 
SQL> exec sys.dbms_output.put_line('TEST')
BEGIN sys.dbms_output.put_line('TEST'); END;

*
ERROR at line 1:
ORA-06550: line 1, column 11:
PLS-00302: component 'DBMS_OUTPUT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
 
Ah yes, that is true - a table. This is a legacy app ported to oracle, so oracle inherited it.
We have been talking more recently about changing the table name because it is causing some issues with materialized views as well.
Didn't cross my mind for this issue.

Thanks for enlightening me on the cause. Now the burden of correction is on us...

Thanks,
Steve
 
Back
Top