Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL Problem

PL/SQL Problem

From: Tony Walby <tony.walby_at_bridgewatersystems.com>
Date: Fri, 24 Aug 2001 14:55:15 -0400
Message-ID: <3B86A313.A648A27C@bridgewatersystems.com>


Hey Guys,
i got a bit of a problem. here is the code and the associated message. This is more than likely something small but I just can't figure it out.

Code:

create or replace procedure check_jobs_running as

v_date_dd number(2);
v_date_hh number(2);
v_thisdate_dd number(2);
v_thisdate_hh number(2);
v_what varchar2(100);
v_magic_number  number := 06;

cursor long_jobs is select * from system.dba_jobs_running; job_rec long_jobs%rowtype;

begin
for job_rec in long_jobs
 loop

  select to_number(to_char(sysdate, 'DD' )) into v_date_dd from dual;
  select to_number(to_char(sysdate, 'HH24' )) into v_date_hh from dual;
  select to_number(to_char(job_rec.this_date, 'DD' )) into v_thisdate_dd
from system.dba_jobs_running;
  select to_number(substr(job_rec.last_sec, 1,2)) into v_thisdate_hh from system.dba_jobs_running;
  if (( v_date_dd > v_thisdate_dd) and (v_thisdate_hh > v_magic_number))

  then
   select what into v_what from system.dba_jobs where job = job_rec.job;

  elsif ((v_date_hh - v_thisdate_hh) > v_magic_number)   then
   select what into v_what from system.dba_jobs where job = job_rec.job;

  end if;
end loop;
end;
/

Error:
Errors for PROCEDURE CHECK_JOBS_RUNNING:

LINE/COL ERROR



9/8      PLS-00341: declaration of cursor 'LONG_JOBS' is incomplete or
         malformed

10/2     PL/SQL: SQL Statement ignored

10/16 PLS-00201: identifier 'SYSTEM.DBA_JOBS_RUNNING' must be declared
11/9     PL/SQL: Item ignored
18/3     PL/SQL: SQL Statement ignored
18/79    PLS-00201: identifier 'SYSTEM.DBA_JOBS_RUNNING' must be
declared
19/3     PL/SQL: SQL Statement ignored

19/75 PLS-00201: identifier 'SYSTEM.DBA_JOBS_RUNNING' must be declared
22/4     PL/SQL: SQL Statement ignored
22/33    PLS-00201: identifier 'SYSTEM.DBA_JOBS' must be declared
25/4     PL/SQL: SQL Statement ignored
25/33    PLS-00201: identifier 'SYSTEM.DBA_JOBS' must be declared

Any help will be greate.

Tony Walby
oracle DBA
Bridgewater Systems
Kanata ON
Canada Received on Fri Aug 24 2001 - 13:55:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US