|
|
|
|
Re: Run dbms_scheduler.create_job with arguments [message #651253 is a reply to message #651252] |
Fri, 13 May 2016 10:06   |
 |
Michel Cadot
Messages: 68447 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Here's the list of USER views about scheduler.
VIEW_NAME
------------------------------
USER_SCHEDULER_CHAINS
USER_SCHEDULER_CHAIN_RULES
USER_SCHEDULER_CHAIN_STEPS
USER_SCHEDULER_CREDENTIALS
USER_SCHEDULER_DB_DESTS
USER_SCHEDULER_DESTS
USER_SCHEDULER_FILE_WATCHERS
USER_SCHEDULER_GROUPS
USER_SCHEDULER_GROUP_MEMBERS
USER_SCHEDULER_JOBS
USER_SCHEDULER_JOB_ARGS
USER_SCHEDULER_JOB_DESTS
USER_SCHEDULER_JOB_LOG
USER_SCHEDULER_JOB_RUN_DETAILS
USER_SCHEDULER_NOTIFICATIONS
USER_SCHEDULER_PROGRAMS
USER_SCHEDULER_PROGRAM_ARGS
USER_SCHEDULER_REMOTE_JOBSTATE
USER_SCHEDULER_RUNNING_CHAINS
USER_SCHEDULER_RUNNING_JOBS
USER_SCHEDULER_SCHEDULES
I think this one is the one you are searching for... for the next execution:
SQL> desc USER_SCHEDULER_JOB_ARGS
Name Null? Type
-------------------------------- -------- ----------------------
JOB_NAME VARCHAR2(30)
ARGUMENT_NAME VARCHAR2(30)
ARGUMENT_POSITION NUMBER
ARGUMENT_TYPE VARCHAR2(61)
VALUE VARCHAR2(4000)
ANYDATA_VALUE SYS.ANYDATA
OUT_ARGUMENT VARCHAR2(5)
But there is no view, as far I as I know, for what has been executed.
[Updated on: Fri, 13 May 2016 10:09] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Run dbms_scheduler.create_job with arguments [message #672521 is a reply to message #651539] |
Wed, 17 October 2018 06:57   |
 |
shawaj
Messages: 89 Registered: January 2016
|
Member |
|
|
Hi all,
I have created a job using following code. when i execute manually it works fine but does not execute automatically.
Please help..
CREATE TABLE RND1(A VARCHAR2(100));
BEGIN
dbms_scheduler.create_job(
job_name=>'UNIT_RATE_FWRD_NXT_MNTH',
job_type=>'PLSQL_BLOCK',
job_action=>'BEGIN insert into rnd1 values(''testing'');commit; END;',
number_of_arguments=>0,
start_date=> '17-OCT-2018 04:30:00 PM',
repeat_interval=> 'trunc(systimestamp, ''MI'') + interval ''2'' minute',--'freq=menutely; interval=2; bysecond=0;',
end_date=>NULL,
job_class=>'"DEFAULT_JOB_CLASS"',
enabled=>TRUE,
auto_drop=>TRUE,
comments=>'TEST'
);
END;
/
|
|
|
|
|
|
Re: Run dbms_scheduler.create_job with arguments [message #672526 is a reply to message #672524] |
Wed, 17 October 2018 07:44   |
 |
shawaj
Messages: 89 Registered: January 2016
|
Member |
|
|
Yes,
I checked user_scheduler_jobs table, i found one record that has following values. But after 10 minutes i check RND1 table it is empty still.
JOB_NAME
UNIT_RATE_FWRD_NXT_MNTH
NEXT_RUN_DATE
17-OCT-18 04.41.54.925476000 PM ASIA/CALCUTTA
JOB_TYPE
PLSQL_BLOCK
SCHEDULE_TYPE
PLSQL
START_DATE
17-OCT-18 04.30.00.000000000 PM ASIA/CALCUTTA
REPEAT_INTERVAL
trunc(systimestamp, 'MI') + interval '2' minute
ENABLED
TRUE
STATE
SCHEDULED
JOB_PRIORITY
3
FAIL_ON_SCRIPT_ERROR
FALSE
[Updated on: Wed, 17 October 2018 07:46] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Run dbms_scheduler.create_job with arguments [message #672544 is a reply to message #672537] |
Wed, 17 October 2018 08:49   |
cookiemonster
Messages: 13904 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
BlackSwan wrote on Wed, 17 October 2018 14:35shawaj wrote on Wed, 17 October 2018 06:27Yes, its column name.
cookiemonster wrote on Wed, 17 October 2018 08:23BlackSwan wrote on Wed, 17 October 2018 13:35>CREATE TABLE RND1(A VARCHAR2(100));
why does paramter "A" exist above?
that's the column name
OK, but it is never used or referenced within the BEGIN ... END: block.
And it doesn't need to be - it's implicit. I would always say the columns should be specified but there's no reason why that wouldn't work.
BlackSwan wrote on Wed, 17 October 2018 14:35
Did you start a new session to inspect the table content?
Oracle provides a read consistent view of data as existed when current "transaction" started
Think you might need some coffee - oracle only does that when you set the isolation level to serializable.
|
|
|
Re: Run dbms_scheduler.create_job with arguments [message #672578 is a reply to message #651253] |
Thu, 18 October 2018 13:43  |
Bill B
Messages: 1971 Registered: December 2004
|
Senior Member |
|
|
Michel Cadot wrote on Fri, 13 May 2016 11:06
Here's the list of USER views about scheduler.
VIEW_NAME
------------------------------
USER_SCHEDULER_CHAINS
USER_SCHEDULER_CHAIN_RULES
USER_SCHEDULER_CHAIN_STEPS
USER_SCHEDULER_CREDENTIALS
USER_SCHEDULER_DB_DESTS
USER_SCHEDULER_DESTS
USER_SCHEDULER_FILE_WATCHERS
USER_SCHEDULER_GROUPS
USER_SCHEDULER_GROUP_MEMBERS
USER_SCHEDULER_JOBS
USER_SCHEDULER_JOB_ARGS
USER_SCHEDULER_JOB_DESTS
USER_SCHEDULER_JOB_LOG
USER_SCHEDULER_JOB_RUN_DETAILS
USER_SCHEDULER_NOTIFICATIONS
USER_SCHEDULER_PROGRAMS
USER_SCHEDULER_PROGRAM_ARGS
USER_SCHEDULER_REMOTE_JOBSTATE
USER_SCHEDULER_RUNNING_CHAINS
USER_SCHEDULER_RUNNING_JOBS
USER_SCHEDULER_SCHEDULES
I think this one is the one you are searching for... for the next execution:
SQL> desc USER_SCHEDULER_JOB_ARGS
Name Null? Type
-------------------------------- -------- ----------------------
JOB_NAME VARCHAR2(30)
ARGUMENT_NAME VARCHAR2(30)
ARGUMENT_POSITION NUMBER
ARGUMENT_TYPE VARCHAR2(61)
VALUE VARCHAR2(4000)
ANYDATA_VALUE SYS.ANYDATA
OUT_ARGUMENT VARCHAR2(5)
But there is no view, as far I as I know, for what has been executed.
see the view USER_SCHEDULER_JOB_LOG. detailed information is in USER_SCHEDULAR_JOB_RUN_DETAILS
[Updated on: Thu, 18 October 2018 13:45] Report message to a moderator
|
|
|