Oracle 10g Job scripts:
1. To enable or fix broken jobs in Oracle 10g
BEGIN
DBMS_SCHEDULER.ENABLE ('ORACLE_JOB');
END;
/
2. Modifying or setting Oracle 10g Jobs
begin
dbms_scheduler.set_attribute (
name => 'ORACLE_JOB',
attribute => 'REPEAT_INTERVAL',
value => 'FREQ=WEEKLY;BYDAY=MON;BYHOUR=22;BYMINUTE=0'
);
end;
commit;
3. See Oracle job details
i) Job information:
select *from dba_scheduler_jobs
WHERE job_name in ('ORACLE_JOB');
ii) Job run details:
select log_date,to_char(log_date,'DAY'),
additional_info
from dba_scheduler_job_run_details
WHERE job_name ='ORACLE_JOB'
order by log_date desc;
iii) Running job details:
select *
from dba_scheduler_running_jobs
WHERE job_name in ('ORACLE_JOB');
iv) Job logs:
select * from dba_scheduler_job_log
WHERE job_name in ('ORACLE_JOB')
order by log_date desc;
v) Job session details:
select jr.job, s.username, s.sid, s.lockwait, s.logon_time
from dba_jobs_running jr, v$session s
where jr.sid = s.sidorder by jr.job;
This blog is useful for Database, Business Intelligence, Bigdata and Data Science professionals.
Subscribe to:
Post Comments (Atom)
Secure a Microsoft Fabric data warehouse
Data warehouse in Microsoft Fabric is a comprehensive platform for data and analytics, featuring advanced query processing and full transa...
-
Database Mirroring and index maintenance in AWS Database Mirroring, the database has to be in the full recovery mode, so all index rebuilds...
-
This post contains examples of a number of the most commonly performed DBA activities. They are all listed in alphabetical order by the comm...
-
Move distribution database to another drive: There are scenarios in SQL server Replication that we need to move datafiles and logfiles of di...
No comments:
Post a Comment