Creating Job:
DECLARE
v_job_nbr NUMBER;
v_job_txt VARCHAR2(2000) := 'CLOSR_SP_DATA_COPY;';
v_job_comment_txt VARCHAR2(2000) := 'This Procedure will refresh the last two days of data from a couple of the CLOSR
tables. Questions contact Dan Waltz';
BEGIN
dbms_scheduler.create_job(
job_name => 'CLOSR_DATA_REFRESH',
job_type => 'plsql_block',
job_action => v_job_txt,
start_date => SYSDATE,
repeat_interval => 'FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI,SAT,SUN; BYHOUR=6; BYMINUTE=0; BYSECOND=0',
end_date => NULL,
enabled => TRUE,
comments => v_job_comment_txt
);
END;
*****************************************************************
--Select a job from the table
SELECT job_name, owner, schedule_owner, start_date, repeat_interval, job_action, comments
FROM DBA_SCHEDULER_JOBS sj
where owner in ('CMTS_RPTS', 'SUPPORT_SERVICES')
and job_name = 'ORARPT_PROBLEM_REPORTS_CAPTURE';
--Get job details from the table
select *
from dba_scheduler_job_run_details
where job_name = 'ORARPT_DAILY_CUSTOM' order by log_date desc;
--set attribute
BEGIN
DBMS_SCHEDULER.SET_ATTRIBUTE (
name => 'ORARPT_PROBLEM_REPORTS_CAPTURE',
attribute => 'repeat_interval',
value => 'FREQ=DAILY');
END;
--Drop a job from the table
BEGIN
dbms_scheduler.drop_job(
job_name => 'ORARPT_PROBLEM_REPORTS_CAPTURE'
);
END;
select *
from dba_scheduler_jobs
where job_name = 'CLOSR_DATA_REFRESH';
select *
from support_services.cop_job_watch
where job_nm = 'CLOSR_DATA_REFRESH';
select *
from dba_scheduler_job_run_details
where job_name = 'CLOSR_DATA_REFRESH';
select *
from dba_scheduler_job_run_details
where status = 'FAILED'
Objective of this blog is to share my oracle knowledge with the people who are working in oracle.
Labels
Accrual
(1)
Advanced Pricing
(1)
Alert in OAF
(1)
Alter Session in PLSQL
(3)
AME
(1)
AP
(8)
APEX
(6)
API
(2)
AR
(5)
AR Receipts
(1)
ASCP
(1)
Auto Invoice
(1)
BOM
(6)
Bulk Operations
(1)
Conversion Util PKG
(1)
Cost Management
(4)
Costing
(4)
CST
(1)
Customer
(1)
DBA
(1)
DFF
(1)
Discoverer
(6)
FND
(3)
FNDLOADER
(1)
Forms
(3)
General issues
(1)
GL
(6)
HCM
(1)
Hints
(1)
HRMS
(10)
Indexes
(1)
Install Base Conversion
(1)
Interview Questions
(2)
Inventory
(3)
Inverntory
(11)
iProcurement
(4)
Javascript
(1)
MOAC
(1)
OAF
(9)
OBIEE
(1)
Oracle Alerts
(2)
Oracle DB
(4)
Oracle DBA
(1)
Oracle EBS
(1)
Oracle Installation
(1)
Oracle Reports
(4)
Order Management
(7)
Payables
(14)
Payments
(2)
PLSQL
(45)
PLSQL Tunning
(6)
PO
(11)
Queries
(1)
Receivables
(7)
Service Contracts
(1)
Service Requests
(2)
SESSION
(1)
Shell Scripts in Oracle apps
(1)
SLA
(2)
SQL
(31)
SQL LOADER
(4)
SQl TUNNING
(4)
Supplier
(1)
System Administrator
(46)
TCA
(5)
Unix
(4)
UTL_FILE
(1)
WIP
(4)
WORKFLOW
(4)
XLA
(3)
XML/BI Publisher
(11)
No comments:
Post a Comment