Saturday 25 May 2019


ORA$AT_SA_SPC_SY Jobs failing?



select client_name, status
from dba_autotask_client;
dba jb history
select distinct client_name, window_name, job_status, job_info
from dba_autotask_job_history
where job_status <> 'SUCCEEDED'
order by 1,2;

CLIENT_NAME        WINDOW_NAME     JOB_STATUS JOB_INFO
------------------ --------------- ---------- -------------------------------------------
auto space advisor SATURDAY WINDOW FAILED     ORA-6502: PL/SQL: numeric or value error...
auto space advisor SUNDAY WINDOW   FAILED     ORA-6502: PL/SQL: numeric or value error...
BEGIN
  dbms_auto_task_admin.disable(
    client_name => 'auto space advisor',
    operation   => NULL,
    window_name => NULL);
END;
/

PL/SQL procedure successfully completed
select client_name, status
from dba_autotask_client
where client_name = 'auto space advisor';

CLIENT_NAME                     STATUS
------------------------------- --------
auto space advisor              DISABLED

BEGIN
  dbms_auto_task_admin.enable(
    client_name => 'auto space advisor',
    operation   => NULL,
    window_name => NULL);
END;
/

ORA-12012: error

ORA-12012: error on auto execute of job 719358



 select  d.job_name,d.job_action  from  dba_scheduler_jobs d,sys.scheduler$_job s where d.job_action = s.program_action and s.obj# = &myjobnum;

enter no 719358

select job, what from dba_jobs where broken = 'Y' or failures > 0; for broken jobs




provide following grant to the user and then try to execute the job.

'Grant select any table to user_name'

SQL> execute dbms_job.run(444);
BEGIN dbms_job.run(444); END;

*
ERROR at line 1:
ORA-12011: execution of 1 jobs failed
ORA-06512: at "SYS.DBMS_IJOB", line 406
ORA-06512: at "SYS.DBMS_JOB", line 272
ORA-06512: at line 1

Elapsed: 00:00:09.82

SQL> Grant select any table to username;

Grant Succeeded.

Elapsed: 00:00:01.30

SQL> execute dbms_job.run(444);

PL/SQL procedure successfully completed.

Elapsed: 00:00:08.30


Featured post

Postgres commads

 [oracle@Tesdb ~]$ systemctl status postgresql-15 ● postgresql-15.service - PostgreSQL 15 database server    Loaded: loaded (/usr/lib/system...