Morning all,
I’m connected to an 8i database and altering a job that is scheduled to
run next week. I want to change ONLY the interval from
“TRUNC(SYSDATE+1)+7.5/24” to “TRUNC(SYSDATE+1)+8.5/24” (ignore the
quotes).
I have not adjusted the Next run date and time. The SQL generated always
seems to change the next date as well as the interval:
BEGIN
SYS.DBMS_IJOB.WHAT
(job => 37
,what =>
‘dbms_refresh.refresh(’’“FDMSMDRO”.“FDMSMDGRP”’’);’);
SYS.DBMS_IJOB.NEXT_DATE
(job => 37
,next_date => TRUNC(SYSDATE+1)+8.5/24);
SYS.DBMS_IJOB.INTERVAL
(job => 37
,interval => ‘TRUNC(SYSDATE+1)+8.5/24’);
END;
In order to prevent this from happening, I have to explicitly set the
next date and time to the same setting by simply clicking on the
‘specify’ radio button. The resulting SQL is now:
BEGIN
SYS.DBMS_IJOB.WHAT
(job => 37
,what =>
‘dbms_refresh.refresh(’’“FDMSMDRO”.“FDMSMDGRP”’’);’);
SYS.DBMS_IJOB.NEXT_DATE
(job => 37
,next_date => to_date(‘01/01/4000 00:00:00’,‘mm/dd/yyyy
hh24:mi:ss’));
SYS.DBMS_IJOB.INTERVAL
(job => 37
,interval => ‘TRUNC(SYSDATE+1)+8.5/24’);
END;
(Yes, I know this job is not set to run until 01/01/4000 but had I not
checked the SQL, alter job would have set it to go tomorrow at 08:30 -
not what I wanted.
I notice that the WHAT is changed as well - I’m thinking that the SQL
generated should only be that for any changes I make - so when I change
the interval, the SQL should (?) be:
BEGIN
SYS.DBMS_IJOB.INTERVAL
(job => 37
,interval => ‘TRUNC(SYSDATE+1)+8.5/24’);
END;
Cheers,
Norm. [TeamT]
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.
We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.
If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk