Job-Schedule

Job-Schedule

1-How to fix "Oracle Schedule job not work"
2-View Oracle Running Job
3-Refresh Job or Set Job Broken to F
4-How to drop job?
5-Find DB Object which is used in your job
6-Run Oracle Job
7-Error when running job: ORA 12011,ORA -06512


1-How to fix "Oracle Schedule job not work"
    A-Check your oracle schedule service on server (Linux Server)
        $ps-eaf | grep ora_
      check all of your process to find process name : ora_cjq0_dbname
      if you can't find this process name , it means that your schedule is not work
    B-If ora_cjq0_dbname process is not running
       1-Change your job_queue_processes=0 by
           SQL>alter system set job_queue_processes=0 scope=both;
       2-after that change it back to 99 by
          SQL>alter system set job_queue_processes=99 scope=both;
       3-Shutdown your DB
          SQL> shutdown immediate;
       4-Startup your DB
          SQL> startup;
       5-check your cjp0 process again, if you found that service it means that your schedule is working
 2-View Oracle Running Job

select A.job,A.LOG_USER,A.BROKEN, what,B.last_date,A.NEXT_DATE
 from dba_jobs A inner join
dba_jobs_running B on A.job=B.job

3-Refresh Job or Set Job Broken to F
begin
dbms_job.broken(1140,FALSE); --1140 is job is
commit;
end;

4-How to drop job?
Begin
Execute DBMS_job.remove(61);
commit;
End;

5-Find DB Object which is used in your job
select * from dba_jobs
where upper(what) like '%XXX%'
6-Run Oracle Job
sql> exec dbms_job(jobid)
sql>exec dbms_jon(833)

7-Error when running job: ORA 12011,ORA -06512
when you execute the code , it is working fine,
but when you add your code in oracle job, when the job run it show the above error
Solution:
A-view alert log file
(your table or object doesn't exist)
B-Add dbLink to your object
Look at the below code


update tablex set c1=' A' --> Error
update tablex@dblink set c1=' A' working fine















No comments:

Post a Comment