1 person found this helpful
I don't use SQL Developer to manage dbms_scheduler jobs but the days specified in the BYDAY option are not correct. Days are specified with 3 letters: MON, TUE, WED, THU, FRI, SAT, SUN.
Yes, you are absolutely right.
Believe me or not - I just did not saw/realized that...
On my VM (at home) I just created a new job via "New Job" ....
and it looks and works at it should (3 char for a week day).
Strange enough this job is in place and active for a long time...
I will check that on Monday when in duty again.
Thank you and Regards
not a bug, but rather some kind of (little?) inconsistency…
From the Docu for 11g:
byday_clause = "BYDAY" "=" byday_list
byday_list = byday ( "," byday)*
byday = [weekdaynum] day
weekdaynum = [minus] daynum
daynum = 1 through 53 /* if frequency is yearly */
daynum = 1 through 5 /* if frequency is monthly */
day = "MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN"
So indeed the “clean” way is to do it this way:
However, the 2-Char-variante works too (for the Database) …
And so, it seems to be more the (rhetorical) question why that, why does that work?
To make a long story short:
SQL Developer can understand (resolve) the 3-Char-Day semantic but not the 2-Char.
Consistently it creates the values for the "byday" as 3-Char-Day.
Solution (as a best practice):
Use 3-Char-Day as mentioned in the docu IN ANY CASE.
Just to show the proof the 2-Char-variante is working :-) ...
Thanks for the feedback. Not sure why the 2-letter syntax works but since it's undocumented it's best to avoid using it. I'd rather Oracle throw an error than allowing it silently.