I am having some Oracle database problem, and I was given this query to run on the pc in question, " 

set pagesize 20000
set linesize 180
set pause off
set serveroutput on
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_OUTPUT.ENABLE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Who is Participating?
DavidConnect With a Mentor Senior Oracle Database AdministratorCommented:
If possible, post the bad code; we don't have enough information by far.  Has this code worked previously, and if so, what changed?
Syntax example:  Enable DBMS_OUTPUT and set the buffer size. The buffer size can be between 1 and 1,000,000 dbms_output.enable(buffer_size IN INTEGER DEFAULT 20000); exec dbms_output.enable(1000000);
taylora1Author Commented:
This is the part of the query that I was attempting to run and the ouput.

SQL> set pagesize 20000
SQL> set linesize 180
SQL> set pause off
SQL> set serveroutput on
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_OUTPUT.ENABLE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

This is the full query that I was asked to run, but incountered the error above and wanted to resolve that before I proceeded with the rest, if notice any other error please advise me on how it should be excuted in SQL.  Thank you

set pagesize 20000
set linesize 180
set pause off
set serveroutput on
set feedback on
set echo on
set numformat 999999999999999
alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS';
Spool recover.lst
archive log list
select file#,substr(name,1,50), substr(recover,1,1) R, substr(fuzzy,1,1) F,
to_char(checkpoint_time,'dd/mm/yyyy:hh24:mi:ss') ckpt_time,

checkpoint_change#, resetlogs_change#,
to_char(resetlogs_time,'dd/mm/yyyy HH24:MI:SS') tm from v$datafile_header;
select file#,substr(name, 1, 50), status,enabled,to_char(creation_time,'dd/mm/yyyy:hh24:mi:ss') from
select incarnation#,resetlogs_change#,resetlogs_time,prior_resetlogs_change#,
prior_resetlogs_time,status from v$database_incarnation;
select * from v$backup;
select name, open_mode, controlfile_type,controlfile_change#,
checkpoint_change#, ARCHIVE_CHANGE#,resetlogs_change#,
prior_resetlogs_change#, to_char(prior_resetlogs_time,'dd/mm/yyyy:hh24:mi:ss') from v$database;
select GROUP#,substr(member,1,60) from v$logfile;
select * from v$log_history;
select * from v$recover_file;
select * from v$recovery_log;
select HXFIL File_num,substr(HXFNM,1,40) File_name,FHTYP Type,HXERR Validity,
from X$KCVFH;
spool off
MilleniumaireConnect With a Mentor Commented:
Is this a recent install of Oracle?  It may be that some system scripts haven't been run.  Have a look at the following experts exchange question which may help you:

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
I would also suggest to remove this line:

set serveroutput on

as you don't need that...
johnsoneSenior Oracle DBACommented:
DBMS_OUTPUT is created as part of the catproc script.  Log in as the SYS user and run that script.

And, as angelll suggested you do not really need it in your particular script as you are not using it.
It may simply be that you have not been granted execute privileges on the DBMS_OUTPUT package.
johnsoneSenior Oracle DBACommented:
When the DBMS_OUTPUT package is create, execute privilege is granted to PUBLIC.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.